gcc47: Restore cross-build capability
authorJohn Marino <netbsd@marino.st>
Thu, 4 Oct 2012 16:03:52 +0000 (18:03 +0200)
committerSascha Wildner <saw@online.de>
Thu, 4 Oct 2012 16:57:10 +0000 (18:57 +0200)
The internal specs of gcc47 featured an hardcoded standard include
directory which prevented cross-target builds.  The same mistake also
caused the "crosstools" compiler in a native build to look at the host
system includes instead of the world_{TARGET}/usr/includes directory.
As a result, the cross-build would break as soon as GCC47 was used to
build its own libraries.

A stage-specific prefix was added to the internal specs directory
definition that restored cross-target building capability.

gnu/usr.bin/cc47/cc_prep/config/dragonfly-native.h

index 8d35f11..d4861df 100644 (file)
@@ -31,7 +31,7 @@
   } \
  }"
 
-#define NATIVE_SYSTEM_HEADER_DIR       "/usr/include"
+#define NATIVE_SYSTEM_HEADER_DIR       PREFIX2"/include"
 #define STD_EXEC_PATH                  PREFIX1"/libexec/gcc"GCCSHORTVER
 #define STANDARD_EXEC_PREFIX           STD_EXEC_PATH"/"
 #define STANDARD_LIBEXEC_PREFIX        STANDARD_EXEC_PREFIX