diff options
author | Dave Korn <dave.korn.cygwin@gmail.com> | 2010-10-07 20:28:59 +0000 |
---|---|---|
committer | Dave Korn <davek@gcc.gnu.org> | 2010-10-07 20:28:59 +0000 |
commit | 1cd0b7167ed9b43b189c39549d8165a020aee9b6 (patch) | |
tree | 946186568fee00058aace74937894e09bce8b4b8 /gcc | |
parent | 6ba74c2d192958de47dc1d7b36125495441a4d50 (diff) | |
download | gcc-1cd0b7167ed9b43b189c39549d8165a020aee9b6.zip gcc-1cd0b7167ed9b43b189c39549d8165a020aee9b6.tar.gz gcc-1cd0b7167ed9b43b189c39549d8165a020aee9b6.tar.bz2 |
configure.ac (build_lto_plugin): New shell variable.
ChangeLog:
2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com>
* configure.ac (build_lto_plugin): New shell variable.
(--enable-lto): Turn on by default for all non-ELF platforms that
have had LTO support added so far. Set build_lto_plugin appropriately
for both ELF and non-ELF.
(configdirs): Add lto-plugin or not based on build_lto_plugin.
* configure: Regenerate.
gcc/ChangeLog:
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.
lto-plugin/ChangeLog:
2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com>
* configure.ac: Source config.gcc to determine lto_binary_reader.
(LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
* Makefile.am (LTO_FORMAT): Import.
(liblto_plugin_la_SOURCES): Add object format dependent module
defined by LTO_FORMAT.
(liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
and work around libtool warning.
* configure: Regenerate.
* Makefile.in: Likewise.
* lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
(struct sym_aux): Likewise.
(struct plugin_symtab): Likewise.
(struct plugin_file_info): Likewise.
(LTO_SECTION_PREFIX): Likewise.
(add_symbols): Make non-static.
(claimed_files): Likewise.
(num_claimed_files): Likewise.
(check): Likewise.
(parse_table_entry): Likewise.
(translate): Likewise.
(resolve_conflicts): Likewise.
(process_symtab): Move to new lto-plugin-elf.c object format dependent
source file.
(claim_file_handler): Likewise, and make non-static.
(onload): Call new onload_format_checks function.
* lto-plugin.h: New file.
(LTO_SECTION_PREFIX): Move here.
(struct sym_aux): Likewise.
(struct plugin_symtab): Likewise.
(struct plugin_file_info): Likewise.
(claim_file_handler): Add new function prototype.
(onload_format_checks): Likewise.
(check): Declare extern.
(translate): Likewise.
(parse_table_entry): Likewise.
(resolve_conflicts): Likewise.
(add_symbols): Likewise.
(claimed_files): Likewise.
(num_claimed_files): Likewise.
* lto-plugin-elf.c (process_symtab): Move here.
(claim_file_handler): Likewise, and make non-static.
(onload_format_checks): New function factored out from onload.
* lto-plugin-coff.c (claim_file_handler): New function stub.
(onload_format_checks): Likewise.
From-SVN: r165133
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); |