[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 e2809f0..c9a48b0 100644 (file)
@@ -1,5 +1,11 @@
 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
        * config/rs6000/darwin.md (load_macho_picbase_si): Mark as non-
        copyable.  (load_macho_picbase_di, reload_macho_picbase_si,
index b9a39d3..2348f09 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 268efdb..08e6851 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