diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config.host | 9 | ||||
-rw-r--r-- | gcc/config.in | 16 | ||||
-rwxr-xr-x | gcc/configure | 10 | ||||
-rw-r--r-- | gcc/configure.ac | 4 | ||||
-rw-r--r-- | gcc/gcc.c | 4 |
6 files changed, 45 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 744c579..6b50b65 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com> + + * config.host (host_lto_plugin_soname): New shell variable. + * configure.ac (LTOPLUGINSONAME): Add an AC_DEFINE for the above. + * config.in: Regenerate. + * configure: Regenerate. + * gcc.c (main): Use LTOPLUGINSONAME instead of hard-coding name of + LTO plugin shared library. + 2010-10-07 Richard Henderson <rth@redhat.com> * target.h (enum unwind_info_type): Move ... diff --git a/gcc/config.host b/gcc/config.host index 9738345..c035a50 100644 --- a/gcc/config.host +++ b/gcc/config.host @@ -51,10 +51,15 @@ # # host_can_use_collect2 Set to yes normally; to no if the host cannot # link or otherwise use collect2 +# # use_long_long_for_widest_fast_int Set this to 'yes' if 'long long' # (or '__int64') is wider than 'long' but still # efficeiently supported by the host hardware. # Only affects compile speed. Default is 'no'. +# +# host_lto_plugin_soname Set this to the name to which the LTO linker +# plugin gets compiled on this host, if it is +# different from the default "liblto_plugin.so". # When setting any of these variables, check to see if a corresponding # variable is present in config.build; if so, you will likely want to @@ -70,6 +75,7 @@ host_extra_gcc_objs= out_host_hook_obj=host-default.o host_can_use_collect2=yes use_long_long_for_widest_fast_int=no +host_lto_plugin_soname=liblto_plugin.so # Unsupported hosts list. Generally, only include hosts known to fail here, # since we allow hosts not listed to be supported generically. @@ -206,12 +212,14 @@ case ${host} in out_host_hook_obj=host-cygwin.o host_xmake_file="${host_xmake_file} i386/x-cygwin" host_exeext=.exe + host_lto_plugin_soname=cyglto_plugin-0.dll ;; i[34567]86-*-mingw32*) host_xm_file=i386/xm-mingw32.h host_xmake_file="${host_xmake_file} i386/x-mingw32" host_exeext=.exe out_host_hook_obj=host-mingw32.o + host_lto_plugin_soname=liblto_plugin-0.dll ;; x86_64-*-mingw*) use_long_long_for_widest_fast_int=yes @@ -219,6 +227,7 @@ case ${host} in host_xmake_file="${host_xmake_file} i386/x-mingw32" host_exeext=.exe out_host_hook_obj=host-mingw32.o + host_lto_plugin_soname=liblto_plugin-0.dll ;; i[34567]86-*-uwin*) echo "*** UWIN may not be used as a host platform because" diff --git a/gcc/config.in b/gcc/config.in index 3925a11..4576de07 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -959,9 +959,6 @@ /* Define if your assembler and linker support .hidden. */ #undef HAVE_GAS_HIDDEN -/* Define if your system supports gnu indirect functions. */ -#undef HAVE_GNU_INDIRECT_FUNCTION - /* Define if your assembler supports .lcomm with an alignment field. */ #ifndef USED_FOR_TARGET #undef HAVE_GAS_LCOMM_WITH_ALIGNMENT @@ -1062,6 +1059,12 @@ #endif +/* Define if your system supports gnu indirect functions. */ +#ifndef USED_FOR_TARGET +#undef HAVE_GNU_INDIRECT_FUNCTION +#endif + + /* Define if using GNU ld. */ #ifndef USED_FOR_TARGET #undef HAVE_GNU_LD @@ -1543,6 +1546,13 @@ #endif +/* Define to the name of the LTO plugin DSO that must be passed to the + linker's -plugin=LIB option. */ +#ifndef USED_FOR_TARGET +#undef LTOPLUGINSONAME +#endif + + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #ifndef USED_FOR_TARGET diff --git a/gcc/configure b/gcc/configure index 3b20cc9..68cb29e 100755 --- a/gcc/configure +++ b/gcc/configure @@ -11045,6 +11045,12 @@ case $use_collect2 in ;; esac + +cat >>confdefs.h <<_ACEOF +#define LTOPLUGINSONAME "${host_lto_plugin_soname}" +_ACEOF + + # --------------------------- # Assembler & linker features # --------------------------- @@ -17127,7 +17133,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17130 "configure" +#line 17136 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17233,7 +17239,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17236 "configure" +#line 17242 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 164d3f4..9dd9c5d 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1811,6 +1811,10 @@ case $use_collect2 in ;; esac +AC_DEFINE_UNQUOTED(LTOPLUGINSONAME,"${host_lto_plugin_soname}", +[Define to the name of the LTO plugin DSO that must be + passed to the linker's -plugin=LIB option.]) + # --------------------------- # Assembler & linker features # --------------------------- @@ -6827,10 +6827,10 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" fuse_linker_plugin + strlen (fuse_linker_plugin), 0)) { linker_plugin_file_spec = find_a_file (&exec_prefixes, - "liblto_plugin.so", R_OK, + LTOPLUGINSONAME, R_OK, false); if (!linker_plugin_file_spec) - fatal_error ("-fuse-linker-plugin, but liblto_plugin.so not found"); + fatal_error ("-fuse-linker-plugin, but " LTOPLUGINSONAME " not found"); lto_libgcc_spec = find_a_file (&startfile_prefixes, "libgcc.a", R_OK, true); |