[Darwin, configury] No longer expect to find cross-target headers on the host.
authorIain Sandoe <iain@codesourcery.com>
Sun, 11 Dec 2016 19:37:05 +0000 (19:37 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sun, 11 Dec 2016 19:37:05 +0000 (19:37 +0000)
Earlier Darwin (esp. Darwin8 and Darwin9) had FAT libraries and suitable header
installations in /usr/include such that one could build a cross-toolchain
(including cross-arch) using a common sysroot (including / for “current” version).

However this is no longer true on a number of levels.  A vanilla Darwin system has
no headers installed in /usr and it's certainly not appropriate to try and find
headers/libs for (say) x86-64-darwinNN X powerpc-darwin in /usr on any Darwin NN > 10
(even Darwin10 is incomplete in that it omits the ppc64 multilib).  In the latter
example, the catch-all in the current configury to mean that
"foo-darwin" == “foo-version-on-this-system” breaks the cross case
—target=powerpc-apple-darwin —host=some-system-later-than-darwin10.

gcc/

2016-12-11  Iain Sandoe  <iain@codesourcery.com>

* configure.ac (CROSS directory tests): Remove the assumption that
Darwin hosts contain suitable target sysroots in "/".
* configure: Regenerate.

From-SVN: r243533

gcc/ChangeLog
gcc/configure
gcc/configure.ac

index e2809f02daebae02b91bd84299b8dd6c532b9285..c9a48b0c02e66b122fef1974ae2263d59dacc944 100644 (file)
@@ -1,3 +1,9 @@
+2016-12-11  Iain Sandoe  <iain@codesourcery.com>
+
+       * configure.ac (CROSS directory tests): Remove the assumption that
+       Darwin hosts contain suitable target sysroots in "/".
+       * configure: Regenerate.
+
 2016-12-11  Iain Sandoe  <iain@codesourcery.com>
 
        PR rtl-optimization/71496
index b9a39d3454ead9b2e17ba349d9fd7e9f1eeb7fc1..2348f091abcf911e21ca60d441748a14325660c8 100755 (executable)
@@ -12205,27 +12205,6 @@ then
        CROSS="-DCROSS_DIRECTORY_STRUCTURE"
        ALL=all.cross
        SYSTEM_HEADER_DIR=$build_system_header_dir
-       case "$host","$target" in
-       # Darwin crosses can use the host system's libraries and headers,
-       # because of the fat library support.  Of course, it must be the
-       # same version of Darwin on both sides.  Allow the user to
-       # just say --target=foo-darwin without a version number to mean
-       # "the version on this system".
-           *-*-darwin*,*-*-darwin*)
-               hostos=`echo $host | sed 's/.*-darwin/darwin/'`
-               targetos=`echo $target | sed 's/.*-darwin/darwin/'`
-               if test $hostos = $targetos -o $targetos = darwin ; then
-                   CROSS=
-                   SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
-                   with_headers=yes
-               fi
-               ;;
-
-           i?86-*-*,x86_64-*-* \
-           | powerpc*-*-*,powerpc64*-*-*)
-               CROSS="$CROSS -DNATIVE_CROSS" ;;
-       esac
-
        case $target in
                *-*-mingw*)
                        if test "x$with_headers" = x; then
@@ -18430,7 +18409,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18433 "configure"
+#line 18417 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18536,7 +18515,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18539 "configure"
+#line 18523 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 268efdb302122fdface860714240ebbd31718e9f..08e6851fc96eea89e1d645733228ace713ddd73f 100644 (file)
@@ -2010,27 +2010,6 @@ then
        CROSS="-DCROSS_DIRECTORY_STRUCTURE"
        ALL=all.cross
        SYSTEM_HEADER_DIR=$build_system_header_dir
-       case "$host","$target" in
-       # Darwin crosses can use the host system's libraries and headers,
-       # because of the fat library support.  Of course, it must be the
-       # same version of Darwin on both sides.  Allow the user to
-       # just say --target=foo-darwin without a version number to mean
-       # "the version on this system".
-           *-*-darwin*,*-*-darwin*)
-               hostos=`echo $host | sed 's/.*-darwin/darwin/'`
-               targetos=`echo $target | sed 's/.*-darwin/darwin/'`
-               if test $hostos = $targetos -o $targetos = darwin ; then
-                   CROSS=
-                   SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
-                   with_headers=yes
-               fi
-               ;;
-
-           i?86-*-*,x86_64-*-* \
-           | powerpc*-*-*,powerpc64*-*-*)
-               CROSS="$CROSS -DNATIVE_CROSS" ;;
-       esac
-
        case $target in
                *-*-mingw*)
                        if test "x$with_headers" = x; then