summaryrefslogtreecommitdiff
path: root/recipes/gcc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2009-09-11 14:42:54 -0700
committerKhem Raj <raj.khem@gmail.com>2009-09-11 14:42:54 -0700
commitc0f653bc90814acf4053ec037c7ab3ad022342ff (patch)
tree8983d9469edffde655ad5524f77ea382eb7a39d7 /recipes/gcc
parentb1213a3ec464b72cdbb4c32bcbb1187f6f026742 (diff)
gcc-configure-common.inc: Muck with NATIVE_SYSTEM_HEADER_DIR
* GCC's notion of standard includes being in /usr/include is not valid for micro distro which uses flattened layout Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
Diffstat (limited to 'recipes/gcc')
-rw-r--r--recipes/gcc/gcc-configure-common.inc11
1 files changed, 10 insertions, 1 deletions
diff --git a/recipes/gcc/gcc-configure-common.inc b/recipes/gcc/gcc-configure-common.inc
index 7315a20cf9..fb792a8a88 100644
--- a/recipes/gcc/gcc-configure-common.inc
+++ b/recipes/gcc/gcc-configure-common.inc
@@ -80,7 +80,16 @@ do_configure () {
sed -i 's/^LDFLAGS = $/LDFLAGS = @LDFLAGS@/' ${S}/Makefile.tpl
(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
+ cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${S}/gcc/defaults.h.new
+ echo "#ifndef STANDARD_INCLUDE_DIR" >> ${S}/gcc/defaults.h.new
+ echo "#define STANDARD_INCLUDE_DIR \"${layout_includedir}\"" >> ${S}/gcc/defaults.h.new
+ echo "#endif" >> ${S}/gcc/defaults.h.new
+ echo "#endif /* ! GCC_DEFAULTS_H */" >> ${S}/gcc/defaults.h.new
+ mv ${S}/gcc/defaults.h.new ${S}/gcc/defaults.h
oe_runconf
# make sure that no @LDFLAG@ is left in the generated Makefile