[oe] [PATCH] icecc: base fix for cross and native builds
Roman I Khimov
roman at khimov.ru
Thu Feb 12 14:27:18 UTC 2009
Hello all.
There are severe problems with icecc builds currently in OE. Cross-compiler
tarball created wrong, PATH set incorrectly, etc.
So, here is a patch that fixes some basic things, like:
1) ICECC_ENV_EXEC variable expansion. Currently you can only use absolute
path here, something like "${TOP}/create-icecc-env.sh" won't work.
2) PATH is set wrong for cross-compiler, the problem is that ${ICECC_PATH}
is expanded at script-producing stage, so as a result you have
export PATH=/usr/bin/icecc$PATH
in script, which is just plain wrong.
3) Cross-compiler tarball created is not working, at least with 4.3.3 GCC
version when 'create-icecc-env.sh' script tries to find cc1 and cc1plus
it gets nothing meaningful, like:
$ ./tmp/cross/i686/i686-linux/bin/gcc -print-prog-name=cc1
cc1
$ ./tmp/cross/i686/i686-linux/bin/gcc -print-prog-name=cc1plus
cc1plus
Compare that to
$ ./tmp/cross/i686/bin/i686-linux-gcc -print-prog-name=cc1
/path-to-oe-top/tmp/cross/i686/libexec/gcc/i686-linux/4.3.3/cc1
$ ./tmp/cross/i686/bin/i686-linux-gcc -print-prog-name=cc1plus
/path-to-oe-top/tmp/cross/i686/libexec/gcc/i686-linux/4.3.3/cc1plus
This patch fixes this problems and one can use icecc with it, albeit there are
some problems left, 'icecc-create-env' is not working as create-icecc-env.sh
provider and there is a problem with parallel task execution (as in
BB_NUMBER_THREADS) if several tasks get ready to run, try to find icecc
tarball, not find that, and then every task tries to create the tarball which
leads to all sorts of corruption in resulting tarball.
--- a/classes/icecc.bbclass 2009-01-23 15:05:33.116226578 +0300
+++ b/classes/icecc.bbclass 2009-02-10 15:17:02.891420616 +0300
@@ -83,13 +83,15 @@ def create_cross_env(bb,d):
#check if user has specified a specific icecc-create-env script
#if not use the OE provided one
- cr_env_script = bb.data.getVar('ICECC_ENV_EXEC', d) or bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
+ cr_env_script = bb.data.expand('${ICECC_ENV_EXEC}', d)
+ if cr_env_script == "${ICECC_ENV_EXEC}":
+ cr_env_script = bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
#call the modified create-env script
result=os.popen("%s %s %s %s %s %s" %(cr_env_script,
"--silent",
- os.path.join(ice_dir,target_sys,'bin','gcc'),
- os.path.join(ice_dir,target_sys,'bin','g++'),
- os.path.join(ice_dir,target_sys,'bin','as'),
+ os.path.join(ice_dir, 'bin', "%s-gcc" % target_sys),
+ os.path.join(ice_dir, 'bin', "%s-g++" % target_sys),
+ os.path.join(ice_dir, 'bin', "%s-as" % target_sys),
os.path.join(ice_dir,"ice",cross_name) ) )
return tar_file
@@ -121,7 +123,9 @@ def create_native_env(bb,d):
#check if user has specified a specific icecc-create-env script
#if not use the OE provided one
- cr_env_script = bb.data.getVar('ICECC_ENV_EXEC', d) or bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
+ cr_env_script = bb.data.expand('${ICECC_ENV_EXEC}', d)
+ if cr_env_script == "${ICECC_ENV_EXEC}":
+ cr_env_script = bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
result=os.popen("%s %s %s %s %s %s" %(cr_env_script,
"--silent",
os.popen("%s gcc" % "which").read()[:-1],
@@ -290,9 +294,9 @@ def check_for_kernel(bb,d):
set_icecc_env() {
- ICECC_PATH=${@icc_path(bb,d)}
- if test x${ICECC_PATH} != x; then
- export PATH=${ICECC_PATH}$PATH
+ ICE_PATH=${@icc_path(bb,d)}
+ if test x${ICE_PATH} != x; then
+ export PATH=${ICE_PATH}$PATH
export CCACHE_PATH=$PATH
#check if we are building a kernel and select gcc-cross-kernel
if [ "${@check_for_kernel(bb,d)}" = "yes" ]; then
--
Roman
http://roman.khimov.ru
mailto: roman at khimov.ru
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 0xE5E055C3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20090212/d1a7f038/attachment-0002.sig>
More information about the Openembedded-devel
mailing list