diff options
author | Khem Raj <raj.khem@gmail.com> | 2010-10-22 15:10:08 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2010-10-23 18:56:15 -0700 |
commit | 60075ae81e0bd95aa83adcb49b74ca4694cd80a2 (patch) | |
tree | e89483f094c578e17baf8161a4f68d3e32fd32a3 | |
parent | 4aedce871cc504dc7f7dd508ba38bb839a1a506d (diff) | |
download | openembedded-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>
-rw-r--r-- | classes/autotools.bbclass | 10 |
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 () { |