diff options
author | Dave Korn <dave.korn.cygwin@gmail.com> | 2010-04-27 02:22:40 +0000 |
---|---|---|
committer | Dave Korn <davek@gcc.gnu.org> | 2010-04-27 02:22:40 +0000 |
commit | 3bec79c52e613995dd3b07b119a67cd7ad3d72a8 (patch) | |
tree | f1cd7b961ac18dc1a7983cdd108f5b91bbc0cb46 /gcc/lto/Make-lang.in | |
parent | 45c384e375c0a05accdd60deaf54d0727dab9feb (diff) |
re PR lto/42776 (LTO doesn't work on non-ELF platforms.)
ChangeLog:
PR lto/42776
* configure.ac (--enable-lto): Refactor handling so libelf tests
are only performed inside then-clause of ACX_ELF_TARGET_IFELSE,
and allow LTO to be explicitly enabled on non-ELF platforms that
are known to support it inside else-clause.
* configure: Regenerate.
gcc/ChangeLog:
PR lto/42776
* configure.ac (gcc_cv_as_section_has_align): Set if installed
binutils supports extended .section directive needed by LTO, or
warn if older binutils found.
(LTO_BINARY_READER): New AC_SUBST'd variable.
(LTO_USE_LIBELF): Likewise.
* gcc/config.gcc (lto_binary_reader): New target-specific configure
variable.
* gcc/Makefile.in (LTO_BINARY_READER): Import AC_SUBST'd autoconf var.
(LTO_USE_LIBELF): Likewise.
* configure: Regenerate.
* collect2.c (is_elf): Rename from this ...
(is_elf_or_coff): ... to this, and recognize and allow i386 COFF
object files in addition to ELF-formatted ones.
(scan_prog_file): Caller updated. Also allow for LTO info marker
symbol to be prefixed or not by an extra underscore.
* config/i386/t-cygming (winnt.o): Also depend on LTO_STREAMER_H.
* config/i386/winnt.c: Also #include lto-streamer.h
(i386_pe_asm_named_section): Specify 1-byte section alignment for
LTO named sections.
(i386_pe_asm_output_aligned_decl_common): Add comment.
(i386_pe_maybe_record_exported_symbol): Allow decl arg to be NULL.
gcc/lto/ChangeLog:
PR lto/42776
* Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
hardcoding 'lto-elf.o'.
($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
* lto-coff.h: New file.
* lto-coff.c: Likewise.
gcc/testsuite/ChangeLog:
PR lto/42776
* lib/lto.exp (lto_prune_vis_warns): New function.
(lto-link-and-maybe-run): Call it.
From-SVN: r158762
Diffstat (limited to 'gcc/lto/Make-lang.in')
-rw-r--r-- | gcc/lto/Make-lang.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/lto/Make-lang.in b/gcc/lto/Make-lang.in index 33b0d9af702..a06ab4a18a5 100644 --- a/gcc/lto/Make-lang.in +++ b/gcc/lto/Make-lang.in @@ -23,7 +23,7 @@ # The name of the LTO compiler. LTO_EXE = lto1$(exeext) # The LTO-specific object files inclued in $(LTO_EXE). -LTO_OBJS = lto/lto-lang.o lto/lto.o lto/lto-elf.o attribs.o +LTO_OBJS = lto/lto-lang.o lto/lto.o lto/$(LTO_BINARY_READER).o attribs.o LTO_H = lto/lto.h $(HASHTAB_H) LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h LTO_TREE_H = lto/lto-tree.h $(LINKER_PLUGIN_API_H) @@ -73,7 +73,7 @@ lto-warn = $(STRICT_WARN) $(LTO_EXE): $(LTO_OBJS) $(BACKEND) $(LIBDEPS) $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ - $(LTO_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS) -lelf + $(LTO_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS) $(LTO_USE_LIBELF) # Dependencies lto/lto-lang.o: lto/lto-lang.c $(CONFIG_H) coretypes.h debug.h \ @@ -88,3 +88,6 @@ lto/lto.o: lto/lto.c $(CONFIG_H) $(SYSTEM_H) coretypes.h opts.h \ $(LTO_TAGS_H) $(LTO_STREAMER_H) lto/lto-elf.o: lto/lto-elf.c $(CONFIG_H) coretypes.h $(SYSTEM_H) \ toplev.h $(LTO_H) $(TM_H) $(LIBIBERTY_H) $(GGC_H) $(LTO_STREAMER_H) +lto/lto-coff.o: lto/lto-coff.c $(CONFIG_H) coretypes.h $(SYSTEM_H) \ + toplev.h $(LTO_H) $(TM_H) $(LIBIBERTY_H) $(GGC_H) $(LTO_STREAMER_H) \ + lto/lto-coff.h |