public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1,2] Darwin : Update libtool and dependencies for Darwin20  [PR97865]
@ 2020-11-23 20:01 Iain Sandoe
  2020-11-24 10:47 ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: Iain Sandoe @ 2020-11-23 20:01 UTC (permalink / raw)
  To: GCC Patches, libstdc++; +Cc: Jeff Law, Jonathan Wakely

[-- Attachment #1: Type: text/plain, Size: 6808 bytes --]

Hi

This fixes a blocker for x86_64 darwin20 (a.k.a macOS 11)
It is needed on all open branches too.

(probably this comes under my Dariwn hat - but since it involves
  regenerating all the configure scripts… I’d welcome another pair
  of eyes)

tested on:
darwin8-darwin20, powerpc, i686, x86_64, arm64(aarch64).
aix (cfarm gcc119), aarch64 (cfarm gcc115), powerpc64 (BE) - (cfarm gcc110)
powerpc64 (LE) - (cfarm gcc135), sparc solaris 2.11 (gcc211)
x86_64-linux-gnu (cfarm gcc123)

OK for master?

OK for backports?

thanks
iain

N.B. I am attaching the second patch which is the uninteresting regenerated  
files.

=====

The change in major version (and the increment from Darwin19 to 20)
caused libtool tests to fail which resulted in incorrect build settings
for shared libraries.

We take this opportunity to sort out the shared undefined symbols state
rather than propagating the current unsound behaviour into a new rev.

This change means that we default to the case that missing symbols are
considered an error, and if one wants to allow this intentionally, the
confiuration for that case should be set appropriately.

We use intentional missing symbols to emulate the ELF behaviour when
we have a weak undefined extern.

So, three existing cases need undefined dynamic lookup:
  libitm, where there is already a configuration mechanism to add the
          flags.
  libsanitizer, likewise
  libcc1, where we add simple configuration to add the flags for Darwin.

libcc1/ChangeLog:

	PR target/97865
	* Makefile.am: Add dynamic_lookup to LD flags for Darwin.
	* configure.ac: Test for Darwin host and set a flag.

libitm/ChangeLog:

	PR target/97865
	* configure.tgt: Add dynamic_lookup to XLDFLAGS for Darwin.

libsanitizer/ChangeLog:

	PR target/97865
	* configure.tgt: Add dynamic_lookup to EXTRA_CXXFLAGS for
	Darwin.

ChangeLog:

	PR target/97865
	* libtool.m4: Update handling of Darwin platform link flags
	for Darwin20.


---
  libcc1/Makefile.am         |  3 +++
  libcc1/configure.ac        |  6 ++++++
  libitm/configure.tgt       |  9 ++++++++-
  libsanitizer/configure.tgt |  1 +
  libtool.m4                 | 32 +++++++++++++++++---------------
  5 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
index ab6f839ecae..173b84f9cdb 100644
--- a/libcc1/Makefile.am
+++ b/libcc1/Makefile.am
@@ -25,6 +25,9 @@ CPPFLAGS_FOR_C_FAMILY = -I $(srcdir)/../gcc/c-family \
  CPPFLAGS_FOR_C = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/c
  CPPFLAGS_FOR_CXX = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/cp
  AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) $(CET_HOST_FLAGS)
+if DARWIN_DYNAMIC_LOOKUP
+AM_CXXFLAGS += -Wl,-undefined,dynamic_lookup
+endif
  override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS))
  override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
  # Can be simplified when libiberty becomes a normal convenience library.
diff --git a/libcc1/configure.ac b/libcc1/configure.ac
index 8d3b8d14748..262e0a61e6f 100644
--- a/libcc1/configure.ac
+++ b/libcc1/configure.ac
@@ -104,6 +104,12 @@ AC_CACHE_CHECK([for socket libraries],  
libcc1_cv_lib_sockets,
  ])
  LIBS="$LIBS $libcc1_cv_lib_sockets"
 
+case "$host" in
+  *-*-darwin*) darwin_dynamic_lookup=yes ;;
+  *) darwin_dynamic_lookup= ;;
+esac
+AM_CONDITIONAL(DARWIN_DYNAMIC_LOOKUP, test $darwin_dynamic_lookup = yes)
+
  # If any of these functions are missing, simply don't bother building
  # this plugin.
  GCC_ENABLE_PLUGINS
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
index 04109160e91..d1beb5c9ec8 100644
--- a/libitm/configure.tgt
+++ b/libitm/configure.tgt
@@ -43,6 +43,7 @@ if test "$gcc_cv_have_tls" = yes ; then
      *-*-linux*)
  	XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
  	;;
+
    esac
  fi
 
@@ -144,10 +145,16 @@ case "${target}" in
    *-*-gnu* | *-*-k*bsd*-gnu \
    | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
    | *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
-  | *-*-darwin* | *-*-aix* | *-*-dragonfly*)
+  | *-*-aix* | *-*-dragonfly*)
  	# POSIX system.  The OS is supported.
  	;;
 
+  *-*-darwin*)
+	# The OS is supported, but we need dynamic lookup to support undefined
+	# weak symbols at link-time.
+	XLDFLAGS="${XLDFLAGS} -Wl,-undefined,dynamic_lookup"
+	;;
+
    *)	# Non-POSIX, or embedded system
  	UNSUPPORTED=1
  	;;
diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt
index ef9150209c4..f73d410dedf 100644
--- a/libsanitizer/configure.tgt
+++ b/libsanitizer/configure.tgt
@@ -64,6 +64,7 @@ case "${target}" in
  	;;
    x86_64-*-darwin2* | x86_64-*-darwin1[2-9]* | i?86-*-darwin1[2-9]*)
  	TSAN_SUPPORTED=no
+	EXTRA_CXXFLAGS+="-Wl,-undefined,dynamic_lookup"
  	;;
    x86_64-*-solaris2.11* | i?86-*-solaris2.11*)
  	;;
diff --git a/libtool.m4 b/libtool.m4
index e194e899fcf..9b14b9470df 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -994,23 +994,25 @@ _LT_EOF
          rm -f conftest.err libconftest.a conftest conftest.c
          rm -rf conftest.dSYM
      ])
-    case $host_os in
-    rhapsody* | darwin1.[[012]])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect  
to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[[012]])
        _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
        _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[[89]]*|UNSET,*-darwin[[12]][[0123456789]]*)
+	  ;;
  	10.[[012]][[,.]]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined  
${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined  
${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
      ;;
    esac
      if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -1033,7 +1035,7 @@ _LT_EOF
 
  # _LT_DARWIN_LINKER_FEATURES
  # --------------------------
-# Checks for linker and compiler features on darwin
+# Checks for linker and compiler features on darwin / macos / ios
  m4_defun([_LT_DARWIN_LINKER_FEATURES],
  [
    m4_require([_LT_REQUIRED_DARWIN_CHECKS])
-- 
2.24.1


[-- Attachment #2: 0001-Update-for-Darwin20-regenerated-files.patch --]
[-- Type: application/octet-stream, Size: 49340 bytes --]

From 7d826228292c11138b7a3decaa42c5c24806f066 Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Wed, 18 Nov 2020 15:04:52 +0000
Subject: [PATCH] Update for Darwin20 - regenerated files.

gcc/ChangeLog:

	* configure: Regenerated.

libatomic/ChangeLog:

	* configure: Regenerated.
	* testsuite/Makefile.in: Regenerated.

libbacktrace/ChangeLog:

	* configure: Regenerated.

libcc1/ChangeLog:

	* Makefile.in: Regenerated.
	* configure: Regenerated.

libffi/ChangeLog:

	* configure: Regenerated.

libgfortran/ChangeLog:

	* configure: Regenerated.

libgomp/ChangeLog:

	* configure: Regenerated.

libhsail-rt/ChangeLog:

	* configure: Regenerated.

libitm/ChangeLog:

	* configure: Regenerated.

libobjc/ChangeLog:

	* configure: Regenerated.

libphobos/ChangeLog:

	* configure: Regenerated.

libquadmath/ChangeLog:

	* configure: Regenerated.

libsanitizer/ChangeLog:

	* configure: Regenerated.

libssp/ChangeLog:

	* configure: Regenerated.

libstdc++-v3/ChangeLog:

	* configure: Regenerated.

libvtv/ChangeLog:

	* configure: Regenerated.

zlib/ChangeLog:

	* configure: Regenerated.
---
 gcc/configure                   | 34 +++++++++++----------
 libatomic/configure             | 36 +++++++++++-----------
 libatomic/testsuite/Makefile.in |  1 +
 libbacktrace/configure          | 34 +++++++++++----------
 libcc1/Makefile.in              |  6 +++-
 libcc1/configure                | 53 +++++++++++++++++++++++----------
 libffi/configure                | 34 +++++++++++----------
 libgfortran/configure           | 36 +++++++++++-----------
 libgomp/configure               | 34 +++++++++++----------
 libhsail-rt/configure           | 34 +++++++++++----------
 libitm/configure                | 36 +++++++++++-----------
 libobjc/configure               | 36 +++++++++++-----------
 libphobos/configure             | 34 +++++++++++----------
 libquadmath/configure           | 36 +++++++++++-----------
 libsanitizer/configure          | 36 +++++++++++-----------
 libssp/configure                | 36 +++++++++++-----------
 libstdc++-v3/configure          | 48 +++++++++++++++--------------
 libvtv/configure                | 36 +++++++++++-----------
 zlib/configure                  | 36 +++++++++++-----------
 19 files changed, 347 insertions(+), 289 deletions(-)

diff --git a/gcc/configure b/gcc/configure
index 3316dd72452..63a21a687bd 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -15650,23 +15650,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -19180,7 +19182,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19183 "configure"
+#line 19185 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19286,7 +19288,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19289 "configure"
+#line 19291 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libatomic/configure b/libatomic/configure
index 2acaffe441a..1cd9e9c15c6 100755
--- a/libatomic/configure
+++ b/libatomic/configure
@@ -7590,23 +7590,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -11388,7 +11390,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11391 "configure"
+#line 11393 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11494,7 +11496,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11497 "configure"
+#line 11499 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15596,7 +15598,7 @@ case "$host" in
     case "$enable_cet" in
       auto)
 	# Check if target supports multi-byte NOPs
-	# and if assembler supports CET insn.
+	# and if compiler and assembler support CET insn.
 	cet_save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fcf-protection"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff --git a/libatomic/testsuite/Makefile.in b/libatomic/testsuite/Makefile.in
index 333980ec2c1..8bc70562e5b 100644
--- a/libatomic/testsuite/Makefile.in
+++ b/libatomic/testsuite/Makefile.in
@@ -262,6 +262,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+tmake_file = @tmake_file@
 toolexecdir = @toolexecdir@
 toolexeclibdir = @toolexeclibdir@
 top_build_prefix = @top_build_prefix@
diff --git a/libbacktrace/configure b/libbacktrace/configure
index 8c8c34d45cf..90c4f954819 100755
--- a/libbacktrace/configure
+++ b/libbacktrace/configure
@@ -7986,23 +7986,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -11517,7 +11519,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11520 "configure"
+#line 11522 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11623,7 +11625,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11626 "configure"
+#line 11628 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
index 7d1cada1c09..753d435c9cb 100644
--- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in
@@ -89,10 +89,13 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
+@DARWIN_DYNAMIC_LOOKUP_TRUE@am__append_1 = -Wl,-undefined,dynamic_lookup
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+	$(top_srcdir)/../config/cet.m4 \
 	$(top_srcdir)/../config/depstand.m4 \
+	$(top_srcdir)/../config/enable.m4 \
 	$(top_srcdir)/../config/gcc-plugin.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
 	$(top_srcdir)/../config/override.m4 \
@@ -383,7 +386,8 @@ CPPFLAGS_FOR_C_FAMILY = -I $(srcdir)/../gcc/c-family \
 
 CPPFLAGS_FOR_C = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/c
 CPPFLAGS_FOR_CXX = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/cp
-AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) $(CET_HOST_FLAGS)
+AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) $(CET_HOST_FLAGS) \
+	$(am__append_1)
 # Can be simplified when libiberty becomes a normal convenience library.
 libiberty_normal = ../libiberty/libiberty.a
 libiberty_noasan = ../libiberty/noasan/libiberty.a
diff --git a/libcc1/configure b/libcc1/configure
index 3610219ba65..62610df2317 100755
--- a/libcc1/configure
+++ b/libcc1/configure
@@ -635,6 +635,8 @@ LTLIBOBJS
 LIBOBJS
 ENABLE_PLUGIN_FALSE
 ENABLE_PLUGIN_TRUE
+DARWIN_DYNAMIC_LOOKUP_FALSE
+DARWIN_DYNAMIC_LOOKUP_TRUE
 libsuffix
 GMPINC
 WERROR
@@ -7253,23 +7255,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -10783,7 +10787,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10786 "configure"
+#line 10790 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10889,7 +10893,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10892 "configure"
+#line 10896 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14970,6 +14974,19 @@ fi
 $as_echo "$libcc1_cv_lib_sockets" >&6; }
 LIBS="$LIBS $libcc1_cv_lib_sockets"
 
+case "$host" in
+  *-*-darwin*) darwin_dynamic_lookup=yes ;;
+  *) darwin_dynamic_lookup= ;;
+esac
+ if test $darwin_dynamic_lookup = yes; then
+  DARWIN_DYNAMIC_LOOKUP_TRUE=
+  DARWIN_DYNAMIC_LOOKUP_FALSE='#'
+else
+  DARWIN_DYNAMIC_LOOKUP_TRUE='#'
+  DARWIN_DYNAMIC_LOOKUP_FALSE=
+fi
+
+
 # If any of these functions are missing, simply don't bother building
 # this plugin.
 # Check for plugin support
@@ -15338,6 +15355,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${DARWIN_DYNAMIC_LOOKUP_TRUE}" && test -z "${DARWIN_DYNAMIC_LOOKUP_FALSE}"; then
+  as_fn_error $? "conditional \"DARWIN_DYNAMIC_LOOKUP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_PLUGIN_TRUE}" && test -z "${ENABLE_PLUGIN_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_PLUGIN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/libffi/configure b/libffi/configure
index f0051505d10..91810ad1660 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -7762,23 +7762,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -11561,7 +11563,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11564 "configure"
+#line 11566 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11667,7 +11669,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11670 "configure"
+#line 11672 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libgfortran/configure b/libgfortran/configure
index 99cca966021..f484a399b25 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -6017,7 +6017,7 @@ case "$host" in
     case "$enable_cet" in
       auto)
 	# Check if target supports multi-byte NOPs
-	# and if assembler supports CET insn.
+	# and if compiler and assembler support CET insn.
 	cet_save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fcf-protection"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9183,23 +9183,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -12739,7 +12741,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12742 "configure"
+#line 12744 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12845,7 +12847,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12848 "configure"
+#line 12850 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libgomp/configure b/libgomp/configure
index e48371d5093..89dfaf47521 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -7631,23 +7631,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -11429,7 +11431,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11432 "configure"
+#line 11434 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11535,7 +11537,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11538 "configure"
+#line 11540 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libhsail-rt/configure b/libhsail-rt/configure
index 49d529c8f5f..04d34d220ae 100755
--- a/libhsail-rt/configure
+++ b/libhsail-rt/configure
@@ -7442,23 +7442,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -11239,7 +11241,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11242 "configure"
+#line 11244 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11345,7 +11347,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11348 "configure"
+#line 11350 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libitm/configure b/libitm/configure
index 90965f339fc..86d9622f848 100755
--- a/libitm/configure
+++ b/libitm/configure
@@ -8265,23 +8265,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -12064,7 +12066,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12067 "configure"
+#line 12069 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12170,7 +12172,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12173 "configure"
+#line 12175 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17890,7 +17892,7 @@ case "$host" in
     case "$enable_cet" in
       auto)
 	# Check if target supports multi-byte NOPs
-	# and if assembler supports CET insn.
+	# and if compiler and assembler support CET insn.
 	cet_save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fcf-protection"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff --git a/libobjc/configure b/libobjc/configure
index c4f66880924..76042cfbf30 100755
--- a/libobjc/configure
+++ b/libobjc/configure
@@ -3466,7 +3466,7 @@ case "$host" in
     case "$enable_cet" in
       auto)
 	# Check if target supports multi-byte NOPs
-	# and if assembler supports CET insn.
+	# and if compiler and assembler support CET insn.
 	cet_save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fcf-protection"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6956,23 +6956,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -10779,7 +10781,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10782 "configure"
+#line 10784 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10885,7 +10887,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10888 "configure"
+#line 10890 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libphobos/configure b/libphobos/configure
index 6d8461febf9..c1506e537ed 100755
--- a/libphobos/configure
+++ b/libphobos/configure
@@ -8214,23 +8214,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -11744,7 +11746,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11747 "configure"
+#line 11749 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11850,7 +11852,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11853 "configure"
+#line 11855 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libquadmath/configure b/libquadmath/configure
index a28788aae8c..5323bd7a566 100755
--- a/libquadmath/configure
+++ b/libquadmath/configure
@@ -7256,23 +7256,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -10814,7 +10816,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10817 "configure"
+#line 10819 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10920,7 +10922,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10923 "configure"
+#line 10925 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13039,7 +13041,7 @@ case "$host" in
     case "$enable_cet" in
       auto)
 	# Check if target supports multi-byte NOPs
-	# and if assembler supports CET insn.
+	# and if compiler and assembler support CET insn.
 	cet_save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fcf-protection"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff --git a/libsanitizer/configure b/libsanitizer/configure
index 04eca04fbe5..2809ad6b978 100755
--- a/libsanitizer/configure
+++ b/libsanitizer/configure
@@ -8831,23 +8831,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -12361,7 +12363,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12364 "configure"
+#line 12366 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12467,7 +12469,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12470 "configure"
+#line 12472 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16862,7 +16864,7 @@ case "$host" in
     case "$enable_cet" in
       auto)
 	# Check if target supports multi-byte NOPs
-	# and if assembler supports CET insn.
+	# and if compiler and assembler support CET insn.
 	cet_save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fcf-protection"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff --git a/libssp/configure b/libssp/configure
index ff342ac6e1f..c722b87bc20 100755
--- a/libssp/configure
+++ b/libssp/configure
@@ -4338,7 +4338,7 @@ case "$host" in
     case "$enable_cet" in
       auto)
 	# Check if target supports multi-byte NOPs
-	# and if assembler supports CET insn.
+	# and if compiler and assembler support CET insn.
 	cet_save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fcf-protection"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7442,23 +7442,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -11000,7 +11002,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11003 "configure"
+#line 11005 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11106,7 +11108,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11109 "configure"
+#line 11111 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index d9ed414cc77..a989fa7b713 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -8378,23 +8378,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -12064,7 +12066,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12067 "configure"
+#line 12069 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12170,7 +12172,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12173 "configure"
+#line 12175 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15862,7 +15864,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15865 "configure"
+#line 15867 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15897,7 +15899,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15900 "configure"
+#line 15902 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15932,7 +15934,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15935 "configure"
+#line 15937 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15968,7 +15970,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15971 "configure"
+#line 15973 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -16121,7 +16123,7 @@ $as_echo "mutex" >&6; }
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 16124 "configure"
+#line 16126 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -16163,7 +16165,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 16166 "configure"
+#line 16168 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -16197,7 +16199,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 16200 "configure"
+#line 16202 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
diff --git a/libvtv/configure b/libvtv/configure
index b796e0197d5..fb14d9ead7d 100755
--- a/libvtv/configure
+++ b/libvtv/configure
@@ -8732,23 +8732,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -12262,7 +12264,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12265 "configure"
+#line 12267 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12368,7 +12370,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12371 "configure"
+#line 12373 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15680,7 +15682,7 @@ case "$host" in
     case "$enable_cet" in
       auto)
 	# Check if target supports multi-byte NOPs
-	# and if assembler supports CET insn.
+	# and if compiler and assembler support CET insn.
 	cet_save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fcf-protection"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff --git a/zlib/configure b/zlib/configure
index f9a2689e05c..0008350eaac 100755
--- a/zlib/configure
+++ b/zlib/configure
@@ -4169,7 +4169,7 @@ case "$host" in
     case "$enable_cet" in
       auto)
 	# Check if target supports multi-byte NOPs
-	# and if assembler supports CET insn.
+	# and if compiler and assembler support CET insn.
 	cet_save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fcf-protection"
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6918,23 +6918,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement
+      # target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+	UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+	  ;;
 	10.[012][,.]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+	  ;;
+	*)
+	  ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -10743,7 +10745,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10746 "configure"
+#line 10748 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10849,7 +10851,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10852 "configure"
+#line 10854 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
-- 
2.24.1


[-- Attachment #3: Type: text/plain, Size: 2 bytes --]




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1,2] Darwin : Update libtool and dependencies for Darwin20 [PR97865]
  2020-11-23 20:01 [PATCH 1,2] Darwin : Update libtool and dependencies for Darwin20 [PR97865] Iain Sandoe
@ 2020-11-24 10:47 ` Jonathan Wakely
  2020-12-02 16:11   ` [PATCH 1, 2] " Iain Sandoe
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Wakely @ 2020-11-24 10:47 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: GCC Patches, libstdc++, Jeff Law

On 23/11/20 20:01 +0000, Iain Sandoe wrote:
>Hi
>
>This fixes a blocker for x86_64 darwin20 (a.k.a macOS 11)
>It is needed on all open branches too.
>
>(probably this comes under my Dariwn hat - but since it involves
> regenerating all the configure scripts… I’d welcome another pair
> of eyes)
>
>tested on:
>darwin8-darwin20, powerpc, i686, x86_64, arm64(aarch64).
>aix (cfarm gcc119), aarch64 (cfarm gcc115), powerpc64 (BE) - (cfarm gcc110)
>powerpc64 (LE) - (cfarm gcc135), sparc solaris 2.11 (gcc211)
>x86_64-linux-gnu (cfarm gcc123)
>
>OK for master?
>
>OK for backports?
>
>thanks
>iain
>
>N.B. I am attaching the second patch which is the uninteresting 
>regenerated files.
>
>=====
>
>The change in major version (and the increment from Darwin19 to 20)
>caused libtool tests to fail which resulted in incorrect build settings
>for shared libraries.
>
>We take this opportunity to sort out the shared undefined symbols state
>rather than propagating the current unsound behaviour into a new rev.
>
>This change means that we default to the case that missing symbols are
>considered an error, and if one wants to allow this intentionally, the
>confiuration for that case should be set appropriately.
>
>We use intentional missing symbols to emulate the ELF behaviour when
>we have a weak undefined extern.
>
>So, three existing cases need undefined dynamic lookup:
> libitm, where there is already a configuration mechanism to add the
>         flags.
> libsanitizer, likewise
> libcc1, where we add simple configuration to add the flags for Darwin.
>
>libcc1/ChangeLog:
>
>	PR target/97865
>	* Makefile.am: Add dynamic_lookup to LD flags for Darwin.
>	* configure.ac: Test for Darwin host and set a flag.
>
>libitm/ChangeLog:
>
>	PR target/97865
>	* configure.tgt: Add dynamic_lookup to XLDFLAGS for Darwin.
>
>libsanitizer/ChangeLog:
>
>	PR target/97865
>	* configure.tgt: Add dynamic_lookup to EXTRA_CXXFLAGS for
>	Darwin.
>
>ChangeLog:
>
>	PR target/97865
>	* libtool.m4: Update handling of Darwin platform link flags
>	for Darwin20.
>
>
>---
> libcc1/Makefile.am         |  3 +++
> libcc1/configure.ac        |  6 ++++++
> libitm/configure.tgt       |  9 ++++++++-
> libsanitizer/configure.tgt |  1 +
> libtool.m4                 | 32 +++++++++++++++++---------------
> 5 files changed, 35 insertions(+), 16 deletions(-)
>
>diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
>index ab6f839ecae..173b84f9cdb 100644
>--- a/libcc1/Makefile.am
>+++ b/libcc1/Makefile.am
>@@ -25,6 +25,9 @@ CPPFLAGS_FOR_C_FAMILY = -I $(srcdir)/../gcc/c-family \
> CPPFLAGS_FOR_C = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/c
> CPPFLAGS_FOR_CXX = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/cp
> AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) $(CET_HOST_FLAGS)
>+if DARWIN_DYNAMIC_LOOKUP
>+AM_CXXFLAGS += -Wl,-undefined,dynamic_lookup
>+endif
> override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS))
> override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
> # Can be simplified when libiberty becomes a normal convenience library.
>diff --git a/libcc1/configure.ac b/libcc1/configure.ac
>index 8d3b8d14748..262e0a61e6f 100644
>--- a/libcc1/configure.ac
>+++ b/libcc1/configure.ac
>@@ -104,6 +104,12 @@ AC_CACHE_CHECK([for socket libraries], 
>libcc1_cv_lib_sockets,
> ])
> LIBS="$LIBS $libcc1_cv_lib_sockets"
>
>+case "$host" in
>+  *-*-darwin*) darwin_dynamic_lookup=yes ;;
>+  *) darwin_dynamic_lookup= ;;
>+esac
>+AM_CONDITIONAL(DARWIN_DYNAMIC_LOOKUP, test $darwin_dynamic_lookup = yes)
>+
> # If any of these functions are missing, simply don't bother building
> # this plugin.
> GCC_ENABLE_PLUGINS
>diff --git a/libitm/configure.tgt b/libitm/configure.tgt
>index 04109160e91..d1beb5c9ec8 100644
>--- a/libitm/configure.tgt
>+++ b/libitm/configure.tgt
>@@ -43,6 +43,7 @@ if test "$gcc_cv_have_tls" = yes ; then
>     *-*-linux*)
> 	XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
> 	;;
>+
>   esac
> fi
>
>@@ -144,10 +145,16 @@ case "${target}" in
>   *-*-gnu* | *-*-k*bsd*-gnu \
>   | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
>   | *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
>-  | *-*-darwin* | *-*-aix* | *-*-dragonfly*)
>+  | *-*-aix* | *-*-dragonfly*)
> 	# POSIX system.  The OS is supported.
> 	;;
>
>+  *-*-darwin*)
>+	# The OS is supported, but we need dynamic lookup to support undefined
>+	# weak symbols at link-time.
>+	XLDFLAGS="${XLDFLAGS} -Wl,-undefined,dynamic_lookup"
>+	;;
>+
>   *)	# Non-POSIX, or embedded system
> 	UNSUPPORTED=1
> 	;;
>diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt
>index ef9150209c4..f73d410dedf 100644
>--- a/libsanitizer/configure.tgt
>+++ b/libsanitizer/configure.tgt
>@@ -64,6 +64,7 @@ case "${target}" in
> 	;;
>   x86_64-*-darwin2* | x86_64-*-darwin1[2-9]* | i?86-*-darwin1[2-9]*)
> 	TSAN_SUPPORTED=no
>+	EXTRA_CXXFLAGS+="-Wl,-undefined,dynamic_lookup"
> 	;;
>   x86_64-*-solaris2.11* | i?86-*-solaris2.11*)
> 	;;
>diff --git a/libtool.m4 b/libtool.m4
>index e194e899fcf..9b14b9470df 100644
>--- a/libtool.m4
>+++ b/libtool.m4
>@@ -994,23 +994,25 @@ _LT_EOF
>         rm -f conftest.err libconftest.a conftest conftest.c
>         rm -rf conftest.dSYM
>     ])
>-    case $host_os in
>-    rhapsody* | darwin1.[[012]])
>+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not 
>expect to
>+    # build without first building modern cctools / linker.
>+    case $host_cpu-$host_os in
>+    *-rhapsody* | *-darwin1.[[012]])
>       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
>-    darwin1.*)
>+    *-darwin1.*)
>       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
>-    darwin*) # darwin 5.x on
>-      # if running on 10.5 or later, the deployment target defaults
>-      # to the OS version, if on x86, and 10.4, the deployment
>-      # target defaults to 10.4. Don't you love it?
>-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
>-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
>-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
>+    *-darwin*)
>+      # darwin 5.x (macoS 10.5) onwards we only adjust when the deployement

Typos "macoS" and "deployement".

Apart from that, I have no comment on it because darwin versioning
twists my melon.

The regenerated configure for libstdc++ is OK.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1, 2] Darwin : Update libtool and dependencies for Darwin20 [PR97865]
  2020-11-24 10:47 ` Jonathan Wakely
@ 2020-12-02 16:11   ` Iain Sandoe
  2020-12-18 19:28     ` [committed] libcc1: Fix up libcc1 configure [PR98330] Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: Iain Sandoe @ 2020-12-02 16:11 UTC (permalink / raw)
  To: GCC Patches, libstdc++

given that this is a blocker for Darwin20 and is Darwin-local I plan to
apply it (with the spello fixes) if there are no more comments in the next
24h.

thanks
Iain

Jonathan Wakely <jwakely@redhat.com> wrote:

> On 23/11/20 20:01 +0000, Iain Sandoe wrote:
>> Hi
>>
>> This fixes a blocker for x86_64 darwin20 (a.k.a macOS 11)
>> It is needed on all open branches too.
>>
>> (probably this comes under my Dariwn hat - but since it involves
>> regenerating all the configure scripts… I’d welcome another pair
>> of eyes)
>>
>> tested on:
>> darwin8-darwin20, powerpc, i686, x86_64, arm64(aarch64).
>> aix (cfarm gcc119), aarch64 (cfarm gcc115), powerpc64 (BE) - (cfarm  
>> gcc110)
>> powerpc64 (LE) - (cfarm gcc135), sparc solaris 2.11 (gcc211)
>> x86_64-linux-gnu (cfarm gcc123)
>>
>> OK for master?
>>
>> OK for backports?
>>
>> thanks
>> iain
>>
>> N.B. I am attaching the second patch which is the uninteresting  
>> regenerated files.
>>
>> =====
>>
>> The change in major version (and the increment from Darwin19 to 20)
>> caused libtool tests to fail which resulted in incorrect build settings
>> for shared libraries.
>>
>> We take this opportunity to sort out the shared undefined symbols state
>> rather than propagating the current unsound behaviour into a new rev.
>>
>> This change means that we default to the case that missing symbols are
>> considered an error, and if one wants to allow this intentionally, the
>> confiuration for that case should be set appropriately.
>>
>> We use intentional missing symbols to emulate the ELF behaviour when
>> we have a weak undefined extern.
>>
>> So, three existing cases need undefined dynamic lookup:
>> libitm, where there is already a configuration mechanism to add the
>>        flags.
>> libsanitizer, likewise
>> libcc1, where we add simple configuration to add the flags for Darwin.
>>
>> libcc1/ChangeLog:
>>
>> 	PR target/97865
>> 	* Makefile.am: Add dynamic_lookup to LD flags for Darwin.
>> 	* configure.ac: Test for Darwin host and set a flag.
>>
>> libitm/ChangeLog:
>>
>> 	PR target/97865
>> 	* configure.tgt: Add dynamic_lookup to XLDFLAGS for Darwin.
>>
>> libsanitizer/ChangeLog:
>>
>> 	PR target/97865
>> 	* configure.tgt: Add dynamic_lookup to EXTRA_CXXFLAGS for
>> 	Darwin.
>>
>> ChangeLog:
>>
>> 	PR target/97865
>> 	* libtool.m4: Update handling of Darwin platform link flags
>> 	for Darwin20.
>>
>>
>> ---
>> libcc1/Makefile.am         |  3 +++
>> libcc1/configure.ac        |  6 ++++++
>> libitm/configure.tgt       |  9 ++++++++-
>> libsanitizer/configure.tgt |  1 +
>> libtool.m4                 | 32 +++++++++++++++++---------------
>> 5 files changed, 35 insertions(+), 16 deletions(-)
>>
>> diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
>> index ab6f839ecae..173b84f9cdb 100644
>> --- a/libcc1/Makefile.am
>> +++ b/libcc1/Makefile.am
>> @@ -25,6 +25,9 @@ CPPFLAGS_FOR_C_FAMILY = -I $(srcdir)/../gcc/c-family \
>> CPPFLAGS_FOR_C = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/c
>> CPPFLAGS_FOR_CXX = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/cp
>> AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) $(CET_HOST_FLAGS)
>> +if DARWIN_DYNAMIC_LOOKUP
>> +AM_CXXFLAGS += -Wl,-undefined,dynamic_lookup
>> +endif
>> override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS))
>> override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
>> # Can be simplified when libiberty becomes a normal convenience library.
>> diff --git a/libcc1/configure.ac b/libcc1/configure.ac
>> index 8d3b8d14748..262e0a61e6f 100644
>> --- a/libcc1/configure.ac
>> +++ b/libcc1/configure.ac
>> @@ -104,6 +104,12 @@ AC_CACHE_CHECK([for socket libraries],  
>> libcc1_cv_lib_sockets,
>> ])
>> LIBS="$LIBS $libcc1_cv_lib_sockets"
>>
>> +case "$host" in
>> +  *-*-darwin*) darwin_dynamic_lookup=yes ;;
>> +  *) darwin_dynamic_lookup= ;;
>> +esac
>> +AM_CONDITIONAL(DARWIN_DYNAMIC_LOOKUP, test $darwin_dynamic_lookup = yes)
>> +
>> # If any of these functions are missing, simply don't bother building
>> # this plugin.
>> GCC_ENABLE_PLUGINS
>> diff --git a/libitm/configure.tgt b/libitm/configure.tgt
>> index 04109160e91..d1beb5c9ec8 100644
>> --- a/libitm/configure.tgt
>> +++ b/libitm/configure.tgt
>> @@ -43,6 +43,7 @@ if test "$gcc_cv_have_tls" = yes ; then
>>    *-*-linux*)
>> 	XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
>> 	;;
>> +
>>  esac
>> fi
>>
>> @@ -144,10 +145,16 @@ case "${target}" in
>>  *-*-gnu* | *-*-k*bsd*-gnu \
>>  | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
>>  | *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
>> -  | *-*-darwin* | *-*-aix* | *-*-dragonfly*)
>> +  | *-*-aix* | *-*-dragonfly*)
>> 	# POSIX system.  The OS is supported.
>> 	;;
>>
>> +  *-*-darwin*)
>> +	# The OS is supported, but we need dynamic lookup to support undefined
>> +	# weak symbols at link-time.
>> +	XLDFLAGS="${XLDFLAGS} -Wl,-undefined,dynamic_lookup"
>> +	;;
>> +
>>  *)	# Non-POSIX, or embedded system
>> 	UNSUPPORTED=1
>> 	;;
>> diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt
>> index ef9150209c4..f73d410dedf 100644
>> --- a/libsanitizer/configure.tgt
>> +++ b/libsanitizer/configure.tgt
>> @@ -64,6 +64,7 @@ case "${target}" in
>> 	;;
>>  x86_64-*-darwin2* | x86_64-*-darwin1[2-9]* | i?86-*-darwin1[2-9]*)
>> 	TSAN_SUPPORTED=no
>> +	EXTRA_CXXFLAGS+="-Wl,-undefined,dynamic_lookup"
>> 	;;
>>  x86_64-*-solaris2.11* | i?86-*-solaris2.11*)
>> 	;;
>> diff --git a/libtool.m4 b/libtool.m4
>> index e194e899fcf..9b14b9470df 100644
>> --- a/libtool.m4
>> +++ b/libtool.m4
>> @@ -994,23 +994,25 @@ _LT_EOF
>>        rm -f conftest.err libconftest.a conftest conftest.c
>>        rm -rf conftest.dSYM
>>    ])
>> -    case $host_os in
>> -    rhapsody* | darwin1.[[012]])
>> +    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not  
>> expect to
>> +    # build without first building modern cctools / linker.
>> +    case $host_cpu-$host_os in
>> +    *-rhapsody* | *-darwin1.[[012]])
>>      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
>> -    darwin1.*)
>> +    *-darwin1.*)
>>      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
>> -    darwin*) # darwin 5.x on
>> -      # if running on 10.5 or later, the deployment target defaults
>> -      # to the OS version, if on x86, and 10.4, the deployment
>> -      # target defaults to 10.4. Don't you love it?
>> -      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
>> -	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
>> -	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
>> +    *-darwin*)
>> +      # darwin 5.x (macoS 10.5) onwards we only adjust when the  
>> deployement
>
> Typos "macoS" and "deployement".
>
> Apart from that, I have no comment on it because darwin versioning
> twists my melon.
>
> The regenerated configure for libstdc++ is OK.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [committed] libcc1: Fix up libcc1 configure [PR98330]
  2020-12-02 16:11   ` [PATCH 1, 2] " Iain Sandoe
@ 2020-12-18 19:28     ` Jakub Jelinek
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Jelinek @ 2020-12-18 19:28 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: GCC Patches

On Wed, Dec 02, 2020 at 04:11:24PM +0000, Iain Sandoe wrote:
> > > --- a/libcc1/configure.ac
> > > +++ b/libcc1/configure.ac
> > > @@ -104,6 +104,12 @@ AC_CACHE_CHECK([for socket libraries],
> > > libcc1_cv_lib_sockets,
> > > ])
> > > LIBS="$LIBS $libcc1_cv_lib_sockets"
> > > 
> > > +case "$host" in
> > > +  *-*-darwin*) darwin_dynamic_lookup=yes ;;
> > > +  *) darwin_dynamic_lookup= ;;
> > > +esac
> > > +AM_CONDITIONAL(DARWIN_DYNAMIC_LOOKUP, test $darwin_dynamic_lookup = yes)

Either we should write test x$darwin_dynamic_lookup = xyes
or we should make sure the variable is always defined to non-empty string.

The following patch does the latter, committed to trunk as obvious.

2020-12-18  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/98380
	* configure.ac: Set darwin_dynamic_lookup=no instead to empty
	string.
	* configure: Regenerated.

--- libcc1/configure.ac.jj	2020-12-06 10:51:32.555577671 +0100
+++ libcc1/configure.ac	2020-12-18 20:18:22.615201701 +0100
@@ -106,7 +106,7 @@ LIBS="$LIBS $libcc1_cv_lib_sockets"
 
 case "$host" in
   *-*-darwin*) darwin_dynamic_lookup=yes ;;
-  *) darwin_dynamic_lookup= ;;
+  *) darwin_dynamic_lookup=no ;;
 esac
 AM_CONDITIONAL(DARWIN_DYNAMIC_LOOKUP, test $darwin_dynamic_lookup = yes)
 
--- libcc1/configure.jj	2020-12-06 10:51:32.555577671 +0100
+++ libcc1/configure	2020-12-18 20:18:30.373121348 +0100
@@ -14976,7 +14976,7 @@ LIBS="$LIBS $libcc1_cv_lib_sockets"
 
 case "$host" in
   *-*-darwin*) darwin_dynamic_lookup=yes ;;
-  *) darwin_dynamic_lookup= ;;
+  *) darwin_dynamic_lookup=no ;;
 esac
  if test $darwin_dynamic_lookup = yes; then
   DARWIN_DYNAMIC_LOOKUP_TRUE=

	Jakub


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-18 19:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 20:01 [PATCH 1,2] Darwin : Update libtool and dependencies for Darwin20 [PR97865] Iain Sandoe
2020-11-24 10:47 ` Jonathan Wakely
2020-12-02 16:11   ` [PATCH 1, 2] " Iain Sandoe
2020-12-18 19:28     ` [committed] libcc1: Fix up libcc1 configure [PR98330] Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).