aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-10-22 15:10:08 -0700
committerKhem Raj <raj.khem@gmail.com>2010-10-23 18:56:15 -0700
commit60075ae81e0bd95aa83adcb49b74ca4694cd80a2 (patch)
treee89483f094c578e17baf8161a4f68d3e32fd32a3 /classes
parent4aedce871cc504dc7f7dd508ba38bb839a1a506d (diff)
downloadopenembedded-60075ae81e0bd95aa83adcb49b74ca4694cd80a2.tar.gz
autotools.bbclass: Specify a value of sysroot instead of asking the compiler
If we just use --with-libtool-sysroot then it asks the compiler at configure time to supply the sysroot which will not work with external toolchains because they may have different default sysroot encoded into them. Therefore we specify the sysroot so the configure can use that value and not depend upon compiler to supply one. We do not do it for native recipes as the native compiler should fall back to /usr prefix and not solely depend on sysroot otherwise we end up staging everything in native sysroot before we start to build target recipes Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/autotools.bbclass10
1 files changed, 9 insertions, 1 deletions
diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index 97bc47c2b5..3d8bcb55e2 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -57,6 +57,14 @@ def autotools_set_crosscompiling(d):
return " cross_compiling=yes"
return ""
+def append_libtool_sysroot(d):
+ if bb.data.getVar('LIBTOOL_HAS_SYSROOT', d, 1) == "yes":
+ if bb.data.getVar('BUILD_SYS', d, 1) == bb.data.getVar('HOST_SYS', d, 1):
+ return '--with-libtool-sysroot'
+ else:
+ return '--with-libtool-sysroot=${STAGING_DIR}/${MULTIMACH_HOST_SYS}'
+ return ''
+
# EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}"
CONFIGUREOPTS = " --build=${BUILD_SYS} \
@@ -76,7 +84,7 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
--oldincludedir=${oldincludedir} \
--infodir=${infodir} \
--mandir=${mandir} \
- ${@["","--with-libtool-sysroot"][bb.data.getVar('LIBTOOL_HAS_SYSROOT', d, 1) == "yes"]} \
+ ${@append_libtool_sysroot(d)} \
"
oe_runconf () {