This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Darwin, configury] No longer expect to find cross-target headers on the host.


Hi Folks,

This might make some configuration modes easier on modern Darwin (although hitting the problem used to be an unusual circumstance, it will likely become more common if we need to use build-sysroots - e.g. targeting a minimum OS X version of 10.6 on later versions).

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.

While the trailing case entry is not darwin-specific, grep says that there are no instances of “NATIVE_CROSS” anywhere in the current GCC tree.

OK for trunk?
OK for open branches?
Iain

….   Iain Sandoe  <iain@codesourcery.com>

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


---
 gcc/configure.ac | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/gcc/configure.ac b/gcc/configure.ac
index e5c9e9e..834605a 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2033,27 +2033,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
-- 
2.8.1



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]