summaryrefslogtreecommitdiffstats
path: root/recipes/gcc/gcc-configure-common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/gcc/gcc-configure-common.inc')
-rw-r--r--recipes/gcc/gcc-configure-common.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/recipes/gcc/gcc-configure-common.inc b/recipes/gcc/gcc-configure-common.inc
index fe0d32d39f..4d8edbc9c1 100644
--- a/recipes/gcc/gcc-configure-common.inc
+++ b/recipes/gcc/gcc-configure-common.inc
@@ -93,7 +93,14 @@ do_configure () {
sed -i 's/^LDFLAGS = $/LDFLAGS = @LDFLAGS@/' ${S}/Makefile.tpl
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
-
+ # gcc assumes ${sysroot}/usr to be prefix on linux targets
+ # but we have distro option to flatten out the tree and micro
+ # uses root file system without leading /usr so we need to
+ # teach gcc configure to look in correct include paths
+ # unfortunately there is no configure knob to indicate this
+ # to configury hence the sed :(
+ sed -i 's:/usr/include:${target_includedir}:g' ${S}/gcc/configure.ac
+ sed -i 's:/usr/include:${target_includedir}:g' ${S}/gcc/configure
if [ "${HOST_SYS}" != "${TARGET_SYS}" ]; then
# splice our idea of where the headers live into gcc's world
echo "NATIVE_SYSTEM_HEADER_DIR = ${target_includedir}" > ${T}/t-oe