diff --git a/gcc/config.gcc b/gcc/config.gcc index 70ecc51c1cfe9dffd428e4e68c6cdae8df7e5a91..b942e9700d66d15b1f7269d6dd8daf5092ac28c3 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -685,17 +685,47 @@ case ${target} in *-*-darwin*) tmake_file="t-darwin " tm_file="${tm_file} darwin.h" + darwin_os=`echo ${target} | sed 's/.*darwin\([0-9.]*\).*$/\1/'` + darwin_maj=`expr "$darwin_os" : '\([0-9]*\).*'` + macos_min=`expr "$darwin_os" : '[0-9]*\.\([0-9]*\).*'` + macos_maj=10 + if test x"${macos_min}" = x; then + macos_min=0 + fi + def_ld64=85.2 case ${target} in - *-*-darwin9*) - tm_file="${tm_file} darwin9.h" - ;; - *-*-darwin[1][01]*) - tm_file="${tm_file} darwin9.h darwin10.h" - ;; - *-*-darwin[1][2-9]* | *-*-darwin[2][0-9]*) - tm_file="${tm_file} darwin9.h darwin10.h darwin12.h" - ;; + # Darwin 4 to 19 correspond to macOS 10.0 to 10.15 + *-*-darwin[4-9]* | *-*-darwin1[0-9]*) + macos_min=`expr $darwin_maj - 4` + ;; + *-*-darwin20*) + # Darwin 20 corresponds to macOS 11. + macos_maj=11 + def_ld64=609.0 + ;; + *-*-darwin) + case ${cpu_type} in + aarch64) macos_maj=11 ;; + x86_64) macos_min=6 ;; + *) macos_min=5 ;; + esac + case ${host} in + *-*-darwin*) tm_defines="$tm_defines DARWIN_USE_KERNEL_VERS" ;; + *) + # If configuring a cross-compiler then we will have set some + #Â default above, but it is probably not what was intended. + echo "Warning: Using ${target} is only suitable for Darwin hosts" 1>&2 + echo "configure with an explicit target version" 1>&2 + ;; + esac + ;; + *) + echo "Error: configuring for an unreleased macOS version ${target}" 1>&2 + exit 1 + ;; esac + tm_defines="$tm_defines DEF_MIN_OSX_VERSION=\\\"${macos_maj}.${macos_min}\\\"" + tm_defines="$tm_defines DEF_LD64=\\\"${def_ld64}\\\"" tm_file="${tm_file} ${cpu_type}/darwin.h" tm_p_file="${tm_p_file} darwin-protos.h" target_gtfiles="$target_gtfiles \$(srcdir)/config/darwin.c" diff --git a/gcc/config/darwin10.h b/gcc/config/darwin10.h deleted file mode 100644 index 88b1fd061bb80aaa8b7a771f9284bd610fc0075e..0000000000000000000000000000000000000000 --- a/gcc/config/darwin10.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Target definitions for Darwin (Mac OS X) systems. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - Contributed by Jack Howarth <howarth@bromo.med.uc.edu>. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -#undef DEF_MIN_OSX_VERSION -#define DEF_MIN_OSX_VERSION "10.6" - -#ifndef LD64_VERSION -#undef DEF_LD64 -#define DEF_LD64 "97.7" -#endif diff --git a/gcc/config/darwin12.h b/gcc/config/darwin12.h deleted file mode 100644 index b397703dc78837dbd966723cda618ffeeb35a675..0000000000000000000000000000000000000000 --- a/gcc/config/darwin12.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Target definitions for Darwin (Mac OS X) systems. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - Contributed by Jack Howarth <howarth.at.gcc@gmail.com>. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -#undef DEF_MIN_OSX_VERSION -#define DEF_MIN_OSX_VERSION "10.8" - -#ifndef LD64_VERSION -#undef DEF_LD64 -#define DEF_LD64 "236.4" -#endif diff --git a/gcc/config/darwin9.h b/gcc/config/darwin9.h deleted file mode 100644 index 92a77eeec713b0cf6438a0b457351d2dfe2f7877..0000000000000000000000000000000000000000 --- a/gcc/config/darwin9.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Target definitions for Darwin (Mac OS X) systems. - Copyright (C) 2006-2020 Free Software Foundation, Inc. - Contributed by Apple Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -#undef DEF_MIN_OSX_VERSION -#define DEF_MIN_OSX_VERSION "10.5" diff --git a/gcc/config/rs6000/darwin8.h b/gcc/config/rs6000/darwin8.h deleted file mode 100644 index 01b2dc84291fdb435eec295fe4656f40bafa8525..0000000000000000000000000000000000000000 --- a/gcc/config/rs6000/darwin8.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Target definitions for Darwin 8.0 and above (Mac OS X) systems. - Copyright (C) 2004-2020 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -#undef DEF_MIN_OSX_VERSION -#define DEF_MIN_OSX_VERSION "10.4"