Commit Graph

6 Commits

Author SHA1 Message Date
Dave Korn 3bec79c52e 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
2010-04-27 02:22:40 +00:00
Janis Johnson da60b46b23 lto.exp (lto_option_list): Rename from option_list.
* lib/lto.exp (lto_option_list): Rename from option_list.
	* lib/compat.exp (compat_option_list): Rename from option_list.

From-SVN: r154477
2009-11-23 22:49:20 +00:00
H.J. Lu b31c74fe48 re PR testsuite/41913 (ERROR: tcl error sourcing gcc.dg/lto/lto.exp)
2009-11-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR testsuite/41913
	* lib/lto.exp (scan-symbol): Properly check if target exist.

From-SVN: r154296
2009-11-18 08:02:17 -08:00
H.J. Lu 5fae76b100 re PR testsuite/42001 (LTO tests fail with non multilib targets (but still not --disable-multilib ))
2009-11-11  H.J. Lu  <hongjiu.lu@intel.com>

	PR testsuite/42001
	* gcc.dg/lto/lto.exp: Pass no-mathlib to lto_init.  Call
	lto_finish at the end.

	* lib/lto.exp (lto_init): Set mathlib to " " for no-mathlib.
	(lto_finish): New. Restore mathlib.

From-SVN: r154104
2009-11-11 12:34:13 -08:00
Janis Johnson 7b25ea29a8 re PR testsuite/41659 (FAIL: gcc.dg/lto/20090914-2 c_lto_20090914-2_0.o assemble, -O0 -fwhopr)
PR testsuite/41659
	* gcc.dg/lto/20090914-2.c: Use dg-skip-if to skip test.
	* lib/lto.exp (lto-get-options-main): Report error for using "target"
	or "xfail" with dg-lto-dg.

From-SVN: r152671
2009-10-12 17:13:41 +00:00
Diego Novillo d7f09764d7 Merge lto branch into trunk.
From-SVN: r152434
2009-10-03 17:10:11 -04:00