mirror of git://gcc.gnu.org/git/gcc.git
gcc.c (main): Don't look for lto-wrapper or lto-wrapper or LTOPLUGINSONAME if have_c.
* gcc.c (main): Don't look for lto-wrapper or lto-wrapper or LTOPLUGINSONAME if have_c. From-SVN: r183971
This commit is contained in:
parent
deb3f362b3
commit
117cb2bc98
|
@ -1,5 +1,8 @@
|
||||||
2012-02-07 Jakub Jelinek <jakub@redhat.com>
|
2012-02-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* gcc.c (main): Don't look for lto-wrapper or lto-wrapper
|
||||||
|
or LTOPLUGINSONAME if have_c.
|
||||||
|
|
||||||
* config/freebsd-spec.h: Add comment about what macros can be defined
|
* config/freebsd-spec.h: Add comment about what macros can be defined
|
||||||
in this header.
|
in this header.
|
||||||
(LINK_EH_SPEC, LINK_SSP_SPEC, USE_LD_AS_NEEDED): Don't define here.
|
(LINK_EH_SPEC, LINK_SSP_SPEC, USE_LD_AS_NEEDED): Don't define here.
|
||||||
|
|
55
gcc/gcc.c
55
gcc/gcc.c
|
@ -6447,7 +6447,11 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
/* Set up to remember the pathname of the lto wrapper. */
|
/* 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)
|
if (lto_wrapper_file)
|
||||||
{
|
{
|
||||||
lto_wrapper_spec = 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)
|
if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
|
||||||
{
|
{
|
||||||
int tmp = execution_count;
|
int tmp = execution_count;
|
||||||
|
|
||||||
|
if (! have_c)
|
||||||
|
{
|
||||||
#if HAVE_LTO_PLUGIN > 0
|
#if HAVE_LTO_PLUGIN > 0
|
||||||
#if HAVE_LTO_PLUGIN == 2
|
#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
|
#else
|
||||||
const char *fuse_linker_plugin = "fuse-linker-plugin";
|
const char *fuse_linker_plugin = "fuse-linker-plugin";
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* We'll use ld if we can't find collect2. */
|
/* We'll use ld if we can't find collect2. */
|
||||||
if (! strcmp (linker_name_spec, "collect2"))
|
if (! strcmp (linker_name_spec, "collect2"))
|
||||||
{
|
{
|
||||||
char *s = find_a_file (&exec_prefixes, "collect2", X_OK, false);
|
char *s = find_a_file (&exec_prefixes, "collect2", X_OK, false);
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
linker_name_spec = "ld";
|
linker_name_spec = "ld";
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_LTO_PLUGIN > 0
|
#if HAVE_LTO_PLUGIN > 0
|
||||||
#if HAVE_LTO_PLUGIN == 2
|
#if HAVE_LTO_PLUGIN == 2
|
||||||
if (!switch_matches (fno_use_linker_plugin,
|
if (!switch_matches (fno_use_linker_plugin,
|
||||||
fno_use_linker_plugin + strlen (fno_use_linker_plugin), 0))
|
fno_use_linker_plugin
|
||||||
|
+ strlen (fno_use_linker_plugin), 0))
|
||||||
#else
|
#else
|
||||||
if (switch_matches (fuse_linker_plugin,
|
if (switch_matches (fuse_linker_plugin,
|
||||||
fuse_linker_plugin + strlen (fuse_linker_plugin), 0))
|
fuse_linker_plugin
|
||||||
|
+ strlen (fuse_linker_plugin), 0))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
linker_plugin_file_spec = find_a_file (&exec_prefixes,
|
linker_plugin_file_spec = find_a_file (&exec_prefixes,
|
||||||
LTOPLUGINSONAME, R_OK,
|
LTOPLUGINSONAME, R_OK,
|
||||||
false);
|
false);
|
||||||
if (!linker_plugin_file_spec)
|
if (!linker_plugin_file_spec)
|
||||||
fatal_error ("-fuse-linker-plugin, but %s not found", LTOPLUGINSONAME);
|
fatal_error ("-fuse-linker-plugin, but %s not found",
|
||||||
|
LTOPLUGINSONAME);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
lto_gcc_spec = argv[0];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
lto_gcc_spec = argv[0];
|
|
||||||
|
|
||||||
/* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
|
/* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
|
||||||
for collect. */
|
for collect. */
|
||||||
|
|
Loading…
Reference in New Issue