summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-07 15:17:42 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-07 15:17:42 +0000
commit1d784785ebd590d40384fbeb7a298e4bf5f7db42 (patch)
treeee838e791a5124cd1cd8df904283c0496c6b49b9 /gcc/gcc.c
parent47c380e4136af664fdc8e773bcf29b523a9ce1d4 (diff)
downloadgcc-1d784785ebd590d40384fbeb7a298e4bf5f7db42.tar.gz
* gcc.c (main): Don't look for lto-wrapper or lto-wrapper
or LTOPLUGINSONAME if have_c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183971 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c55
1 files changed, 33 insertions, 22 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index bea9b464207..315aab321ab 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -6447,7 +6447,11 @@ main (int argc, char **argv)
/* Set up to remember the pathname of the lto wrapper. */
- lto_wrapper_file = find_a_file (&exec_prefixes, "lto-wrapper", X_OK, false);
+ if (have_c)
+ lto_wrapper_file = NULL;
+ else
+ lto_wrapper_file = find_a_file (&exec_prefixes, "lto-wrapper",
+ X_OK, false);
if (lto_wrapper_file)
{
lto_wrapper_spec = lto_wrapper_file;
@@ -6821,39 +6825,46 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
{
int tmp = execution_count;
+
+ if (! have_c)
+ {
#if HAVE_LTO_PLUGIN > 0
#if HAVE_LTO_PLUGIN == 2
- const char *fno_use_linker_plugin = "fno-use-linker-plugin";
+ const char *fno_use_linker_plugin = "fno-use-linker-plugin";
#else
- const char *fuse_linker_plugin = "fuse-linker-plugin";
+ const char *fuse_linker_plugin = "fuse-linker-plugin";
#endif
#endif
- /* We'll use ld if we can't find collect2. */
- if (! strcmp (linker_name_spec, "collect2"))
- {
- char *s = find_a_file (&exec_prefixes, "collect2", X_OK, false);
- if (s == NULL)
- linker_name_spec = "ld";
- }
+ /* We'll use ld if we can't find collect2. */
+ if (! strcmp (linker_name_spec, "collect2"))
+ {
+ char *s = find_a_file (&exec_prefixes, "collect2", X_OK, false);
+ if (s == NULL)
+ linker_name_spec = "ld";
+ }
#if HAVE_LTO_PLUGIN > 0
#if HAVE_LTO_PLUGIN == 2
- if (!switch_matches (fno_use_linker_plugin,
- fno_use_linker_plugin + strlen (fno_use_linker_plugin), 0))
+ if (!switch_matches (fno_use_linker_plugin,
+ fno_use_linker_plugin
+ + strlen (fno_use_linker_plugin), 0))
#else
- if (switch_matches (fuse_linker_plugin,
- fuse_linker_plugin + strlen (fuse_linker_plugin), 0))
+ if (switch_matches (fuse_linker_plugin,
+ fuse_linker_plugin
+ + strlen (fuse_linker_plugin), 0))
#endif
- {
- linker_plugin_file_spec = find_a_file (&exec_prefixes,
- LTOPLUGINSONAME, R_OK,
- false);
- if (!linker_plugin_file_spec)
- fatal_error ("-fuse-linker-plugin, but %s not found", LTOPLUGINSONAME);
- }
+ {
+ linker_plugin_file_spec = find_a_file (&exec_prefixes,
+ LTOPLUGINSONAME, R_OK,
+ false);
+ if (!linker_plugin_file_spec)
+ fatal_error ("-fuse-linker-plugin, but %s not found",
+ LTOPLUGINSONAME);
+ }
#endif
- lto_gcc_spec = argv[0];
+ lto_gcc_spec = argv[0];
+ }
/* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
for collect. */