[oe-commits] Martin Jansa : icecc: use bb.utils.which also for 'as'
git at git.openembedded.org
git at git.openembedded.org
Tue Jan 21 10:22:42 UTC 2014
Module: openembedded-core.git
Branch: master
Commit: 6092da20fc3ceb1bc6b4872ad16df565f05723b7
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6092da20fc3ceb1bc6b4872ad16df565f05723b7
Author: Martin Jansa <martin.jansa at gmail.com>
Date: Sat Jan 18 15:01:52 2014 +0100
icecc: use bb.utils.which also for 'as'
* it was introduced in
commit 3a842ec52e7d010767b13bdcb5629ac07b3ee9e7
Author: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Date: Fri Sep 16 10:55:16 2011 +0400
Subject: icecc.bbclass: replace with updated version
without any explanation in which case
${ICECC_CC} -print-prog-name=as
is returning as in current working directory, but will keep old
behavior just in case
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/icecc.bbclass | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 5af764d..054e25c 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -251,6 +251,8 @@ set_icecc_env() {
ICECC_CC="${@icc_get_and_check_tool(bb, d, "gcc")}"
ICECC_CXX="${@icc_get_and_check_tool(bb, d, "g++")}"
+ # cannot use icc_get_and_check_tool here because it assumes as without target_sys prefix
+ ICECC_WHICH_AS="${@bb.utils.which(os.getenv('PATH'), 'as')}"
if [ ! -x "${ICECC_CC}" -o ! -x "${ICECC_CXX}" ]
then
bbwarn "Cannot use icecc: could not get ICECC_CC or ICECC_CXX"
@@ -266,9 +268,12 @@ set_icecc_env() {
fi
ICECC_AS="`${ICECC_CC} -print-prog-name=as`"
+ # for target recipes should return something like:
+ # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as
+ # and just "as" for native, if it returns "as" in current directory (for whatever reason) use "as" from PATH
if [ "`dirname "${ICECC_AS}"`" = "." ]
then
- ICECC_AS="`which as`"
+ ICECC_AS="${ICECC_WHICH_AS}"
fi
if [ ! -f "${ICECC_VERSION}.done" ]
More information about the Openembedded-commits
mailing list