This has been in use for some time on the Darwin branches, re-tested on
x86_64-darwin21 and powerpc64le-linux, pushed to trunk.
thanks
Iain

--- >8 ---

For libgcc, we have (so far) supported building a DSO that supports
earlier versions of the OS than the target.  From macOS 11, there are
APIs that do not exist on earlier OS versions, so limit the libgcc
range to macOS11..current.

libgcc/ChangeLog:

        * config.host: From macOS 11, limit earliest macOS support
        to macOS 11.
        * config/t-darwin-min-11: New file.

Signed-off-by: Iain Sandoe <i...@sandoe.co.uk>
---
 libgcc/config.host            | 5 ++++-
 libgcc/config/t-darwin-min-11 | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 libgcc/config/t-darwin-min-11

diff --git a/libgcc/config.host b/libgcc/config.host
index 9fae51d4ce7..4fb4205478a 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -236,7 +236,10 @@ case ${host} in
   esac
   tmake_file="$tmake_file t-slibgcc-darwin"
   case ${host} in
-    *-*-darwin1[89]* | *-*-darwin2* )
+    *-*-darwin2*)
+      tmake_file="t-darwin-min-11 $tmake_file"
+      ;;
+    *-*-darwin1[89]*)
       tmake_file="t-darwin-min-8 $tmake_file"
       ;;
     *-*-darwin9* | *-*-darwin1[0-7]*)
diff --git a/libgcc/config/t-darwin-min-11 b/libgcc/config/t-darwin-min-11
new file mode 100644
index 00000000000..4009d41addb
--- /dev/null
+++ b/libgcc/config/t-darwin-min-11
@@ -0,0 +1,3 @@
+# Support building with -mmacosx-version-min back to macOS 11.
+DARWIN_MIN_LIB_VERSION = -mmacosx-version-min=11
+DARWIN_MIN_CRT_VERSION = -mmacosx-version-min=11
-- 
2.39.2 (Apple Git-143)

Reply via email to