Commit Graph

163 Commits

Author SHA1 Message Date
GCC Administrator 325103829e Daily bump. 2022-08-02 00:16:51 +00:00
Martin Liska 5d8637208d lto: replace $target with $host in configure.ac [PR106170]
PR lto/106170

lto-plugin/ChangeLog:

	* configure.ac: Replace $target with $host.
	* configure: Regenerate.
2022-08-01 10:32:00 +02:00
GCC Administrator e0e07bc762 Daily bump. 2022-07-15 00:16:22 +00:00
Martin Liska 29f40a8047 lto-plugin: use -pthread only for detected targets
Use -pthread only if we are going to use pthread functionality.

	PR bootstrap/106156

lto-plugin/ChangeLog:

	* Makefile.am: Use ac_lto_plugin_extra_ldflags for AM_LDFLAGS.
	* configure.ac: Use AC_SUBST(ac_lto_plugin_extra_ldflags).
	* Makefile.in: Regenerate.
	* configure: Regenerate.
2022-07-14 13:26:21 +02:00
GCC Administrator 43997608a0 Daily bump. 2022-07-13 00:16:33 +00:00
Martin Liska 32a753506b lto-plugin: implement LDPT_GET_API_VERSION
include/ChangeLog:

	* plugin-api.h (enum linker_api_version): New enum.
	(ld_plugin_get_api_version): New.
	(enum ld_plugin_tag): Add LDPT_GET_API_VERSION.
	(struct ld_plugin_tv): Add tv_get_api_version.

lto-plugin/ChangeLog:

	* lto-plugin.c (negotiate_api_version): New.
	(onload): Negotiate API version.
	* Makefile.am: Add -DBASE_VERSION.
	* Makefile.in: Regenerate.
2022-07-12 15:26:57 +02:00
GCC Administrator 6345c41454 Daily bump. 2022-07-08 00:16:22 +00:00
Martin Liska d89fa97ff3 lto-plugin: use locking only for selected targets
For now, support locking only for linux targets that are different from
riscv* where the target depends on libatomic (and fails during
bootstrap).

	PR lto/106170

lto-plugin/ChangeLog:

	* configure.ac: Configure HAVE_PTHREAD_LOCKING.
	* lto-plugin.c (LOCK_SECTION): New.
	(UNLOCK_SECTION): New.
	(claim_file_handler): Use the newly added macros.
	(onload): Likewise.
	* config.h.in: Regenerate.
	* configure: Regenerate.
2022-07-07 15:18:58 +02:00
GCC Administrator ed97448899 Daily bump. 2022-07-02 00:16:26 +00:00
Pekka Seppänen 51debf7f85 lto: pass -pthread to AM_LDFLAGS [PR 106118]
Move -pthread from configure.ac to Makefile.in so that it is passed to AM_LDFLAGS.

	PR lto/106118

lto-plugin/ChangeLog:

	* configure.ac: Move -pthread from here...
	* Makefile.am: ...to here.
	* configure: Regenerate.
	* Makefile.in: Likewise.
2022-07-01 09:01:48 +02:00
GCC Administrator 9d3dd21856 Daily bump. 2022-06-28 00:16:58 +00:00
Martin Liska 2669cae081 lto-plugin: make claim_file_handler thread-safe
lto-plugin/ChangeLog:

	* lto-plugin.c (plugin_lock): New lock.
	(claim_file_handler): Use mutex for critical section.
	(onload): Initialize mutex.
	* configure.ac: Check for pthread.h.
	* configure: Regenerate.
	* config.h.in: Regenerate.
2022-06-27 10:12:08 +02:00
GCC Administrator d6ba321135 Daily bump. 2022-06-21 00:16:27 +00:00
Martin Liska c56f7983be lto-plugin: support LDPT_GET_SYMBOLS_V3
That supports skipping of an object file (LDPS_NO_SYMS).

lto-plugin/ChangeLog:

	* lto-plugin.c (struct plugin_file_info): Add skip_file flag.
	(write_resolution): Write resolution only if get_symbols != LDPS_NO_SYMS.
	(all_symbols_read_handler): Ignore file if skip_file is true.
	(onload): Handle LDPT_GET_SYMBOLS_V3.
2022-06-20 11:27:34 +02:00
GCC Administrator 3e7db51747 Daily bump. 2022-05-05 00:16:29 +00:00
Martin Liska c4ae175881 LTO plugin: modernize a bit.
include/ChangeLog:

	* plugin-api.h (enum ld_plugin_tag): Do not set implicit enum
	values.

lto-plugin/ChangeLog:

	* lto-plugin.c (struct plugin_objfile): Use bool for offset
	field.
	(exec_lto_wrapper): Assign true/false to bool variables.
	(process_offload_section): Likewise.
	(claim_file_handler): Likewise.
	(onload): Likewise.
2022-05-04 08:20:13 +02:00
GCC Administrator a2287813b1 Daily bump. 2022-03-23 00:16:45 +00:00
Jakub Jelinek 6ee5892638 lto-plugin: Use GNU ld or Solaris ld version script in preference to -export-symbols-regex [PR102426]
As reported, libtool -export-symbols-regex doesn't work on Solaris
when using GNU ld instead of Sun ld, libtool just always assumes Sun ld.
As I'm unsure what is the maintainance status of libtool right now,
this patch solves it on the lto-plugin side instead, tests at configure time
similar way how libssp and other target libraries test for symbol versioning
(except omitting the symbol version because we just want one GLOBAL symbol
and rest of them LOCAL), and will use the current way of
-export-symbols-regex onload as fallback when this doesn't work.

2022-03-22  Jakub Jelinek  <jakub@redhat.com>

	PR lto/102426
lto-plugin/
	* configure.ac (LTO_PLUGIN_USE_SYMVER, LTO_PLUGIN_USE_SYMVER_GNU,
	LTO_PLUGIN_USE_SYMVER_SUN): New test for symbol versioning support.
	* Makefile.am (version_arg, version_dep): Set conditionally based
	on LTO_PLUGIN_USE_SYMVER*.
	(liblto_plugin_la_LDFLAGS): Use $(version_arg) instead of
	-export-symbols-regex onload.
	(liblto_plugin_la_DEPENDENCIES): Depend on $(version_dep).
	* lto-plugin.map: New file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
2022-03-22 11:03:54 +01:00
GCC Administrator b00f9761b9 Daily bump. 2022-03-12 00:16:27 +00:00
Tobias Burnus db494fd68d lto-plugin: Honor link_output_name for -foffload-objects file name
lto-plugin/ChangeLog:

	* lto-plugin.c (all_symbols_read_handler): With -save-temps, use
	link_output_name for -foffload-objects's file name, if available.
2022-03-11 13:02:00 +01:00
GCC Administrator 12d4552e5e Daily bump. 2022-03-02 00:16:32 +00:00
Martin Liska 4fe0e1a45e lto-plugin: update comments - remove hardwired gold
lto-plugin/ChangeLog:

	* lto-plugin.c (process_offload_section): Use a linker as many
	comments are connected to gold linker.
	(process_option): Likewise.
2022-03-01 16:40:45 +01:00
Jakub Jelinek 7adcbafe45 Update copyright years. 2022-01-03 10:42:10 +01:00
GCC Administrator ea6ef320b0 Daily bump. 2021-12-03 00:17:04 +00:00
Rasmus Villemoes 1ea226fad1 fix spelling of -linker-output-auto-nolto-rel
The transposition nolto -> notlo is confusing and it makes the long
name even harder to read than it already is - I kept reading it as
"not lo" until I realized it was a simple typo.

Fixes: 5269b24605 (Silence warning in LTO mode on VxWorks)

lto-plugin/
	* lto-plugin.c: Fix -linker-output-auto-notlo-rel ->
	-linker-output-auto-nolto-rel typo.
	(process_option): Adjust accordingly, accepting both old and
	new spelling.

gcc/
	* config/vxworks.h (LTO_PLUGIN_SPEC): Adapt to corrected
	spelling of -linker-output-auto-nolto-rel.
2021-12-02 12:52:24 +01:00
GCC Administrator 07985c47dc Daily bump. 2021-09-14 00:16:23 +00:00
Andrew Pinski 9e58de3ce0 Fix PR lto/49664: liblto_plugin.so exports too many symbols
So right now liblto_plugin.so exports many libiberty symbols and
simple_object file symbols but really it just needs to export onload.

This fixes the problem by using "-export-symbols-regex onload" on
the libtool link line.

lto-plugin/ChangeLog:

	PR lto/49664
	* Makefile.am: Export only onload.
	* Makefile.in: Regenerate.
2021-09-13 15:16:56 +00:00
GCC Administrator 90708f87b8 Daily bump. 2021-06-26 00:16:39 +00:00
Richard Biener c6c7ac0499 add -ltrans-objects lto-plugin debug option
This adds a -ltrans-objects option to lto-plugin that by-passes
lto-wrapper invocation and instead feeds LD the final LTRANS objects
directly from the response file given as argument to the option.
This allows LD issues involving the linker-plugin path to be
debugged in an easier way with just the IR objects (their symtab)
and the LTRANS objects as testcase.

I've tested the path re-building stage2 build/genmatch from an
LTO bootstrap and got a bit-identical executable by adding
-plugin-opt=-ltrans-objects=y to the original collect2 invocation,
seeding y with the final objects as printed by building genmatch
with -save-temps -v.

2021-06-22  Richard Biener  <rguenther@suse.de>

lto-plugin/
	* lto-plugin.c (ltrans_objects): New global.
	(all_symbols_read_handler): If -ltrans-objects was specified,
	add the output files from the specified file directly.
	(process_option): Handle -ltrans-objects.
2021-06-25 08:48:52 +02:00
GCC Administrator aa891c56f2 Daily bump. 2021-05-11 00:16:36 +00:00
Martin Liska a2d7e58f4e LTO plugin: use startswith function.
lto-plugin/ChangeLog:

	* lto-plugin.c (LTO_SEGMENT_NAME): Remove.
	(LTO_SYMTAB_PREFIX): Likewise.
	(LTO_SYMTAB_PREFIX_LEN): Likewise.
	(LTO_SYMTAB_EXT_PREFIX): Likewise.
	(LTO_SYMTAB_EXT_PREFIX_LEN): Likewise.
	(LTO_LTO_PREFIX): Likewise.
	(LTO_LTO_PREFIX_LEN): Likewise.
	(OFFLOAD_SECTION): Likewise.
	(OFFLOAD_SECTION_LEN): Likewise.
	(startswith): New function.
	(all_symbols_read_handler): Use it.
	(process_symtab): Likewise.
	(process_symtab_extension): Likewise.
	(process_offload_section): Likewise.
	(process_option): Likewise.
2021-05-10 09:33:32 +02:00
GCC Administrator e690396da7 Daily bump. 2021-05-04 00:16:53 +00:00
H.J. Lu 3f57062135 GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs
Check if host supports multi-byte NOPs before enabling CET on host.

gcc/

	PR bootstrap/99703
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/99703
	* configure: Regenerated.

libcc1/

	PR bootstrap/99703
	* configure: Regenerated.

libcpp/

	PR bootstrap/99703
	* configure: Regenerated.

libdecnumber/

	PR bootstrap/99703
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/99703
	* configure: Regenerated.
2021-05-03 05:01:23 -07:00
GCC Administrator c1ef0c9234 Daily bump. 2021-04-22 00:16:32 +00:00
Martin Liska e9fc9d075f Fix clang warning (-Wstring-plus-int)
This fixes:

lto-plugin.c:642:7: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]

lto-plugin/ChangeLog:

	* lto-plugin.c (exec_lto_wrapper): Make a temp variable.
2021-04-21 16:53:39 +02:00
GCC Administrator 651b8a50a6 Daily bump. 2021-01-06 00:16:55 +00:00
Samuel Thibault f56de3557f Update GNU/Hurd configure support
ChangeLog:

	* libtool.m4: Match gnu* along other GNU systems.
	* libgo/config/libtool.m4: Match gnu* along other GNU systems.
	* libgo/configure: Re-generate.

libffi/
	* configure: Re-generate.

libgomp/
	* configure: Re-generate.

gcc/

	* configure: Re-generate.

libatomic/

	* configure: Re-generate.

libbacktrace/

	* configure: Re-generate.

libcc1/

	* configure: Re-generate.

libgfortran/

	* configure: Re-generate.

libgomp/

	* configure: Re-generate.

libhsail-rt/

	* configure: Re-generate.

libitm/

	* configure: Re-generate.

libobjc/

	* configure: Re-generate.

liboffloadmic/

	* configure: Re-generate.
	* plugin/configure: Re-generate.

libphobos/

	* configure: Re-generate.

libquadmath/

	* configure: Re-generate.

libsanitizer/

	* configure: Re-generate.

libssp/

	* configure: Re-generate.

libstdc++-v3/

	* configure: Re-generate.

libvtv/

	* configure: Re-generate.

lto-plugin/

	* configure: Re-generate.

zlib/

	* configure: Re-generate.
2021-01-05 16:04:14 -07:00
Jakub Jelinek 99dee82307 Update copyright years. 2021-01-04 10:26:59 +01:00
GCC Administrator a9625c50dd Daily bump. 2020-11-30 00:16:27 +00:00
John David Anglin 4e4ba6478a Fix hppa64-hpux11 build to remove source paths from embedded path.
This change adds the +nodefaultrpath ld option to remove all library
paths that were specified with the -L option from the embedded path.

2020-11-29  John David Anglin  <danglin@gcc.gnu.org>

ChangeLog:
	* libtool.m4 (archive_cmds): Add +nodefaultrpath ld option on
	hppa64-*-hpux11*.

libatomic/ChangeLog:
	* configure: Regenerate.

libbacktrace/ChangeLog:
	* configure: Regenerate.

libcc1/ChangeLog:
	* configure: Regenerate.

libffi/ChangeLog:
	* configure: Regenerate.

libgfortran/ChangeLog:
	* configure: Regenerate.

libgomp/ChangeLog:
	* configure: Regenerate.

libhsail-rt/ChangeLog:
	* configure: Regenerate.

libitm/ChangeLog:
	* configure: Regenerate.

libobjc/ChangeLog:
	* configure: Regenerate.

liboffloadmic/ChangeLog:
	* configure: Regenerate.
	* plugin/configure: Regenerate.

libquadmath/ChangeLog:
	* configure: Regenerate.

libsanitizer/ChangeLog:
	* configure: Regenerate.

libssp/ChangeLog:
	* configure: Regenerate.

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

libvtv/ChangeLog:
	* configure: Regenerate.

lto-plugin/ChangeLog:
	* configure: Regenerate.

zlib/ChangeLog:
	* configure: Regenerate.
2020-11-29 20:11:38 +00:00
GCC Administrator 360258daf5 Daily bump. 2020-11-26 00:16:41 +00:00
Matthew Malcomson 170e618ef5 libsanitizer: Add option to bootstrap using HWASAN
This is an analogous option to --bootstrap-asan to configure.  It allows
bootstrapping GCC using HWASAN.

For the same reasons as for ASAN we have to avoid using the HWASAN
sanitizer when compiling libiberty and the lto-plugin.

Also add a function to query whether -fsanitize=hwaddress has been
passed.

ChangeLog:

	* configure: Regenerate.
	* configure.ac: Add --bootstrap-hwasan option.

config/ChangeLog:

	* bootstrap-hwasan.mk: New file.

gcc/ChangeLog:

	* doc/install.texi: Document new option.

libiberty/ChangeLog:

	* configure: Regenerate.
	* configure.ac: Avoid using sanitizer.

lto-plugin/ChangeLog:

	* Makefile.am: Avoid using sanitizer.
	* Makefile.in: Regenerate.
2020-11-25 16:35:37 +00:00
GCC Administrator fdcc0283c6 Daily bump. 2020-09-11 00:16:28 +00:00
Jonathan Yong ae6cf62861 Cygwin/MinGW: Do not version lto plugins
GCC on Linux already uses liblto_plugin.so directly without
the libtool version suffix, adjust windows GCC to do the same.

gcc/ChangeLog:

	* config.host: Adjust plugin name for Windows.

lto-plugin/ChangeLog:

	* Makefile.am: drop versioning from libtool completely.
	* Makefile.in: regenerate.
2020-09-10 11:54:28 +00:00
GCC Administrator 80f86e78ac Daily bump. 2020-09-10 00:16:28 +00:00
Nick Clifton ad2a37157d If the lto plugin encounters a file with multiple symbol sections, each of which also has a v1 symbol extension section[1] then it will attempt to read the extension data for *every* symbol from each of the extension sections. This results in reading off the end of a buffer with the associated memory corruption that that entails. This patch fixes that problem.
2020-09-09  Nick Clifton  <nickc@redhat.com>

	* lto-plugin.c (struct plugin_symtab): Add last_sym field.
	(parse_symtab_extension): Only read as many entries as are
	available in the buffer.  Store the data read into the symbol
	table indexed from last_sym.  Increment last_sym.
2020-09-09 15:54:20 +01:00
GCC Administrator d48cca8f21 Daily bump. 2020-07-31 00:16:26 +00:00
H.J. Lu 4712bde3ca Require CET support only for the final GCC build
With --enable-cet, require CET support only for the final GCC build.
Don't enable CET without CET support for non-bootstrap build, in stage1
nor for build support.

config/

	PR bootstrap/96202
	* cet.m4 (GCC_CET_HOST_FLAGS): Don't enable CET without CET
	support in stage1 nor for build support.

gcc/

	PR bootstrap/96202
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/96202
	* configure: Regenerated.

libcc1/

	PR bootstrap/96202
	* configure: Regenerated.

libcpp/

	PR bootstrap/96202
	* configure: Regenerated.

libdecnumber/

	PR bootstrap/96202
	* configure: Regenerated.

libiberty/

	PR bootstrap/96202
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/96202
	* configure: Regenerated.
2020-07-30 05:36:24 -07:00
GCC Administrator 885ef72f27 Daily bump. 2020-05-30 00:16:27 +00:00
H.J. Lu 9051b54827 Avoid nested save_CFLAGS and save_LDFLAGS
Avoid nested save_CFLAGS and save_LDFLAGS by replacing save_CFLAGS and
save_LDFLAGS with cet_save_CFLAGS and cet_save_LDFLAGS in cet.m4.

config/

	PR bootstrap/95413
	* cet.m4: Replace save_CFLAGS and save_LDFLAGS with
	cet_save_CFLAGS and cet_save_LDFLAGS.

gcc/

	PR bootstrap/95413
	* configure: Regenerated.

libatomic/

	PR bootstrap/95413
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/95413
	* configure: Regenerated.

libcc1/

	PR bootstrap/95413
	* configure: Regenerated.

libcpp/

	PR bootstrap/95413
	* configure: Regenerated.

libdecnumber/

	PR bootstrap/95413
	* configure: Regenerated.

libgcc/

	PR bootstrap/95413
	* configure: Regenerated.

libgfortran/

	PR bootstrap/95413
	* configure: Regenerated.

libgomp/

	PR bootstrap/95413
	* configure: Regenerated.

libiberty/

	PR bootstrap/95413
	* configure: Regenerated.

libitm/

	PR bootstrap/95413
	* configure: Regenerated.

libobjc/

	PR bootstrap/95413
	* configure: Regenerated.

libphobos/

	PR bootstrap/95413
	* configure: Regenerated.

libquadmath/

	PR bootstrap/95413
	* configure: Regenerated.

libsanitizer/

	PR bootstrap/95413
	* configure: Regenerated.

libssp/

	PR bootstrap/95413
	* configure: Regenerated.

libstdc++-v3/

	PR bootstrap/95413
	* configure: Regenerated.

libvtv/

	PR bootstrap/95413
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/95413
	* configure: Regenerated.

zlib/

	PR bootstrap/95413
	* configure: Regenerated.
2020-05-29 12:56:40 -07:00