Commit Graph

74 Commits

Author SHA1 Message Date
Rainer Orth
a2555c65a0 Check for -static-libgcc before use (PR lto/60981)
PR lto/60981
	* configure.ac: Check for -static-libgcc.
	* configure: Regenerate.

From-SVN: r210465
2014-05-15 09:52:37 +00:00
Jakub Jelinek
4f148bbc73 re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan))
PR sanitizer/56781
lto-plugin/
	* Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address.
	(liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS,
	liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a
	over ../libiberty/pic/libiberty.a if the former exists.
	* Makefile.in: Regenerated.
libiberty/
	* maint-tool: Also emit rule for noasan/ subdirectory.
	* configure.ac (NOASANFLAG): Set and substitute.
	* Makefile.in: Regenerated.
	(NOASANFLAG): Set.
	(all, $(TARGETLIB), mostlyclean): Handle noasan subdir like pic
	subdir.
	(stamp-noasandir): New goal.
	* configure: Regenerated.

From-SVN: r209476
2014-04-17 14:25:25 +02:00
Jakub Jelinek
ffe7f7a75f re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan))
PR sanitizer/56781
	* libtool-ldflags: Also prefix -static-lib*, -shared-lib*
	and -B* options with -Xcompiler.
lto-plugin/
	* Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
	* Makefile.in: Regenerated.

From-SVN: r209475
2014-04-17 14:23:28 +02:00
Richard Biener
21b624f069 lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin is set in COLLECT_GCC_OPTIONS.
2014-04-02  Richard Biener  <rguenther@suse.de>

	* lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin
	is set in COLLECT_GCC_OPTIONS.

From-SVN: r209011
2014-04-02 08:25:13 +00:00
Richard Biener
2486c24a8c simple-object.c (simple_object_internal_read): Handle EINTR and short reads.
2014-03-28  Richard Biener  <rguenther@suse.de>

	libiberty/
	* simple-object.c (simple_object_internal_read): Handle
	EINTR and short reads.

	lto-plugin/
	* lto-plugin.c (process_symtab): Handle EINTR and short reads.

From-SVN: r208898
2014-03-28 14:05:49 +00:00
Rainer Orth
5523efdf24 Fix Solaris bootstrap with GNU ld/LTO
* configure.ac (ac_lto_plugin_ldflags): Set to -Wc,-static-libgcc
	for gcc.
	* configure: Regenerate.
	* Makefile.am (AM_LDFLAGS): New variable.
	(liblto_plugin_la_LDFLAGS): Add it.
	* Makefile.in: Regenerate.

From-SVN: r208614
2014-03-17 13:04:12 +00:00
Gerald Pfeifer
ecdbd01aa1 Fix up ChangeLog entries (name, e-mail, formatting, otherwise).
From-SVN: r203992
2013-10-23 21:30:54 +00:00
Alan Modra
3cbe17f7de libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical ppc host match.
* libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
	ppc host match.  Support little-endian powerpc linux hosts.
Regenerate configure throughout.

From-SVN: r202773
2013-09-20 19:17:52 +09:30
David Edelsohn
de973ab7b7 * configure: Regenerated.
From-SVN: r191331
2012-09-14 19:42:24 -04:00
Joseph Myers
3f417959fd * lto-plugin.c: Fix typo.
From-SVN: r187982
2012-05-29 20:21:25 +01:00
H.J. Lu
e6d5f8c9c4 Regenerate configure files for libtool.m4 change
boehm-gc/

	* configure: Regenerated.

gcc/

	* configure: Regenerated.

libatomic/

	* configure: Regenerated.

libffi/

	* configure: Regenerated.

libgfortran/

	* configure: Regenerated.

libgomp/

	* configure: Regenerated.

libitm/

	* configure: Regenerated.

libjava/classpath/

	* configure: Regenerated.

libjava/

	* configure: Regenerated.

libmudflap/

	* configure: Regenerated.

libobjc/

	* configure: Regenerated.

libquadmath/

	* configure: Regenerated.

libssp/

	* configure: Regenerated.

libstdc++-v3/

	* configure: Regenerated.

lto-plugin/

	* configure: Regenerated.

zlib/

	* configure: Regenerated.

From-SVN: r187616
2012-05-16 15:11:18 -07:00
Kai Tietz
8cfa78994a re PR lto/50616 (lto1.exe: internal compiler error: invalid resolution in the resolution file)
PR lto/50616
        * lto-plugin.c (PRI_LL): New macro.
        (dump_symtab): Use PRI_LL instead of ll in print.
        (process_symtab): Use PRI_LL instead of ll in scan.

From-SVN: r184462
2012-02-22 11:19:22 +01:00
Andreas Schwab
4a5e00ca50 warnings.m4 (ACX_PROG_CC_WARNING_OPTS): Avoid leading dash in expr call.
config/:
	* warnings.m4 (ACX_PROG_CC_WARNING_OPTS): Avoid leading dash in
	expr call.
fixincludes/:
	* configure: Regenerate.
gcc/:
	* configure: Regenerate.
libcpp/:
	* configure: Regenerate.
libdecnumber/:
	* configure: Regenerate.
libiberty/:
	* configure: Regenerate.
lto-plugin/:
	* configure: Regenerate.

From-SVN: r182546
2011-12-20 16:54:12 +00:00
Andreas Schwab
095af58f2c Check for warning flags without no- prefix
config/:
	PR bootstrap/51388
	* warnings.m4 (ACX_PROG_CC_WARNING_OPTS)
	(ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Run the test without the
	no- prefix.
fixincludes/:
	* configure: Regenerate.
gcc/:
	* configure: Regenerate.
libcpp/:
	* configure: Regenerate.
libdecnumber/:
	* configure: Regenerate.
libiberty/:
	* configure: Regenerate.
lto-plugin/:
	* configure: Regenerate.

From-SVN: r182478
2011-12-19 13:12:26 +00:00
Andreas Tobler
c6084f681e Additional fixes for FreeBSD-10 build:
/:			* libtool.m4: Additional FreeBSD 10 fixes.

boehm-gc/:		* configure: Regenerate.
gcc/:			* configure: Regenerate.
libffi/:		* configure: Regenerate.
libgfortran/:		* configure: Regenerate.
libgomp/:		* configure: Regenerate.
libitm/:		* configure: Regenerate.
libjava/:		* configure.ac: Fix some more FreeBSD 10 issues..
			* configure: Regenerate.
libjava/libltdl/:	* acinclude.m4: Additional FreeBSD 10 fixes.
			* configure: Regenerate.
libmudflap/:		* configure: Regenerate.
libobjc/:		* configure: Regenerate.
libquadmath/:		* configure: Regenerate.
libssp/:		* configure: Regenerate.
libstdc++-v3/:		* configure: Regenerate.
lto-plugin/:		* configure: Regenerate.
zlib/:			* configure: Regenerate.

From-SVN: r181593
2011-11-21 20:22:35 +01:00
Jan Hubicka
ed0d2da02b re PR lto/47247 (Linker plugin specification makes it difficult to handle COMDATs)
PR lto/47247
	* lto-plugin.c (get_symbols_v2): New variable.
	(write_resolution): Use V2 API when available.
	(onload): Handle LDPT_GET_SYMBOLS_V2.

	* lto-symtab.c (lto_symtab_resolve_symbols): Do not resolve
	when resolution is already availbale from plugin.
	(lto_symtab_merge_decls_1): Handle LDPR_PREVAILING_DEF_IRONLY_EXP.
	* cgraph.c (ld_plugin_symbol_resolution): Add prevailing_def_ironly_exp.
	* lto-cgraph.c (LDPR_NUM_KNOWN): Update.
	* ipa.c (varpool_externally_visible_p): IRONLY variables are never
	externally visible.
	* varasm.c (resolution_to_local_definition_p): Add
	LDPR_PREVAILING_DEF_IRONLY_EXP.
	(resolution_local_p): Likewise.

	* common.c (lto_resolution_str): Add new resolution.
	* common.h (lto_resolution_str): Likewise.

From-SVN: r179424
2011-10-02 10:41:24 +00:00
H.J. Lu
ad7715f324 Use 64bit integer for LTO symbol ID.
gcc/lto

2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
	    Andi Kleen  <ak@linux.intel.com>

	PR lto/50568
	* lto.c (lto_splay_tree_delete_id): New.
	(lto_splay_tree_compare_ids): Likewise.
	(lto_splay_tree_lookup): Likewise.
	(lto_splay_tree_id_equal_p): Likewise.
	(lto_splay_tree_insert): Likewise.
	(lto_splay_tree_new): Likewise.
	(lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
	Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
	(create_subid_section_table): Use lto_splay_tree_lookup and
	lto_splay_tree_insert.
	(lto_file_read): Use lto_splay_tree_new.

lto-plugin/

2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
	    Andi Kleen  <ak@linux.intel.com>

	PR lto/50568
	* lto-plugin.c (sym_aux): Change id to unsigned long long.
	(plugin_symtab): Likewise.
	(dump_symtab): Likewise.
	(resolve_conflicts): Likewise.
	(process_symtab): Likewise.

Co-Authored-By: Andi Kleen <ak@linux.intel.com>

From-SVN: r179395
2011-09-30 08:48:51 -07:00
Richard Guenther
f3016c478e re PR bootstrap/49907 (lto-plugin -Wall in stage1)
2011-08-10  Richard Guenther  <rguenther@suse.de>

	PR bootstrap/49907
	lto-plugin/
	* configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
	* Makefile.am (AM_CFLAGS): Adjust.  Do not build with -Werror.
	* configure: Regenerate.
	* Makefile.in: Likewise.
	* aclocal.m4: Likewise.

From-SVN: r177614
2011-08-10 08:48:37 +00:00
Jim Meyering
046957830e remove useless if-before-free tests
Change "if (E) free (E);" to "free (E);" everywhere except in the
libgo/, intl/, zlib/ and classpath/ directories.
Also transform equivalent variants like
"if (E != NULL) free (E);" and allow an extra cast on the
argument to free.  Otherwise, the tested and freed "E"
expressions must be identical, modulo white space.

From-SVN: r172785
2011-04-20 18:19:03 +00:00
Richard Guenther
3b8c1a3f49 re PR lto/48431 (patch to fix a compile error in lto-plugin.c when using older C compilers)
2011-04-05  Richard Guenther  <rguenther@suse.de>

	PR bootstrap/48431
	* lto-plugin.c (claim_file_handler): Do not declare vars in code.

From-SVN: r171982
2011-04-05 12:11:08 +00:00
Ralf Wildenhues
029c8f3e77 Remove freebsd1 from libtool.m4 macros and config.rpath.
/:
	Import from Libtool and gnulib:

	2011-01-27  Gerald Pfeifer  <gerald@pfeifer.com>

	Prepare for supporting FreeBSD 10.
	* config.rpath: Remove handling of freebsd1* which soon would
	match FreeBSD 10.0.

	2011-01-20  Gerald Pfeifer  <gerald@pfeifer.com>  (tiny change)

	Remove support for FreeBSD 1.x.
	* libtool.m4 (_LT_LINKER_SHLIBS)
	(_LT_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which
	soon would incorrectly match FreeBSD 10.0.

boehm-gc/:
	* configure: Regenerate.

gcc/:
	* configure: Regenerate.

libffi/:
	* configure: Regenerate.

libgfortran/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* configure: Likewise.

libgo/:
	* config/libtool.m4: (_LT_LINKER_SHLIBS)
	(_LT_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which
	soon would incorrectly match FreeBSD 10.0.
	* configure: Regenerate.

libgomp/:
	* configure: Regenerate.

libjava/:
	* configure: Regenerate.
	* shlibpath.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Remove handling
	of freebsd1* which soon would incorrectly match FreeBSD 10.0.

libjava/classpath/:
	* config.rpath, ltcf-c.sh, ltcf-gcj.sh, ltconfig: Remove
	handling of freebsd1* which soon would match FreeBSD 10.0.
	* configure: Regenerate.

libjava/libltdl/:
	* acinclude.m4 (AC_LIBTOOL_PROG_LD_SHLIBS)
	(AC_LIBTOOL_SYS_DYNAMIC_LINKER): Remove handling
	of freebsd1* which soon would incorrectly match FreeBSD 10.0.
	* configure: Regenerate.

libmudflap/:
	* configure: Regenerate.

libobjc/:
	* configure: Regenerate.

libquadmath/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* configure: Likewise.

libssp/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* configure: Likewise.

libstdc++-v3/:
	* configure: Regenerate.

lto-plugin/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

zlib/:
	* configure: Regenerate.

From-SVN: r170106
2011-02-13 11:45:53 +00:00
Ralf Wildenhues
3917813c64 Fix minor build system issues in lto-plugin.
lto-plugin/:
	* Makefile.am (all-local): Rename from 'all'.
	(gcc_build_dir): Use $(host_subdir).
	* Makefile.in: Regenerate.

From-SVN: r170075
2011-02-12 15:48:15 +00:00
Alexandre Oliva
f3d533d3b5 re PR lto/47225 (cross-compile fails while configuring libgcc with "xgcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found")
ChangeLog:
PR lto/47225
* Makefile.def (lto-plugin): Double dash for enable-shared.
(configure-gcc): Depend on all-lto-plugin.
* Makefile.in: Rebuilt.
lto-plugin/ChangeLog:
PR lto/47225
* Makefile.am (gcc_build_dir, in_gcc_libs): New.
(liblto_plugin_la_LDFLAGS): Add -module.
(copy_lto_plugin): Renamed to...
($(in_gcc_libs)): ... this.  Add mkinstalldirs.  Skip copying
of static modules.
* Makefile.in: Rebuild.
gcc/ChangeLog:
PR lto/47225
* configure.ac (gcc_cv_lto_plugin): Test for liblto_plugin.la
in the current directory.
* configure: Rebuilt.

From-SVN: r170070
2011-02-12 12:02:24 +00:00
Kai Tietz
f43c39352e re PR lto/47225 (cross-compile fails while configuring libgcc with "xgcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found")
2011-02-07  Kai Tietz  <kai.tietz@onevision.com>

        PR lto/47225
        * Makefile.am (Wc): New helper for encoding -Wc,.
        (liblto_plugin_la_LIBADD): Use Wc for libiberty library.
        (liblto_plugin_la_DEPENDENCIES): Special case pic libiberty.
        * Makefile.in: Regenerated.

From-SVN: r169900
2011-02-07 21:32:17 +01:00
Paolo Bonzini
e6d926d7d3 revert r169877 patch for PR47225
From-SVN: r169878
2011-02-07 10:26:48 +00:00
Kai Tietz
c7b5125d1f re PR lto/47225 (cross-compile fails while configuring libgcc with "xgcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found")
2011-02-07  Kai Tietz  <kai.tietz@onevision.com>

        PR lto/47225
        * Makefile.am (Wl): New helper for encoding -Wl,.
        (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
        * Makefile.in: Regenerated.

From-SVN: r169877
2011-02-07 09:20:56 +01:00
Ian Lance Taylor
e3bb089d5f lto-plugin.c (gold_version): New static variable.
* lto-plugin.c (gold_version): New static variable.
	(all_symbols_read_handler): Don't check pass_through_items if
	using gold 1.11 or later.
	(onload): Set gold_version if we see LDPT_GOLD_VERSION.

From-SVN: r169237
2011-01-25 15:29:02 +00:00
Richard Guenther
47782a9d27 re PR lto/47264 (Many tests fail with -flto due unaligned load in lto-plugin.c)
2011-01-12  Richard Guenther  <rguenther@suse.de>

	PR lto/47264
	* lto-plugin.c (parse_table_entry): Use memcpy to access
	unaligned fields.

From-SVN: r168708
2011-01-12 12:04:39 +00:00
Dave Korn
5b64bab91c Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.
* Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.
	* Makefile.in: Regenerate.

From-SVN: r168087
2010-12-20 17:03:10 +00:00
Rainer Orth
be3ea0c8c9 Revert last change.
From-SVN: r167859
2010-12-15 16:56:26 +00:00
Rainer Orth
dd8587d668 Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
* Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
	(liblto_plugin_la_LIBADD): Use -L../libiberty/pic -liberty.
	(liblto_plugin_la_LDFLAGS): Use -L../libiberty -liberty.
	* Makefile.in: Regenerate.

From-SVN: r167850
2010-12-15 10:29:01 +00:00
Dave Korn
77754180a9 re PR middle-end/46674 (Weak alias is mistakenly optimized away)
gcc/ChangeLog:

	PR middle-end/46674
	PR lto/43157
	* target.def (mangle_assembler_name): New target asm_out hook.
	* targhooks.c (default_mangle_assembler_name): Add default hook
	implementation.
	* targhooks.h (default_mangle_assembler_name): Add prototype.
	* lto-symtab.c (lto_symtab_register_decl): Use new hook when
	processing DECL_ASSEMBLER_NAMEs for lto symtabs.
	(lto_symtab_get_resolution): Likewise.
	(lto_cgraph_replace_node): Likewise.
	(lto_symtab_prevailing_decl): Likewise.
	* lto-streamer-out.c (write_symbol): Likewise.
	* doc/tm.texi.in (TARGET_MANGLE_ASSEMBLER_NAME): Add @hook directive.
	* doc/tm.texi: Regenerate.
	* config/i386/cygming.h (TARGET_MANGLE_ASSEMBLER_NAME): Define to
	point at i386_pe_mangle_assembler_name.
	* config/i386/winnt.c (i386_pe_mangle_assembler_name): New function.
	* config/i386/i386-protos.h (i386_pe_mangle_assembler_name): Add
	prototype.

lto-plugin/ChangeLog:

	PR middle-end/46674
	PR lto/43157
	* configure.ac (SYM_STYLE): Don't AC_DEFINE.
	* lto-plugin.c (sym_style): Don't use it; default to ss_none.
	* configure: Regenerate.
	* config.h.in: Likewise.

gcc/testsuite/ChangeLog:

	PR middle-end/46674
	PR lto/43157
	* gcc.dg/pr43157.c: New file.

From-SVN: r167688
2010-12-10 14:28:58 +00:00
Dave Korn
7de6ba7a0b re PR target/40125 (libgcc_s DLL installed in wrong directory in cross toolchain)
config/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* lthostflags.m4: New file.
	(ACX_LT_HOST_FLAGS): Define.

libgfortran/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* Makefile.am (LTLDFLAGS): Use lt_host_flags.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

libgomp/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* Makefile.am (libgomp_la_LDFLAGS): Use lt_host_flags.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* configure.host (libgcj_sublib_ltflags): Use lt_host_flags.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libobjc/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac (extra_ldflags_libobjc): Invoke ACX_LT_HOST_FLAGS.
	* Makefile.in (lt_host_flags): Import AC_SUBST'd value.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libquadmath/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* Makefile.am (libquadmath_la_LDFLAGS): Use lt_host_flags.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

libssp/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* Makefile.am (libssp_la_LDFLAGS): Use lt_host_flags.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

libstdc++-v3/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* configure.host (OPT_LDFLAGS): Use lt_host_flags for cygming.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

lto-plugin/ChangeLog:

2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR target/40125
	PR lto/46695
	* configure.ac: Invoke ACX_LT_HOST_FLAGS.
	* Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but
	override -bindir setting.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

From-SVN: r167480
2010-12-06 00:50:04 +00:00
Kai Tietz
ec692d5f10 config.h.in: Regenerated.
2010-12-05  Kai Tietz  <kai.tietz@onevision.com>

        * config.h.in: Regenerated.
        * configure: Regenerated.
        * configure.ac (AC_CHECK_HEADERS): Replaced by AC_HEADER_SYS_WAIT.
        * lto-plugin.c (WIFEXITED): Define default.
        (WEXITSTATUS): Likeiwse.

From-SVN: r167468
2010-12-05 09:06:25 +01:00
Kai Tietz
a2254c5d78 config.h.in: Regenerated.
2010-12-01  Kai Tietz  <kai.tietz@onevision.com>

        * config.h.in: Regenerated.
        * configure: Regenerated.
        * Makefile.in: Regenerated.
        * configure.ac (AC_CHECK_HEADERS): Check for sys/wait.h.
        * lto-plugin.c:  Include sys/wait.h conditionally.
        * aclocal.m4: Regenerated.

From-SVN: r167343
2010-12-01 17:57:47 +01:00
Kai Tietz
44538c626c lto-plugin.c (add_output_files): Fix memory leak.
2010-11-13  Kai Tietz  <kai.tietz@onevision.com>

        * lto-plugin.c (add_output_files): Fix memory leak.

From-SVN: r166718
2010-11-13 19:49:07 +01:00
Dave Korn
d19e0f01a1 re PR bootstrap/46397 (lto-plugin.c does not build on Solaris 10/SPARC)
PR bootstrap/46397
	PR bootstrap/46362
	* configure.ac: Add AC_TYPE_INT64_T test.
	* config.h.in: Regenerate.
	* configure: Likewise.
	* lto-plugin.c (debug): Use char not bool.
	(nop): Likewise.
	(check_1): Rename from check, and use int not bool for gate argument.
	(check): Macro wrapper for the above to coerce gate argument into
	boolean-valued integer in case it has pointer type.
	(parse_table_entry): Use 0 not false.
	(claim_file_handler): Avoid use of PRIx64 by splitting 64-bit size
	into two 32-bit parts and printing as hex ints.

From-SVN: r166601
2010-11-11 13:33:59 +00:00
Dave Korn
37da368856 re PR lto/46291 (Failed to bootstrap-lto)
PR lto/46291
	* lto-plugin.c (claim_file_handler): Don't close file descriptor.

From-SVN: r166285
2010-11-03 23:13:51 +00:00
Dave Korn
48215350c2 re PR lto/46273 (Failed to bootstrap)
ChangeLog:

2010-11-03  Ian Lance Taylor  <iant@google.com>
	    Dave Korn  <dave.korn.cygwin@gmail.com>

	PR lto/46273
	* configure.ac: Remove libelf tests.  Build lto-plugin on ELF always
	and on other supported platforms whenever LTO is enabled.
	* configure: Rebuild.

gcc/ChangeLog:

2010-11-03  Ian Lance Taylor  <iant@google.com>

	PR lto/46273
	* gcc/config.gcc: Don't set lto_binary_reader.
	* doc/install.texi (Prerequisites): Remove libelf paragraphs.
	(Configuration): Mention --disable-lto.  Remove --with-libelf
	paragraph.

lto-plugin/ChangeLog:

2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>

	PR lto/46273
	* lto-plugin.h: Delete.
	* lto-plugin-elf.c: Likewise.
	* lto-plugin-coff.c: Likewise.
	* configure.ac: Don't use libelf, don't source config.gcc.
	(LIBELFLIBS): Delete.
	(LIBELFINC): Delete.
	(LTO_FORMAT): Delete.
	(SYM_STYLE): Add AC_DEFINE var, set based on $target.
	(config.h): Add AC_CONFIG_HEADERS directive.
	* Makefile.am (LIBELFLIBS): Delete.
	(LIBELFINC): Delete.
	(LTO_FORMAT): Delete.
	(DEFS): Import.
	(AM_CPPFLAGS): Use it.  Don't use LIBELFINC.
	(liblto_plugin_la_SOURCES): Don't use LTO_FORMAT, don't include
	any object-format-specific source file in the link.
	(liblto_plugin_la_LIBADD): Don't use LIBELFLIBS.
	* config.h.in: Generate.
	* configure: Regenerate.
	* Makefile.in: Likewise.
	* lto-plugin.c (O_BINARY): Definition moved here from lto-plugin.h.
	(LTO_SEGMENT_NAME): New definition.
	(LTO_SECTION_PREFIX): Definition moved here from lto-plugin.h.
	(LTO_SECTION_PREFIX_LEN): New definition.
	(struct sym_aux): Struct definition moved here from lto-plugin.h.
	(struct plugin_symtab): Likewise.
	(struct plugin_objfile): Likewise.
	(struct plugin_objfile): New struct def.
	(enum symbol_style): New enum type.
	(add_symbols): Make static.
	(claimed_files): Likewise.
	(num_claimed_files): Likewise.
	(sym_style): New global.
	(check): Make static.
	(parse_table_entry): Likewise.  Respect sym_style when extracting
	symbol from symtab entry.
	(translate): Make static.
	(resolve_conflicts): Likewise.
	(process_symtab): New function, per-section callback version of
	old object-format-specific handling from deleted lto-plugin-elf.c.
	(claim_file_handler): Convert ELF-specific version from deleted
	lto-plugin-elf.c to simple_object interface and move here.
	(process_options): Allow new '-sym-style=' option.
	(onload): Don't call deleted onload_format_checks hook.

From-SVN: r166233
2010-11-03 09:14:32 +00:00
Kai Tietz
9df2493c38 lto-plugin.c (dump_symtab): Correct printf argument type.
2010-10-11  Kai Tietz  <kai.tietz@onevision.com>

        * lto-plugin.c (dump_symtab): Correct printf argument type.
        (finish_conflict_resolution): Initialize resolution.

From-SVN: r165310
2010-10-11 16:14:54 +02:00
H.J. Lu
73d5e77082 Add AC_CANONICAL_SYSTEM to configure.ac.
2010-10-08  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/45951
	* configure.ac: Add AC_CANONICAL_SYSTEM.
	* configure: Regenerated.

From-SVN: r165214
2010-10-08 22:06:21 -07:00
Dave Korn
1cd0b7167e 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
2010-10-07 20:28:59 +00:00
Andi Kleen
d2c57fe97e lto-plugin.c: Include <hashtab.h>
* lto-plugin.c: Include <hashtab.h>
        (sym_aux): Add next_conflict field to save conflict chains.
        (plugin_file_info): Add conflicts symtab.
        (parse_table_entry): Initialize aux->next_conflict.
        (process_symtab): Increment found.
        (dump_symtab): Add.
        (finish_conflict_resolution): Add.
        (free_symtab): Add.
        (write_resolution): Remove symbols loop and move into
        dump_symtab. Call dump_symtab for main symbol and conflicts table.
        Call free_symtab to free conflicts table.
        (SWAP): Add.
        (eq_sym): Add.
        (hash_sym): Add.
        (symbol_strength): Add.
        (resolve_conflicts): Add.
        (claim_file_handler): Add n variable. Check return value of
        process_symtab. Call resolve_conflicts.

From-SVN: r162915
2010-08-05 14:25:45 +00:00
Andi Kleen
90e26247ab Add Changelog too
From-SVN: r162631
2010-07-28 14:05:59 +00:00
Andi Kleen
ba4141f488 lto-plugin.c (translate): Remove debug fprintf.
* lto-plugin.c (translate): Remove debug fprintf.

From-SVN: r162630
2010-07-28 14:05:39 +00:00
H.J. Lu
9477ccb2b1 Cast to unsigned long.
2010-07-23  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/45042
	* lto-plugin.c (translate): Cast to unsigned long.

From-SVN: r162465
2010-07-23 07:37:21 -07:00
Andi Kleen
73ce4d1ed6 re PR lto/44992 (ld -r breaks LTO)
gcc:

2010-07-10   Andi Kleen <ak@linux.intel.com>

        PR lto/44992
        * lto-opts.c (lto_write_options): Add NULL file_data argument to 
	lto_get_section_name.
	* lto-section-out.c (lto_destroy_simple_output_block): Likewise.
	* lto-streamer-out.c (produce_asm): Likewise.
	(copy_function): Likewise.
	(produce_symtab): Likewise.
	(produce_asm_for_decls): Likewise.
	* lto-streamer.c (lto_get_section_name): Add file_data argument.	
	Rewrite to add random postfix to LTO sections.
	* lto-streamer.h (lto_file_decl_data): Add next, id, resolutions.
	(lto_get_section_name): Add file_data argument to prototype.
	

lto:

2010-07-10   Andi Kleen <ak@linux.intel.com>

        PR lto/44992
        * lto.c: Include splay-tree.h
	(lto_resolution_read): Change to walk file_ids tree and parse
	extra file_id in resolution file.
	(lto_section_with_id): Add.
	(create_subid_section_table): Add.
	(lwstate): Add.
	(lto_create_files_from_ids): Add.
	(lto_file_read): Change to handle sub file ids and create list
	of file_datas. Add output argument for count.
	(get_section_data): Pass file_data to lto_get_section_name.
	(lto_flatten_file): Add.
	(read_cgraph_and_symbols): Handle linked lists of file_datas.
	
lto-plugin:

2010-07-10   Andi Kleen <ak@linux.intel.com>

        PR lto/44992
        * lto-plugin.c (sym_aux): Add.
	(plugin_symtab): Remove slots. Add aux and id.
	(parse_table_entry): Change to use aux instead of slots.
	(LTO_SECTION_PREFIX): Add.
	(translate): Improve buffer allocation. Change to append
	symbols to existing out buffer.
	(get_section): Remove.
	(process_symtab): Add. 
	(free_2): Free symtab->aux.
	(write_resolution): Handle aux instead of slots.
	Print sub id to resolution file.
	(claim_file_handler): Clear lto_file. Replace get_symtab/translate
	calls with call to process_symtab.

From-SVN: r162443
2010-07-23 05:33:51 +00:00
Richard Guenther
553fc58230 Makefile.am: New copy_lto_plugin rule to install the plugin into ../gcc.
2010-07-22  Richard Guenther  <rguenther@suse.de>

	lto-plugin/
	* Makefile.am: New copy_lto_plugin rule to install the plugin
	into ../gcc.
	* Makefile.in: Regenerated.

From-SVN: r162412
2010-07-22 12:50:00 +00:00
Richard Guenther
bdc89f9eff lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
2010-05-21  Richard Guenther  <rguenther@suse.de>

	* lto-plugin.c (write_resolution): Do not assert syms is non-NULL.

From-SVN: r159676
2010-05-21 16:08:28 +00:00
Richard Guenther
5cd0e96b0e re PR lto/43857 (-fresolution causes an ICE)
2010-05-07  Richard Guenther <rguenther@suse.de>

	* gcc.c (LINK_COMMAND_SPEC): Provide a resolution file to
	the linker plugin.
	(store_arg): Queue temp_filename for deletion instead of
	the whole argument.

	lto/
	PR lto/43857
	PR lto/43371
	* lang.opt (fresolution): Change to ...
	(fresolution=): ... this.
	* lto-lang.c (lto_handle_option): Adjust.

	lto-plugin/
	* lto-plugin.c (free_2): Do not free resolution_file.
	(write_resolution): Check that we were passed a resolution file.
	(all_symbols_read_handler): Adjust.
	(cleanup_handler): Do not remove the resolution file.
	(process_option): Handle -fresolution=.

From-SVN: r159159
2010-05-07 15:53:40 +00:00