Skip to content
Snippets Groups Projects
  1. Jul 01, 2023
  2. Jun 30, 2023
    • Martin Jambor's avatar
      Regenrate lto-plugin/Makefile.in · 80f31215
      Martin Jambor authored
      Commit regenerated lto-plugin/Makefile.in in order to reflect changes
      introduction of --enable-host-pie.
      
      lto-plugin/ChangeLog:
      
      2023-06-30  Martin Jambor  <mjambor@suse.cz>
      
      	* Makefile.in: Regenerate.
      80f31215
  3. Jun 23, 2023
  4. Jun 22, 2023
    • Marek Polacek's avatar
      configure: Implement --enable-host-bind-now · 33ebb0df
      Marek Polacek authored
      As promised in the --enable-host-pie patch, this patch adds another
      configure option, --enable-host-bind-now, which adds -z now when linking
      the compiler executables in order to extend hardening.  BIND_NOW with RELRO
      allows the GOT to be marked RO; this prevents GOT modification attacks.
      
      This option does not affect linking of target libraries; you can use
      LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now to enable RELRO/BIND_NOW.
      
      With this patch:
      $ readelf -Wd cc1{,plus,obj,gm2} f951 lto1 cpp  rust1 gnat1 | grep FLAGS
       0x000000000000001e (FLAGS)              BIND_NOW
       0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
       0x000000000000001e (FLAGS)              BIND_NOW
       0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
       0x000000000000001e (FLAGS)              BIND_NOW
       0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
       0x000000000000001e (FLAGS)              BIND_NOW
       0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
       0x000000000000001e (FLAGS)              BIND_NOW
       0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
       0x000000000000001e (FLAGS)              BIND_NOW
       0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
       0x000000000000001e (FLAGS)              BIND_NOW
       0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
       0x000000000000001e (FLAGS)              BIND_NOW
       0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
       0x000000000000001e (FLAGS)              BIND_NOW
       0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
      
      c++tools/ChangeLog:
      
      	* configure.ac (--enable-host-bind-now): New check.
      	* configure: Regenerate.
      
      gcc/ChangeLog:
      
      	* configure.ac (--enable-host-bind-now): New check.  Add
      	-Wl,-z,now to LD_PICFLAG if --enable-host-bind-now.
      	* configure: Regenerate.
      	* doc/install.texi: Document --enable-host-bind-now.
      
      lto-plugin/ChangeLog:
      
      	* configure.ac (--enable-host-bind-now): New check.  Link with
      	-z,now.
      	* configure: Regenerate.
      33ebb0df
  5. May 12, 2023
  6. May 11, 2023
    • Joseph Myers's avatar
      Implement LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook [PR109128] · c49d51fa
      Joseph Myers authored
      This is one part of the fix for PR109128, along with a corresponding
      binutils's linker change.  Without this patch, what happens in the
      linker, when an unused object in a .a file has offload data, is that
      elf_link_is_defined_archive_symbol calls bfd_link_plugin_object_p,
      which ends up calling the plugin's claim_file_handler, which then
      records the object as one with offload data. That is, the linker never
      decides to use the object in the first place, but use of this _p
      interface (called as part of trying to decide whether to use the
      object) results in the plugin deciding to use its offload data (and a
      consequent mismatch in the offload data present at runtime).
      
      The new hook allows the linker plugin to distinguish calls to
      claim_file_handler that know the object is being used by the linker
      (from ldmain.c:add_archive_element), from calls that don't know it's
      being used by the linker (from elf_link_is_defined_archive_symbol); in
      the latter case, the plugin should avoid recording the object as one
      with offload data.
      
      	PR middle-end/109128
      
      	include/
      	* plugin-api.h (ld_plugin_claim_file_handler_v2)
      	(ld_plugin_register_claim_file_v2)
      	(LDPT_REGISTER_CLAIM_FILE_HOOK_V2): New.
      	(struct ld_plugin_tv): Add tv_register_claim_file_v2.
      
      	lto-plugin/
      	* lto-plugin.c (register_claim_file_v2): New.
      	(claim_file_handler_v2): New.
      	(claim_file_handler): Wrap claim_file_handler_v2.
      	(onload): Handle LDPT_REGISTER_CLAIM_FILE_HOOK_V2.
      c49d51fa
  7. Jan 16, 2023
  8. Nov 24, 2022
  9. Nov 23, 2022
    • Marek Polacek's avatar
      Revert "configure: Implement --enable-host-bind-now" · 30f399ee
      Marek Polacek authored
      This reverts commit 258d7149.
      30f399ee
    • Marek Polacek's avatar
      configure: Implement --enable-host-bind-now · 258d7149
      Marek Polacek authored
      As promised in the --enable-host-pie patch, this patch adds another
      configure option, --enable-host-bind-now, which adds -z now when linking
      the compiler executables in order to extend hardening.  BIND_NOW with RELRO
      allows the GOT to be marked RO; this prevents GOT modification attacks.
      
      This option does not affect linking of target libraries; you can use
      LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now to enable RELRO/BIND_NOW.
      
      c++tools/ChangeLog:
      
      	* configure.ac (--enable-host-bind-now): New check.
      	* configure: Regenerate.
      
      gcc/ChangeLog:
      
      	* configure.ac (--enable-host-bind-now): New check.  Add
      	-Wl,-z,now to LD_PICFLAG if --enable-host-bind-now.
      	* configure: Regenerate.
      	* doc/install.texi: Document --enable-host-bind-now.
      
      lto-plugin/ChangeLog:
      
      	* configure.ac (--enable-host-bind-now): New check.  Link with
      	-z,now.
      	* configure: Regenerate.
      258d7149
  10. Oct 13, 2022
  11. Oct 12, 2022
    • Martin Liska's avatar
      regenerate configure files · 6d2294a8
      Martin Liska authored
      Needed after a recent change.
      
      gcc/ChangeLog:
      
      	* configure: Regenerate.
      
      libatomic/ChangeLog:
      
      	* configure: Regenerate.
      
      libbacktrace/ChangeLog:
      
      	* configure: Regenerate.
      
      libcc1/ChangeLog:
      
      	* configure: Regenerate.
      
      libffi/ChangeLog:
      
      	* configure: Regenerate.
      
      libgfortran/ChangeLog:
      
      	* configure: Regenerate.
      
      libgomp/ChangeLog:
      
      	* configure: Regenerate.
      
      libitm/ChangeLog:
      
      	* configure: Regenerate.
      
      libobjc/ChangeLog:
      
      	* configure: Regenerate.
      
      liboffloadmic/ChangeLog:
      
      	* configure: Regenerate.
      	* plugin/configure: Regenerate.
      
      libphobos/ChangeLog:
      
      	* 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.
      6d2294a8
    • GCC Administrator's avatar
      Daily bump. · ab332cd7
      GCC Administrator authored
      ab332cd7
  12. Oct 11, 2022
    • Olivier Hainque's avatar
      Generic configury support for shared libs on VxWorks · 0ecd0f1c
      Olivier Hainque authored
      This change adds the configury bits to activate the build of
      shared libs on VxWorks ports configured with --enable-shared,
      for libraries variants where this is generally supported (rtp,
      code model !large - currently not compatible with -fPIC).
      
      Set lt_cv_deplibs_check_method in libtool.m4, so the build of
      libraries know how to establish dependencies.  This is useful in
      configurations such as aarch64 where proper support of LSE relies
      on accurate dependency information between libstdc++ and libgcc_s
      to begin with.
      
      Regenerate configure scripts to reflect libtool.m4 change.
      
      2022-10-09  Olivier Hainque  <hainque@adacore.com>
      
      	* libtool.m4 (*vxworks*): When enable_shared, set dynamic_linker
      	and friends for rtp !large. Assume the linker has the required
      	abilities and set lt_cv_deplibs_check_method.
      
      gcc/
      	* config.gcc (*vxworks*): Add t-slibgcc fragment
      	if enable_shared.
      
      libgcc/
      	* config.host (*vxworks*): When enable_shared, add
      	libgcc and crtstuff "shared" fragments for rtp except
      	large code model.
      	(aarch64*-wrs-vxworks7*): Remove t-slibgcc-libgcc from
      	the list of fragments.
      
      2022-10-09  Olivier Hainque  <hainque@adacore.com>
      
      gcc/
      	* configure: Regenerate.
      
      libatomic/
      	* configure: Regenerate.
      
      libbacktrace/
      	* configure: Regenerate.
      
      libcc1/
      	* configure: Regenerate.
      
      libffi/
      	* configure: Regenerate.
      
      libgfortran/
      	* configure: Regenerate.
      
      libgomp/
      	* configure: Regenerate.
      
      libitm/
      	* configure: Regenerate.
      
      libobjc/
      	* configure: Regenerate.
      
      liboffloadmic/
      	* configure: Regenerate.
      
      liboffloadmic/
      	* plugin/configure: Regenerate.
      
      libphobos/
      	* configure: Regenerate.
      
      libquadmath/
      	* configure: Regenerate.
      
      libsanitizer/
      	* configure: Regenerate.
      
      libssp/
      	* configure: Regenerate.
      
      libstdc++-v3/
      	* configure: Regenerate.
      
      libvtv/
      	* configure: Regenerate.
      
      lto-plugin/
      	* configure: Regenerate.
      
      zlib/
      	* configure: Regenerate.
      0ecd0f1c
  13. Aug 02, 2022
  14. Aug 01, 2022
  15. Jul 15, 2022
  16. Jul 14, 2022
    • Martin Liska's avatar
      lto-plugin: use -pthread only for detected targets · 29f40a80
      Martin Liska authored
      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.
      29f40a80
  17. Jul 13, 2022
  18. Jul 12, 2022
    • Martin Liska's avatar
      lto-plugin: implement LDPT_GET_API_VERSION · 32a75350
      Martin Liska authored
      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.
      32a75350
  19. Jul 08, 2022
  20. Jul 07, 2022
    • Martin Liska's avatar
      lto-plugin: use locking only for selected targets · d89fa97f
      Martin Liska authored
      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.
      d89fa97f
  21. Jul 02, 2022
  22. Jul 01, 2022
    • Pekka Seppänen's avatar
      lto: pass -pthread to AM_LDFLAGS [PR 106118] · 51debf7f
      Pekka Seppänen authored
      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.
      51debf7f
  23. Jun 28, 2022
  24. Jun 27, 2022
    • Martin Liska's avatar
      lto-plugin: make claim_file_handler thread-safe · 2669cae0
      Martin Liska authored
      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.
      2669cae0
  25. Jun 21, 2022
  26. Jun 20, 2022
    • Martin Liska's avatar
      lto-plugin: support LDPT_GET_SYMBOLS_V3 · c56f7983
      Martin Liska authored
      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.
      c56f7983
  27. May 05, 2022
  28. May 04, 2022
    • Martin Liska's avatar
      LTO plugin: modernize a bit. · c4ae1758
      Martin Liska authored
      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.
      c4ae1758
  29. Mar 23, 2022
  30. Mar 22, 2022
    • Jakub Jelinek's avatar
      lto-plugin: Use GNU ld or Solaris ld version script in preference to... · 6ee58926
      Jakub Jelinek authored
      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.
      6ee58926
  31. Mar 12, 2022
  32. Mar 11, 2022
  33. Mar 02, 2022
  34. Mar 01, 2022
  35. Jan 03, 2022
  36. Dec 03, 2021
  37. Dec 02, 2021
    • Rasmus Villemoes's avatar
      fix spelling of -linker-output-auto-nolto-rel · 1ea226fa
      Rasmus Villemoes authored
      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: 5269b246 (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.
      1ea226fa
  38. Sep 14, 2021
Loading