gcc: respect ${layout_includedir}
authorPhil Blundell <philb@gnu.org>
Sat, 18 Oct 2008 16:28:20 +0000 (17:28 +0100)
committerPhil Blundell <philb@gnu.org>
Sat, 18 Oct 2008 16:28:20 +0000 (17:28 +0100)
packages/gcc/gcc-configure-common.inc

index 795911d..e88cee5 100644 (file)
@@ -75,6 +75,13 @@ do_configure () {
        export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
        export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
        (cd ${S} && gnu-configize) || die "failure running gnu-configize"
+
+       # splice our idea of where the headers live into gcc's world
+       echo "NATIVE_SYSTEM_HEADER_DIR = ${layout_includedir}" > ${T}/t-oe
+       sed 's%^tmake_file=.*$%& ${T}/t-oe%' < ${S}/gcc/Makefile.in >${S}/gcc/Makefile.in.new
+       mv ${S}/gcc/Makefile.in.new ${S}/gcc/Makefile.in
+
+       echo "#define STANDARD_INCLUDE_DIR \"${layout_includedir}\"" >> ${S}/gcc/defaults.h
+
        oe_runconf
 }
-