[llvm-commits] [llvm-gcc-4.2] r70494 - /llvm-gcc-4.2/trunk/gcc/gcc.c
Rafael Espindola
rafael.espindola at gmail.com
Thu Apr 30 09:31:44 PDT 2009
Author: rafael
Date: Thu Apr 30 11:31:44 2009
New Revision: 70494
URL: http://llvm.org/viewvc/llvm-project?rev=70494&view=rev
Log:
Pass -plugin-opt=gcc= to the linker if using the gold plugin.
Modified:
llvm-gcc-4.2/trunk/gcc/gcc.c
Modified: llvm-gcc-4.2/trunk/gcc/gcc.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/gcc.c?rev=70494&r1=70493&r2=70494&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/gcc.c (original)
+++ llvm-gcc-4.2/trunk/gcc/gcc.c Thu Apr 30 11:31:44 2009
@@ -717,7 +717,11 @@
#ifndef LINK_COMMAND_SPEC
#define LINK_COMMAND_SPEC "\
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
- %(linker) %{use-gold-plugin: -plugin %(gold_plugin_file)} \
+ %(linker) \
+ %{use-gold-plugin: \
+ -plugin %(gold_plugin_file) \
+ -plugin-opt=gcc=%(gold_plugin_gcc) \
+ } \
%l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %<emit-llvm %{e*}\
%{m} %{N} %{n} %{r}\
%{s} %{t} %<use-gold-plugin \
@@ -773,6 +777,7 @@
/* LLVM LOCAL begin */
#ifdef ENABLE_LLVM
static const char *gold_plugin_file_spec = "";
+static const char *gold_plugin_gcc_spec = "";
#endif
/* LLVM LOCAL end */
static const char *link_command_spec = LINK_COMMAND_SPEC;
@@ -1656,6 +1661,7 @@
/* LLVM LOCAL begin */
#ifdef ENABLE_LLVM
INIT_STATIC_SPEC ("gold_plugin_file", &gold_plugin_file_spec),
+ INIT_STATIC_SPEC ("gold_plugin_gcc", &gold_plugin_gcc_spec),
INIT_STATIC_SPEC ("llvm_options", &llvm_options),
#endif
/* LLVM LOCAL end */
@@ -7183,6 +7189,7 @@
if (!gold_plugin_file_spec)
fatal ("-use-gold-plugin, but libLLVMgold.so not found.");
}
+ gold_plugin_gcc_spec = argv[0];
#endif
/* LLVM LOCAL end */
/* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
More information about the llvm-commits
mailing list