Skip to content
Snippets Groups Projects
  1. Jan 04, 2021
  2. Jan 03, 2021
    • Mike Frysinger's avatar
      config: import pkg.m4 from pkg-config · 3335c9f9
      Mike Frysinger authored
      We use this in the sim tree currently.  Rather than require people to
      have pkg-config installed, include it in the config/ dir.
      
      config/ChangeLog:
      
      	* pkg.m4: New file from pkg-config-0.29.2.
      3335c9f9
  3. Nov 26, 2020
  4. Nov 25, 2020
    • Matthew Malcomson's avatar
      libsanitizer: mid-end: Introduce stack variable handling for HWASAN · 0854b584
      Matthew Malcomson authored
      Handling stack variables has three features.
      
      1) Ensure HWASAN required alignment for stack variables
      
      When tagging shadow memory, we need to ensure that each tag granule is
      only used by one variable at a time.
      
      This is done by ensuring that each tagged variable is aligned to the tag
      granule representation size and also ensure that the end of each
      object is aligned to ensure the start of any other data stored on the
      stack is in a different granule.
      
      This patch ensures the above by forcing the stack pointer to be aligned
      before and after allocating any stack objects. Since we are forcing
      alignment we also use `align_local_variable` to ensure this new alignment
      is advertised properly through SET_DECL_ALIGN.
      
      2) Put tags into each stack variable pointer
      
      Make sure that every pointer to a stack variable includes a tag of some
      sort on it.
      
      The way tagging works is:
        1) For every new stack frame, a random tag is generated.
        2) A base register is formed from the stack pointer value and this
           random tag.
        3) References to stack variables are now formed with RTL describing an
           offset from this base in both tag and value.
      
      The random tag generation is handled by a backend hook.  This hook
      decides whether to introduce a random tag or use the stack background
      based on the parameter hwasan-random-frame-tag.  Using the stack
      background is necessary for testing and bootstrap.  It is necessary
      during bootstrap to avoid breaking the `configure` test program for
      determining stack direction.
      
      Using the stack background means that every stack frame has the initial
      tag of zero and variables are tagged with incrementing tags from 1,
      which also makes debugging a bit easier.
      
      Backend hooks define the size of a tag, the layout of the HWASAN shadow
      memory, and handle emitting the code that inserts and extracts tags from a
      pointer.
      
      3) For each stack variable, tag and untag the shadow stack on function
         prologue and epilogue.
      
      On entry to each function we tag the relevant shadow stack region for
      each stack variable. This stack region is tagged to match the tag added to
      each pointer to that variable.
      
      This is the first patch where we use the HWASAN shadow space, so we need
      to add in the libhwasan initialisation code that creates this shadow
      memory region into the binary we produce.  This instrumentation is done
      in `compile_file`.
      
      When exiting a function we need to ensure the shadow stack for this
      function has no remaining tags.  Without clearing the shadow stack area
      for this stack frame, later function calls could get false positives
      when those later function calls check untagged areas (such as parameters
      passed on the stack) against a shadow stack area with left-over tag.
      
      Hence we ensure that the entire stack frame is cleared on function exit.
      
      config/ChangeLog:
      
      	* bootstrap-hwasan.mk: Disable random frame tags for stack-tagging
      	during bootstrap.
      
      gcc/ChangeLog:
      
      	* asan.c (struct hwasan_stack_var): New.
      	(hwasan_sanitize_p): New.
      	(hwasan_sanitize_stack_p): New.
      	(hwasan_sanitize_allocas_p): New.
      	(initialize_sanitizer_builtins): Define new builtins.
      	(ATTR_NOTHROW_LIST): New macro.
      	(hwasan_current_frame_tag): New.
      	(hwasan_frame_base): New.
      	(stack_vars_base_reg_p): New.
      	(hwasan_maybe_init_frame_base_init): New.
      	(hwasan_record_stack_var): New.
      	(hwasan_get_frame_extent): New.
      	(hwasan_increment_frame_tag): New.
      	(hwasan_record_frame_init): New.
      	(hwasan_emit_prologue): New.
      	(hwasan_emit_untag_frame): New.
      	(hwasan_finish_file): New.
      	(hwasan_truncate_to_tag_size): New.
      	* asan.h (hwasan_record_frame_init): New declaration.
      	(hwasan_record_stack_var): New declaration.
      	(hwasan_emit_prologue): New declaration.
      	(hwasan_emit_untag_frame): New declaration.
      	(hwasan_get_frame_extent): New declaration.
      	(hwasan_maybe_enit_frame_base_init): New declaration.
      	(hwasan_frame_base): New declaration.
      	(stack_vars_base_reg_p): New declaration.
      	(hwasan_current_frame_tag): New declaration.
      	(hwasan_increment_frame_tag): New declaration.
      	(hwasan_truncate_to_tag_size): New declaration.
      	(hwasan_finish_file): New declaration.
      	(hwasan_sanitize_p): New declaration.
      	(hwasan_sanitize_stack_p): New declaration.
      	(hwasan_sanitize_allocas_p): New declaration.
      	(HWASAN_TAG_SIZE): New macro.
      	(HWASAN_TAG_GRANULE_SIZE): New macro.
      	(HWASAN_STACK_BACKGROUND): New macro.
      	* builtin-types.def (BT_FN_VOID_PTR_UINT8_PTRMODE): New.
      	* builtins.def (DEF_SANITIZER_BUILTIN): Enable for HWASAN.
      	* cfgexpand.c (align_local_variable): When using hwasan ensure
      	alignment to tag granule.
      	(align_frame_offset): New.
      	(expand_one_stack_var_at): For hwasan use tag offset.
      	(expand_stack_vars): Record stack objects for hwasan.
      	(expand_one_stack_var_1): Record stack objects for hwasan.
      	(init_vars_expansion): Initialise hwasan state.
      	(expand_used_vars): Emit hwasan prologue and generate hwasan epilogue.
      	(pass_expand::execute): Emit hwasan base initialization if needed.
      	* doc/tm.texi (TARGET_MEMTAG_TAG_SIZE,TARGET_MEMTAG_GRANULE_SIZE,
      	TARGET_MEMTAG_INSERT_RANDOM_TAG,TARGET_MEMTAG_ADD_TAG,
      	TARGET_MEMTAG_SET_TAG,TARGET_MEMTAG_EXTRACT_TAG,
      	TARGET_MEMTAG_UNTAGGED_POINTER): Document new hooks.
      	* doc/tm.texi.in (TARGET_MEMTAG_TAG_SIZE,TARGET_MEMTAG_GRANULE_SIZE,
      	TARGET_MEMTAG_INSERT_RANDOM_TAG,TARGET_MEMTAG_ADD_TAG,
      	TARGET_MEMTAG_SET_TAG,TARGET_MEMTAG_EXTRACT_TAG,
      	TARGET_MEMTAG_UNTAGGED_POINTER): Document new hooks.
      	* explow.c (get_dynamic_stack_base): Take new `base` argument.
      	* explow.h (get_dynamic_stack_base): Take new `base` argument.
      	* sanitizer.def (BUILT_IN_HWASAN_INIT): New.
      	(BUILT_IN_HWASAN_TAG_MEM): New.
      	* target.def (target_memtag_tag_size,target_memtag_granule_size,
      	target_memtag_insert_random_tag,target_memtag_add_tag,
      	target_memtag_set_tag,target_memtag_extract_tag,
      	target_memtag_untagged_pointer): New hooks.
      	* targhooks.c (HWASAN_SHIFT): New.
      	(HWASAN_SHIFT_RTX): New.
      	(default_memtag_tag_size): New default hook.
      	(default_memtag_granule_size): New default hook.
      	(default_memtag_insert_random_tag): New default hook.
      	(default_memtag_add_tag): New default hook.
      	(default_memtag_set_tag): New default hook.
      	(default_memtag_extract_tag): New default hook.
      	(default_memtag_untagged_pointer): New default hook.
      	* targhooks.h (default_memtag_tag_size): New default hook.
      	(default_memtag_granule_size): New default hook.
      	(default_memtag_insert_random_tag): New default hook.
      	(default_memtag_add_tag): New default hook.
      	(default_memtag_set_tag): New default hook.
      	(default_memtag_extract_tag): New default hook.
      	(default_memtag_untagged_pointer): New default hook.
      	* toplev.c (compile_file): Call hwasan_finish_file when finished.
      0854b584
    • Matthew Malcomson's avatar
      libsanitizer: Add option to bootstrap using HWASAN · 170e618e
      Matthew Malcomson authored
      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.
      170e618e
  5. Sep 10, 2020
  6. Sep 09, 2020
    • Rainer Orth's avatar
      config: Sync largefile.m4 from binutils-gdb · 0d7d5213
      Rainer Orth authored
      The following patch improves handling of largefile support with procfs
      on 32-bit Solaris.  It has already been approved and installed for
      binutils-gdb in the thread starting at
      
      	[PATCH] Unify Solaris procfs and largefile handling
              https://sourceware.org/pipermail/gdb-patches/2020-June/169977.html
      
      I'm syncing the config/largefile.m4 part to gcc now which is the master
      for config.  Since ACX_LARGEFILE isn't used anywhere in the gcc tree,
      I'm installing it as obvious.
      
      2020-09-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
      
      	config:
      	* largefile.m4: Sync from binutils-gdb.
      0d7d5213
  7. Aug 21, 2020
  8. Aug 20, 2020
  9. Jul 31, 2020
  10. Jul 30, 2020
    • H.J. Lu's avatar
      Require CET support only for the final GCC build · 4712bde3
      H.J. Lu authored
      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.
      4712bde3
  11. May 30, 2020
  12. May 29, 2020
    • H.J. Lu's avatar
      Avoid nested save_CFLAGS and save_LDFLAGS · 9051b548
      H.J. Lu authored
      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.
      9051b548
  13. May 18, 2020
    • Jason Merrill's avatar
      bootstrap: Update requirement to C++11. · 5329b59a
      Jason Merrill authored
      There was general agreement last November that we would move to allowing
      C++11 features to be used in GCC 11; this patch implements that direction.
      
      ChangeLog
      2020-05-18  Jason Merrill  <jason@redhat.com>
      
      	* configure.ac: Update bootstrap dialect to -std=c++11.
      
      config/ChangeLog
      2020-05-18  Jason Merrill  <jason@redhat.com>
      
      	* ax_cxx_compile_stdcxx.m4: Import from autoconf archive with
      	an adjustment to try the default mode.
      
      gcc/ChangeLog
      2020-05-18  Jason Merrill  <jason@redhat.com>
      
      	* aclocal.m4: Add ax_cxx_compile_stdcxx.m4.
      	* configure.ac: Use AX_CXX_COMPILE_STDCXX(11).
      5329b59a
  14. May 15, 2020
    • H.J. Lu's avatar
      x86: Also check if -fcf-protection works · 4c1a5d8b
      H.J. Lu authored
      When defaulting CET run-time support to auto, check if -fcf-protection
      works.  Even if the stage1 GCC doesn't support -fcf-protection, since
      the final GCC does, CET run-time support will be enabled by default if
      binutils support CET.
      
      config/
      
      	PR bootstrap/95147
      	* cet.m4 (GCC_CET_FLAGS): Also check if -fcf-protection works
      	when defaulting to auto.
      
      libatomic/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libbacktrace/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libgcc/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libgfortran/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libgomp/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libitm/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libobjc/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libphobos/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libquadmath/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libsanitizer/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libssp/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libstdc++-v3/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      libvtv/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      
      zlib/
      
      	PR bootstrap/95147
      	* configure: Regenerated.
      4c1a5d8b
  15. May 14, 2020
    • H.J. Lu's avatar
      x86: Default CET run-time support to auto · 8d286dd1
      H.J. Lu authored
      CET has been added since GCC 8.  This patch defaults CET run-time support
      to auto.  It enables CET run-time support if asssembler supports CET
      instructions and multi-byte NOPs are enabled via SSE2.
      
      config/
      
      	* cet.m4 (GCC_CET_FLAGS): Change default to auto.
      
      gcc/
      
      	* configure: Regenerated.
      
      libatomic/
      
      	* configure: Regenerated.
      
      libbacktrace/
      
      	* configure: Regenerated.
      
      libcc1/
      
      	* configure: Regenerated.
      
      libcpp/
      
      	* configure: Regenerated.
      
      libdecnumber/
      
      	* configure: Regenerated.
      
      libgcc/
      
      	* configure: Regenerated.
      
      libgfortran/
      
      	* configure: Regenerated.
      
      libgomp/
      
      	* configure: Regenerated.
      
      libitm/
      
      	* configure: Regenerated.
      
      libobjc/
      
      	* configure: Regenerated.
      
      libquadmath/
      
      	* configure: Regenerated.
      
      libsanitizer/
      
      	* configure: Regenerated.
      
      libssp/
      
      	* configure: Regenerated.
      
      libstdc++-v3/
      
      	* configure: Regenerated.
      
      libvtv/
      
      	* configure: Regenerated.
      
      zlib/
      
      	* configure: Regenerated.
      8d286dd1
  16. May 12, 2020
    • H.J. Lu's avatar
      Enable CET in cross compiler if possible · d17cdc17
      H.J. Lu authored
      Don't perform CET run-time check for host when cross compiling.  Instead,
      enable CET in cross compiler if possible so that it will run on both CET
      and non-CET hosts.
      
      config/
      
      	PR bootstrap/94998
      	* cet.m4 (GCC_CET_HOST_FLAGS): Enable CET in cross compiler if
      	possible.
      
      libiberty/
      
      	PR bootstrap/94998
      	* configure: Regenerated.
      
      lto-plugin/
      
      	PR bootstrap/94998
      	* configure: Regenerated.
      d17cdc17
  17. Apr 28, 2020
    • H.J. Lu's avatar
      Check whether -fcf-protection=none -Wl,-z,ibt,-z,shstk work first · eedc73a2
      H.J. Lu authored
      GCC_CET_HOST_FLAGS uses -Wl,-z,ibt,-z,shstk to check if Linux/x86 host
      has Intel CET enabled by introducing an Intel CET violation on purpose.
      To avoid false positive, check whether -Wl,-z,ibt,-z,shstk works first.
      -fcf-protection=none is added to avoid false negative when -fcf-protection
      is enabled by default.
      
      config/
      
      	PR bootstrap/94739
      	* cet.m4 (GCC_CET_HOST_FLAGS): Add -fcf-protection=none to
      	-Wl,-z,ibt,-z,shstk.  Check whether -fcf-protection=none
      	-Wl,-z,ibt,-z,shstk works first.
      
      libiberty/
      
      	PR bootstrap/94739
      	* configure: Regenerated.
      
      lto-plugin/
      
      	PR bootstrap/94739
      	* configure: Regenerated.
      eedc73a2
  18. Apr 25, 2020
    • H.J. Lu's avatar
      Enable Intel CET in liblto_plugin.so on Intel CET enabled host · 8fc8bf80
      H.J. Lu authored
      Since ld is Intel CET enabled on Intel CET enabled host, dlopen fails on
      liblto_plugin.so if it isn't Intel CET enabled.  Add GCC_CET_HOST_FLAGS
      to cet.m4, use it in libiberty and lto-plugin to always enable Intel
      CET in liblto_plugin.so on Intel CET enabled host.
      
      On Linux/x86 host, enable Intel CET by default if assembler and compiler
      support Intel CET so that the generated liblto_plugin.so can be used on
      both CET and non-CET machines.  It is an error to disable Intel CET in
      liblto_plugin.so on Intel CET enabled host.
      
      config/
      
      	PR bootstrap/94739
      	* cet.m4 (GCC_CET_HOST_FLAGS): New.
      
      libiberty/
      
      	PR bootstrap/94739
      	* Makefile.in (COMPILE.c): Add @CET_HOST_FLAGS@.
      	(configure_deps): Add $(srcdir)/../config/cet.m4 and
      	$(srcdir)/../config/enable.m4.
      	* aclocal.m4: Include ../config/cet.m4 and ../config/enable.m4.
      	* configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
      	AC_SUBST(CET_HOST_FLAGS).
      	* configure: Regenerated.
      
      lto-plugin/
      
      	PR bootstrap/94739
      	* Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
      	* configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
      	AC_SUBST(CET_HOST_FLAGS).
      	* Makefile.in: Regenerated.
      	* aclocal.m4: Likewise.
      	* configure: Likewise.
      8fc8bf80
  19. Apr 22, 2020
    • Jakub Jelinek's avatar
      libgfortran: Provide some further math library fallbacks [PR94694] · 1868599f
      Jakub Jelinek authored
      The following patch provides some further math library fallbacks.
      fmaf can be implemented using fma if available, fma and fmal can use
      x * y + z as fallback, it is not perfect, but e.g. glibc on various arches
      has been using that as fallback for many years,
      and copysign/copysignl/fabs/fabsl can be implemented using corresponding
      __builtin_* if we make sure that gcc expands it inline instead of using
      a library call (these days it is expanded inline on most targets).
      
      2020-04-22  Jakub Jelinek  <jakub@redhat.com>
      
      	PR libfortran/94694
      	PR libfortran/94586
      	* configure.ac: Add math func checks for fmaf, fma and fmal.  Add
      	HAVE_INLINE_BUILTIN_COPYSIGN check.
      	* c99_protos.h (copysign, fmaf, fma, fmal): Provide fallback
      	prototypes.
      	(HAVE_COPYSIGN, HAVE_FMAF, HAVE_FMA, HAVE_FMAL): Define if not
      	defined and fallback version is provided.
      	* intrinsics/c99_functions.c (copysign, fmaf, fma, fmal): Provide
      	fallback implementations if possible
      	* configure: Regenerated.
      	* config.h.in: Regenerated.
      
      	* math.m4 (GCC_CHECK_MATH_INLINE_BUILTIN_FALLBACK1,
      	GCC_CHECK_MATH_INLINE_BUILTIN_FALLBACK2): New.
      1868599f
  20. Feb 12, 2020
    • Sandra Loosemore's avatar
      Use a non-empty test program to test ability to link. · 02ce382c
      Sandra Loosemore authored
      On bare-metal targets, I/O support is typically provided by a BSP and
      requires a linker script and/or hosting library to be specified on the
      linker command line.  Linking an empty program with the default linker
      script may succeed, however, which confuses libstdc++ configuration
      when programs that probe for the presence of various I/O features fail
      with link errors.
      
      2020-02-12  Sandra Loosemore  <sandra@codesourcery.com>
      
      	PR libstdc++/79193
      	PR libstdc++/88999
      
      	config/
      	* no-executables.m4: Use a non-empty program to test for linker
      	support.
      
      	libgcc/
      	* configure: Regenerated.
      
      	libgfortran/
      	* configure: Regenerated.
      
      	libiberty/
      	* configure: Regenerated.
      
      	libitm/
      	* configure: Regenerated.
      
      	libobjc/
      	* configure: Regenerated.
      
      	libquadmath/
      	* configure: Regenerated.
      
      	libssp/
      	* configure: Regenerated.
      
      	libstdc++v-3/
      	* configure: Regenerated.
      02ce382c
  21. Feb 01, 2020
    • Andrew Burgess's avatar
      Fixes after recent configure changes relating to static libraries · 20fa702b
      Andrew Burgess authored
      This commit:
      
        commit e7c26e04 (tjteru/master)
        Date:   Wed Jan 22 14:54:26 2020 +0000
      
            gcc: Add new configure options to allow static libraries to be selected
      
      contains a couple of issues.  First I failed to correctly regenerate
      all of the configure files it should have done.  Second, there was a
      mistake in lib-link.m4, one of the conditions didn't use pure sh
      syntax, I wrote this:
      
        if x$lib_type = xauto || x$lib_type = xshared; then
      
      When I should have written this:
      
        if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
      
      These issues were raised on the mailing list in these messages:
      
        https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01827.html
        https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01921.html
      
      config/ChangeLog:
      
      	* lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Update shell syntax.
      
      gcc/ChangeLog:
      
      	* configure: Regenerate.
      
      intl/ChangeLog:
      
      	* configure: Regenerate.
      
      libcpp/ChangeLog:
      
      	* configure: Regenerate.
      
      libstdc++-v3/ChangeLog:
      
      	* configure: Regenerate.
      20fa702b
  22. Jan 27, 2020
    • Andrew Burgess's avatar
      gcc: Add new configure options to allow static libraries to be selected · e7c26e04
      Andrew Burgess authored
      The motivation behind this change is to make it easier for a user to
      link against static libraries on a target where dynamic libraries are
      the default library type (for example GNU/Linux).
      
      Further, my motivation is really for linking libraries into GDB,
      however, the binutils-gdb/config/ directory is a copy of gcc/config/
      so changes for GDB need to be approved by the GCC project first.
      
      After making this change in the gcc/config/ directory I've run
      autoreconf on all of the configure scripts in the GCC tree and a
      couple have been updated, so I'll use one of these to describe what my
      change does.
      
      Consider libcpp, this library links against libiconv.  Currently if
      the user builds on a system with both static and dynamic libiconv
      installed then autotools will pick up the dynamic libiconv by
      default.  This is almost certainly the right thing to do.
      
      However, if the user wants to link against static libiconv then things
      are a little harder, they could remove the dynamic libiconv from their
      system, but this is probably a bad idea (other things might depend on
      that library), or the user can build their own version of libiconv,
      install it into a unique prefix, and then configure gcc using the
      --with-libiconv-prefix=DIR flag.  This works fine, but is somewhat
      annoying, the static library available, I just can't get autotools to
      use it.
      
      My change then adds a new flag --with-libiconv-type=TYPE, where type
      is either auto, static, or shared.  The default auto, ensures we keep
      the existing behaviour unchanged.
      
      If the user configures with --with-libiconv-type=static then the
      configure script will ignore any dynamic libiconv it finds, and will
      only look for a static libiconv, if no static libiconv is found then
      the configure will continue as though there is no libiconv at all
      available.
      
      Similarly a user can specify --with-libiconv-type=shared and force the
      use of shared libiconv, any static libiconv will be ignored.
      
      As I've implemented this change within the AC_LIB_LINKFLAGS_BODY macro
      then only libraries configured using the AC_LIB_LINKFLAGS or
      AC_LIB_HAVE_LINKFLAGS macros will gain the new configure flag.
      
      If this is accepted into GCC then there will be follow on patches for
      binutils and GDB to regenerate some configure scripts in those
      projects.
      
      For GCC only two configure scripts needed updated after this commit,
      libcpp and libstdc++-v3, both of which link against libiconv.
      
      config/ChangeLog:
      
      	* lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Add new
      	--with-libXXX-type=... option.  Use this to guide the selection of
      	either a shared library or a static library.
      
      libcpp/ChangeLog:
      
      	* configure: Regenerate.
      
      libstdc++-v3/ChangeLog:
      
      	* configure: Regenerate.
      e7c26e04
  23. Jan 24, 2020
    • Maciej W. Rozycki's avatar
      Add `--with-toolexeclibdir=' configuration option · e8e66971
      Maciej W. Rozycki authored
      Provide means, in the form of a `--with-toolexeclibdir=' configuration
      option, to override the default installation directory for target
      libraries, otherwise known as $toolexeclibdir.  This is so that it is
      possible to get newly-built libraries, particularly the shared ones,
      installed in a common place, so that they can be readily used by the
      target system as their host libraries, possibly over NFS, without a need
      to manually copy them over from the currently hardcoded location they
      would otherwise be installed in.
      
      In the presence of the `--enable-version-specific-runtime-libs' option
      and for configurations building native GCC the option is ignored.
      
      	config/
      	* toolexeclibdir.m4: New file.
      
      	gcc/
      	* doc/install.texi (Cross-Compiler-Specific Options): Document
      	`--with-toolexeclibdir' option.
      
      	libada/
      	* Makefile.in (configure_deps): Add `toolexeclibdir.m4'.
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* configure: Regenerate.
      
      	libatomic/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      	* testsuite/Makefile.in: Regenerate.
      
      	libffi/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      	* include/Makefile.in: Regenerate.
      	* man/Makefile.in: Regenerate.
      	* testsuite/Makefile.in: Regenerate.
      
      	libgcc/
      	* Makefile.in (configure_deps): Add `toolexeclibdir.m4'.
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* configure: Regenerate.
      
      	libgfortran/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      
      	libgomp/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      	* testsuite/Makefile.in: Regenerate.
      
      	libhsail-rt/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      
      	libitm/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      	* testsuite/Makefile.in: Regenerate.
      
      	libobjc/
      	* Makefile.in (aclocal_deps): Add `toolexeclibdir.m4'.
      	* aclocal.m4: Include `toolexeclibdir.m4'.
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* configure: Regenerate.
      
      	liboffloadmic/
      	* plugin/configure.ac: Handle `--with-toolexeclibdir='.
      	* plugin/Makefile.in: Regenerate.
      	* plugin/aclocal.m4: Regenerate.
      	* plugin/configure: Regenerate.
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      
      	libphobos/
      	* m4/druntime.m4: Handle `--with-toolexeclibdir='.
      	* m4/Makefile.in: Regenerate.
      	* libdruntime/Makefile.in: Regenerate.
      	* src/Makefile.in: Regenerate.
      	* testsuite/Makefile.in: Regenerate.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      
      	libquadmath/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      
      	libsanitizer/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      	* asan/Makefile.in: Regenerate.
      	* interception/Makefile.in: Regenerate.
      	* libbacktrace/Makefile.in: Regenerate.
      	* lsan/Makefile.in: Regenerate.
      	* sanitizer_common/Makefile.in: Regenerate.
      	* tsan/Makefile.in: Regenerate.
      	* ubsan/Makefile.in: Regenerate.
      
      	libssp/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      
      	libstdc++-v3/
      	* acinclude.m4: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: 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.
      	* src/c++11/Makefile.in: Regenerate.
      	* src/c++17/Makefile.in: Regenerate.
      	* src/c++98/Makefile.in: Regenerate.
      	* src/filesystem/Makefile.in: Regenerate.
      	* testsuite/Makefile.in: Regenerate.
      
      	libvtv/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      	* testsuite/Makefile.in: Regenerate.
      
      	zlib/
      	* configure.ac: Handle `--with-toolexeclibdir='.
      	* Makefile.in: Regenerate.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      e8e66971
  24. Sep 10, 2019
    • Christophe Lyon's avatar
      [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts · b1e21e5a
      Christophe Lyon authored
      The new arm-uclinuxfdpiceabi target behaves pretty much like
      arm-linux-gnueabi. In order to enable the same set of features, we
      have to update several configure scripts that generally match targets
      like *-*-linux*: in most places, we add *-uclinux* where there is
      already *-linux*, or uclinux* when there is already linux*.
      
      In gcc/config.gcc and libgcc/config.host we use *-*-uclinuxfdpiceabi
      because there is already a different behaviour for *-*uclinux* target.
      
      In libtool.m4, we use uclinuxfdpiceabi in cases where ELF shared
      libraries support is required, as uclinux does not guarantee that.
      
      2019-09-10  Christophe Lyon  <christophe.lyon@st.com>
      
      	config/
      	* futex.m4: Handle *-uclinux*.
      	* tls.m4 (GCC_CHECK_TLS): Likewise.
      
      	gcc/
      	* config.gcc: Handle *-*-uclinuxfdpiceabi.
      
      	libatomic/
      	* configure.tgt: Handle arm*-*-uclinux*.
      	* configure: Regenerate.
      
      	libgcc/
      	* config.host: Handle *-*-uclinuxfdpiceabi.
      
      	libitm/
      	* configure.tgt: Handle *-*-uclinux*.
      	* configure: Regenerate.
      
      	* libtool.m4: Handle uclinuxfdpiceabi.
      
      From-SVN: r275564
      b1e21e5a
  25. Sep 06, 2019
  26. Jul 08, 2019
    • Richard Sandiford's avatar
      Add a build config for bootstrapping at -Og · 8849d503
      Richard Sandiford authored
      Although BOOT_CFLAGS can be used to bootstrap with -Og, having a
      dedicated build config is sometimes more convenient.
      
      2019-07-08  Richard Sandiford  <richard.sandiford@arm.com>
      
      config/
      	* bootstrap-Og.mk: New file.
      
      gcc/
      	* doc/install.texi (bootstrap-Og): Document.
      
      From-SVN: r273193
      8849d503
  27. Jun 25, 2019
    • Kwok Cheung Yeung's avatar
      Create GCN-specific gthreads · 76d46331
      Kwok Cheung Yeung authored
      
      2019-06-25  Kwok Cheung Yeung  <kcy@codesourcery.com>
                  Andrew Stubbs  <ams@codesourcery.com>
      
              gcc/
      	* config.gcc (thread_file): Set to gcn for AMD GCN.
      	* config/gcn/gcn.c (gcn_emutls_var_init): New function.
      	(TARGET_EMUTLS_VAR_INIT): New hook.
      
      	config/
      	* gthr.m4 (GCC_AC_THREAD_HEADER): Add case for gcn.
      
      	libgcc/
      	* configure: Regenerate.
      	* config/gcn/gthr-gcn.h: New.
      
      Co-Authored-By: default avatarAndrew Stubbs <ams@codesourcery.com>
      
      From-SVN: r272647
      76d46331
  28. May 30, 2019
    • Rainer Orth's avatar
      Generalize getconf _NPROCESSORS_ONLN · a7155c2e
      Rainer Orth authored
      	libgomp:
      	* configure.ac: Call AX_COUNT_CPUS.
      	Substitute CPU_COUNT.
      	* testsuite/Makefile.am (check-am): Use CPU_COUNT as processor
      	count fallback.
      	* aclocal.m4: Regenerate.
      	* configure: Regenerate.
      	* Makefile.in, testsuite/Makefile.in: Regenerate.
      
      	config:
      	* ax_count_cpus.m4: New file.
      
      From-SVN: r271769
      a7155c2e
  29. May 02, 2019
    • Richard Biener's avatar
      re PR lto/85574 (LTO bootstapped binaries differ) · 5fe6af6d
      Richard Biener authored
      2019-05-02  Richard Biener  <rguenther@suse.de>
      
      	PR bootstrap/85574
      	* Makefile.tpl (compare target): Also compare extra-compare
      	files.
      	* Makefile.in: Regenerate.
      
      	config/
      	* bootstrap-lto.mk (extra-compare): Set to gcc/lto1$(exeext).
      
      From-SVN: r270798
      5fe6af6d
  30. Apr 16, 2019
  31. Apr 09, 2019
    • Martin Liska's avatar
      Come up with bootstrap-lto-lean config. · 1c67e69c
      Martin Liska authored
      2019-04-09  Martin Liska  <mliska@suse.cz>
      
      	* Makefile.in: Regenerate.
      	* Makefile.tpl: Pass GENERATOR_CFLAGS
      	in all stages.
      2019-04-09  Martin Liska  <mliska@suse.cz>
      
      	* bootstrap-lto-lean.mk: New file.
      2019-04-09  Martin Liska  <mliska@suse.cz>
      
      	* Makefile.in: Use GENERATOR_CFLAGS for all generators.
      	* doc/install.texi: Document the new config.
      
      From-SVN: r270223
      1c67e69c
  32. Mar 18, 2019
  33. Nov 07, 2018
    • Hafiz Abid Qadeer's avatar
      iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. · e9f3803d
      Hafiz Abid Qadeer authored
      2018-11-06  Hafiz Abid Qadeer  <abidh@codesourcery.com>
      
      	* config/iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.
      	Append $INCICONV to it.
      
      gcc/
      	* configure: Regenerated.
      
      libcpp/
      	* configure: Likewise.
      
      libstdc++-v3/
      	* configure: Likewise.
      
      intl/
      	* configure: Likewise.
      
      From-SVN: r265896
      e9f3803d
  34. Oct 31, 2018
    • Joseph Myers's avatar
      Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). · 22e05272
      Joseph Myers authored
      This patch updates GCC to use autoconf 2.69 and automake 1.15.1.
      (That's not the latest automake version, but it's the one used by
      binutils-gdb, with which consistency is desirable, and in any case
      seems a useful incremental update that should make a future update to
      1.16.1 easier.)
      
      The changes are generally similar to the binutils-gdb ones, and are
      copied from there where shared files and directories are involved
      (there are some further changes to such shared directories, however,
      which I'd expect to apply to binutils-gdb once this patch is in GCC).
      Largely, obsolete AC_PREREQ calls are removed, while many
      AC_LANG_SOURCE calls are added to avoid warnings from aclocal and
      autoconf.  Multilib support is no longer included in core automake,
      meaning that multilib.am needs copying from automake's contrib
      directory into the GCC source tree.  Autoconf 2.69 has Go support, so
      local copies of that support are removed.  I hope the D support will
      soon be submitted to upstream autoconf so the local copy of that can
      be removed in a future update.  Changes to how automake generates
      runtest calls mean quotes are removed from RUNTEST definitions in five
      lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm,
      libphobos, libvtv; some others have RUNTEST definitions without
      quotes, which are still OK); libgo and libphobos also get
      -Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST
      do not generate automake warnings.
      
      Note that the regeneration did not include regeneration of
      fixincludes/config.h.in (attempting such regeneration resulted in all
      the USED_FOR_TARGET conditionals disappearing; and I don't see
      anything in the fixincludes/ directory that would result in such
      conditionals being generated, unlike in the gcc/ directory).  Also
      note that libvtv/testsuite/other-tests/Makefile.in was not
      regenerated; that directory is not listed as a subdirectory for which
      Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm
      not sure how it's meant to be regenerated.
      
      While I mostly fixed warnings should running aclocal / automake /
      autoconf, there were various such warnings from automake in the
      libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos
      directories that I did not fix, preferring to leave those to the
      relevant subsystem maintainers.  Specifically, most of those warnings
      were of the following form (example from libgfortran):
      
      Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory,
      Makefile.am:48: but option 'subdir-objects' is disabled
      automake: warning: possible forward-incompatibility.
      automake: At least a source file is in a subdirectory, but the 'subdir-objects'
      automake: automake option hasn't been enabled.  For now, the corresponding output
      automake: object file(s) will be placed in the top-level directory.  However,
      automake: this behaviour will change in future Automake versions: they
      will
      automake: unconditionally cause object files to be placed in the same subdirectory
      automake: of the corresponding sources.
      automake: You are advised to start using 'subdir-objects' option throughout your
      automake: project, to avoid future incompatibilities.
      
      I think it's best for the relevant maintainers to add subdir-objects
      and do any other associated Makefile.am changes needed.  In some cases
      the paths in the warnings involved ../; I don't know if that adds any
      extra complications to the use of subdir-objects.
      
      I've tested this with native, cross and Canadian cross builds.  The
      risk of any OS-specific issues should I hope be rather lower than if a
      libtool upgrade were included (we *should* do such an upgrade at some
      point, but it's more complicated - it involves identifying all our
      local libtool changes to see if any aren't included in the upstream
      version we update to, and reverting an upstream libtool patch that's
      inappropriate for use in GCC); I think it would be better to get this
      update into GCC so that people can test in different configurations
      and we can fix any issues found, rather than to try to get more and
      more testing done before it goes in.
      
      top level:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* multilib.am: New file.  From automake.
      
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* libtool.m4: Use AC_LANG_SOURCE.
      	* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
      	* ar-lib: New file.
      	* test-driver: New file.
      	* configure: Re-generate.
      
      config:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* math.m4, tls.m4: Use AC_LANG_SOURCE.
      
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.
      
      fixincludes:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* aclocal.m4, configure: Regenerate.
      
      gcc:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
      	line for second argument of AC_DEFINE_UNQUOTED.
      	* doc/install.texi (Tools/packages necessary for modifying GCC):
      	Update to autoconf 2.69 and automake 1.15.1.
      	* aclocal.m4, config.in, configure: Regenerate.
      
      gnattools:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* configure: Regenerate.
      
      gotools:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* config/go.m4: Remove file.
      	* Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config.
      	* configure.ac:  Remove AC_PREREQ.  Do not include config/go.m4.
      	* Makefile.in, aclocal.m4, configure: Regenerate.
      
      intl:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ.
      	* configure: Re-generate.
      	* config.h.in: Re-generate.
      	* aclocal.m4: Re-generate.
      
      libada:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* configure: Regenerate.
      
      libatomic:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* acinclude.m4: Use AC_LANG_SOURCE.
      	* configure.ac: Remove AC_PREREQ.
      	* testsuite/Makefile.am (RUNTEST): Remove quotes.
      	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
      	Regenerate.
      
      libbacktrace:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
      	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
      
      libcc1:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, configure: Regenerate.
      
      libcpp:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
      	* aclocal.m4, config.in, configure: Regenerate.
      
      libdecnumber:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* configure.ac: Remove AC_PREREQ.
      	* configure: Re-generate.
      	* aclocal.m4.
      
      libffi:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	(AUTOMAKE_OPTIONS): Add info-in-builddir.
      	(CLEANFILES): Remove doc/libffi.info.
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, configure, fficonfig.h.in,
      	include/Makefile.in, man/Makefile.in, testsuite/Makefile.in:
      	Regenerate.
      
      libgcc:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
      	* configure: Regenerate.
      
      libgfortran:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
      
      libgo [logically part of this change but omitted from the commit]:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* config/go.m4: Remove file.
      	* config/libtool.m4: Use AC_LANG_SOURCE.
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use
      	-Wno-override in AM_INIT_AUTOMAKE call.
      	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
      	Regenerate.
      
      libgomp:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am
      	(AUTOMAKE_OPTIONS): Add info-in-builddir.
      	(CLEANFILES): Remove libgomp.info.
      	* configure.ac: Remove AC_PREREQ.
      	* testsuite/Makefile.am (RUNTEST): Remove quotes.
      	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
      	Regenerate.
      
      libhsail-rt:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, configure: Regenerate.
      
      libiberty:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* configure.ac: Remove AC_PREREQ.
      	* configure: Re-generate.
      	* config.in: Re-generate.
      
      libitm:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	(AUTOMAKE_OPTIONS): Add info-in-builddir.
      	(CLEANFILES): Remove libitm.info.
      	* configure.ac: Remove AC_PREREQ.
      	* testsuite/Makefile.am (RUNTEST): Remove quotes.
      	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
      	Regenerate.
      
      libobjc:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.
      	* aclocal.m4, config.h.in, configure: Regenerate.
      
      liboffloadmic:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.
      	* plugin/Makefile.am: Include multilib.am.
      	* plugin/configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, configure, plugin/Makefile.in,
      	plugin/aclocal.m4, plugin/configure: Regenerate.
      
      libphobos:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.  Use -Wno-override in
      	AM_INIT_AUTOMAKE call.
      	* m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call.
      	* m4/druntime/os.m4: Use AC_LANG_SOURCE.
      	* testsuite/Makefile.am (RUNTEST): Remove quotes.
      	* Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in,
      	src/Makefile.in, testsuite/Makefile.in: Regenerate.
      
      libquadmath:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	(AUTOMAKE_OPTIONS): Remove 1.8.  Add info-in-builddir.
      	(all-local): Define outside conditional code.
      	(CLEANFILES): Remove libquadmath.info.
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
      
      libsanitizer:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
      	* Makefile.in, aclocal.m4, asan/Makefile.in, configure,
      	interception/Makefile.in, libbacktrace/Makefile.in,
      	lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in,
      	ubsan/Makefile.in: Regenerate.
      
      libssp:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	(AUTOMAKE_OPTIONS): Remove 1.9.5.
      	* configure.ac: Remove AC_PREREQ.  Quote argument to
      	AC_RUN_IFELSE.
      	* Makefile.in, aclocal.m4, configure: Regenerate.
      
      libstdc++-v3:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.
      	* Makefile.in, aclocal.m4, configure, doc/Makefile.in,
      	include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
      	python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in,
      	src/c++17/Makefile.in, src/c++98/Makefile.in,
      	src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.
      
      libvtv:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      	* configure.ac: Remove AC_PREREQ.
      	* testsuite/Makefile.am (RUNTEST): Remove quotes.
      	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
      	Regenerate.
      
      lto-plugin:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
      	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
      
      zlib:
      2018-10-31  Joseph Myers  <joseph@codesourcery.com>
      
      	PR bootstrap/82856
      	* Makefile.am: Include multilib.am.
      
      	Merge from binutils-gdb:
      	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
      
      	* configure.ac: Modernize AC_INIT call, remove AC_PREREQ.
      	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign.
      	* Makefile.in: Re-generate.
      	* aclocal.m4: Re-generate.
      	* configure: Re-generate.
      
      From-SVN: r265695
      22e05272
  35. Oct 28, 2018
    • Iain Buclaw's avatar
      Add D front-end, libphobos library, and D2 testsuite. · b4c522fa
      Iain Buclaw authored
      ChangeLog:
      
      	* Makefile.def (target_modules): Add libphobos.
      	(flags_to_pass): Add GDC, GDCFLAGS, GDC_FOR_TARGET and
      	GDCFLAGS_FOR_TARGET.
      	(dependencies): Make libphobos depend on libatomic, libbacktrace
      	configure, and zlib configure.
      	(language): Add language d.
      	* Makefile.in: Rebuild.
      	* Makefile.tpl (BUILD_EXPORTS): Add GDC and GDCFLAGS.
      	(HOST_EXPORTS): Add GDC.
      	(POSTSTAGE1_HOST_EXPORTS): Add GDC and GDC_FOR_BUILD.
      	(BASE_TARGET_EXPORTS): Add GDC.
      	(GDC_FOR_BUILD, GDC, GDCFLAGS): New variables.
      	(GDC_FOR_TARGET, GDC_FLAGS_FOR_TARGET): New variables.
      	(EXTRA_HOST_FLAGS): Add GDC.
      	(STAGE1_FLAGS_TO_PASS): Add GDC.
      	(EXTRA_TARGET_FLAGS): Add GDC and GDCFLAGS.
      	* config-ml.in: Treat GDC and GDCFLAGS like other compiler/flag
      	environment variables.
      	* configure: Rebuild.
      	* configure.ac: Add target-libphobos to target_libraries.  Set and
      	substitute GDC_FOR_BUILD and GDC_FOR_TARGET.
      
      config/ChangeLog:
      
      	* multi.m4: Set GDC.
      
      gcc/ChangeLog:
      
      	* Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
      	(TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
      	(tm_d.h, cs-tm_d.h, default-d.o): New rules.
      	(d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
      	(s-tm-texi): Also check timestamp on d-target.def.
      	(generated_files): Add TM_D_H and d-target-hooks-def.h.
      	(build/genhooks.o): Also depend on D_TARGET_DEF.
      	* config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
      	variables.
      	* config/aarch64/aarch64-d.c: New file.
      	* config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
      	Define.
      	* config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
      	prototype.
      	* config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
      	* config/aarch64/t-aarch64 (aarch64-d.o): New rule.
      	* config/arm/arm-d.c: New file.
      	* config/arm/arm-protos.h (arm_d_target_versions): New prototype.
      	* config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
      	* config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
      	* config/arm/t-arm (arm-d.o): New rule.
      	* config/default-d.c: New file.
      	* config/glibc-d.c: New file.
      	* config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
      	* config/i386/i386-d.c: New file.
      	* config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
      	* config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
      	* config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
      	(GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
      	* config/i386/t-i386 (i386-d.o): New rule.
      	* config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
      	* config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
      	* config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
      	* config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
      	* config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
      	* config/mips/mips-d.c: New file.
      	* config/mips/mips-protos.h (mips_d_target_versions): New prototype.
      	* config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
      	* config/mips/t-mips (mips-d.o): New rule.
      	* config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
      	* config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
      	* config/powerpcspe/powerpcspe-d.c: New file.
      	* config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
      	New prototype.
      	* config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
      	Support GNU D by using 0 as the language type.
      	* config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
      	* config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
      	* config/riscv/riscv-d.c: New file.
      	* config/riscv/riscv-protos.h (riscv_d_target_versions): New
      	prototype.
      	* config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
      	* config/riscv/t-riscv (riscv-d.o): New rule.
      	* config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
      	* config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
      	* config/rs6000/rs6000-d.c: New file.
      	* config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
      	prototype.
      	* config/rs6000/rs6000.c (rs6000_output_function_epilogue):
      	Support GNU D by using 0 as the language type.
      	* config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
      	* config/rs6000/t-rs6000 (rs6000-d.o): New rule.
      	* config/s390/s390-d.c: New file.
      	* config/s390/s390-protos.h (s390_d_target_versions): New prototype.
      	* config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
      	* config/s390/t-s390 (s390-d.o): New rule.
      	* config/sparc/sparc-d.c: New file.
      	* config/sparc/sparc-protos.h (sparc_d_target_versions): New
      	prototype.
      	* config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
      	* config/sparc/t-sparc (sparc-d.o): New rule.
      	* config/t-glibc (glibc-d.o): New rule.
      	* configure: Regenerated.
      	* configure.ac (tm_d_file): New variable.
      	(tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
      	* doc/contrib.texi (Contributors): Add self for the D frontend.
      	* doc/frontends.texi (G++ and GCC): Mention D as a supported language.
      	* doc/install.texi (Configuration): Mention libphobos as an option for
      	--enable-shared.  Mention d as an option for --enable-languages.
      	(Testing): Mention check-d as a target.
      	* doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
      	name suffixes.  Mention d as a -x option.
      	* doc/sourcebuild.texi (Top Level): Mention libphobos.
      	* doc/standards.texi (Standards): Add section on D language.
      	* doc/tm.texi: Regenerated.
      	* doc/tm.texi.in: Add @node for D language and ABI, and @hook for
      	TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
      	* dwarf2out.c (is_dlang): New function.
      	(gen_compile_unit_die): Use DW_LANG_D for D.
      	(declare_in_namespace): Return module die for D, instead of adding
      	extra declarations into the namespace.
      	(gen_namespace_die): Generate DW_TAG_module for D.
      	(gen_decl_die): Handle CONST_DECLSs for D.
      	(dwarf2out_decl): Likewise.
      	(prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
      	(prune_unused_types_walk): Handle DW_tag_interface_type same as other
      	kinds of aggregates.
      	* gcc.c (default_compilers): Add entries for .d, .dd and .di.
      	* genhooks.c: Include d/d-target.def.
      
      gcc/po/ChangeLog:
      
      	* EXCLUDES: Add sources from d/dmd.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.misc-tests/help.exp: Add D to option descriptions check.
      	* gdc.dg/asan/asan.exp: New file.
      	* gdc.dg/asan/gdc272.d: New test.
      	* gdc.dg/compilable.d: New test.
      	* gdc.dg/dg.exp: New file.
      	* gdc.dg/gdc254.d: New test.
      	* gdc.dg/gdc260.d: New test.
      	* gdc.dg/gdc270a.d: New test.
      	* gdc.dg/gdc270b.d: New test.
      	* gdc.dg/gdc282.d: New test.
      	* gdc.dg/gdc283.d: New test.
      	* gdc.dg/imports/gdc170.d: New test.
      	* gdc.dg/imports/gdc231.d: New test.
      	* gdc.dg/imports/gdc239.d: New test.
      	* gdc.dg/imports/gdc241a.d: New test.
      	* gdc.dg/imports/gdc241b.d: New test.
      	* gdc.dg/imports/gdc251a.d: New test.
      	* gdc.dg/imports/gdc251b.d: New test.
      	* gdc.dg/imports/gdc253.d: New test.
      	* gdc.dg/imports/gdc254a.d: New test.
      	* gdc.dg/imports/gdc256.d: New test.
      	* gdc.dg/imports/gdc27.d: New test.
      	* gdc.dg/imports/gdcpkg256/package.d: New test.
      	* gdc.dg/imports/runnable.d: New test.
      	* gdc.dg/link.d: New test.
      	* gdc.dg/lto/lto.exp: New file.
      	* gdc.dg/lto/ltotests_0.d: New test.
      	* gdc.dg/lto/ltotests_1.d: New test.
      	* gdc.dg/runnable.d: New test.
      	* gdc.dg/simd.d: New test.
      	* gdc.test/gdc-test.exp: New file.
      	* lib/gdc-dg.exp: New file.
      	* lib/gdc.exp: New file.
      
      libphobos/ChangeLog:
      
      	* Makefile.am: New file.
      	* Makefile.in: New file.
      	* acinclude.m4: New file.
      	* aclocal.m4: New file.
      	* config.h.in: New file.
      	* configure: New file.
      	* configure.ac: New file.
      	* d_rules.am: New file.
      	* libdruntime/Makefile.am: New file.
      	* libdruntime/Makefile.in: New file.
      	* libdruntime/__entrypoint.di: New file.
      	* libdruntime/__main.di: New file.
      	* libdruntime/gcc/attribute.d: New file.
      	* libdruntime/gcc/backtrace.d: New file.
      	* libdruntime/gcc/builtins.d: New file.
      	* libdruntime/gcc/config.d.in: New file.
      	* libdruntime/gcc/deh.d: New file.
      	* libdruntime/gcc/libbacktrace.d.in: New file.
      	* libdruntime/gcc/unwind/arm.d: New file.
      	* libdruntime/gcc/unwind/arm_common.d: New file.
      	* libdruntime/gcc/unwind/c6x.d: New file.
      	* libdruntime/gcc/unwind/generic.d: New file.
      	* libdruntime/gcc/unwind/package.d: New file.
      	* libdruntime/gcc/unwind/pe.d: New file.
      	* m4/autoconf.m4: New file.
      	* m4/druntime.m4: New file.
      	* m4/druntime/cpu.m4: New file.
      	* m4/druntime/libraries.m4: New file.
      	* m4/druntime/os.m4: New file.
      	* m4/gcc_support.m4: New file.
      	* m4/gdc.m4: New file.
      	* m4/libtool.m4: New file.
      	* src/Makefile.am: New file.
      	* src/Makefile.in: New file.
      	* src/libgphobos.spec.in: New file.
      	* testsuite/Makefile.am: New file.
      	* testsuite/Makefile.in: New file.
      	* testsuite/config/default.exp: New file.
      	* testsuite/lib/libphobos-dg.exp: New file.
      	* testsuite/lib/libphobos.exp: New file.
      	* testsuite/testsuite_flags.in: New file.
      
      From-SVN: r265573
      b4c522fa
  36. Aug 27, 2018
  37. Jul 05, 2018
Loading