diff options
Diffstat (limited to 'meta/classes/icecc.bbclass')
-rw-r--r-- | meta/classes/icecc.bbclass | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass index 4376aa37dc..bc3d6f4cc8 100644 --- a/meta/classes/icecc.bbclass +++ b/meta/classes/icecc.bbclass | |||
@@ -356,17 +356,6 @@ set_icecc_env() { | |||
356 | return | 356 | return |
357 | fi | 357 | fi |
358 | 358 | ||
359 | # Create symlinks to icecc in the recipe-sysroot directory | ||
360 | mkdir -p ${ICE_PATH} | ||
361 | if [ -n "${KERNEL_CC}" ]; then | ||
362 | compilers="${@get_cross_kernel_cc(bb,d)}" | ||
363 | else | ||
364 | compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++" | ||
365 | fi | ||
366 | for compiler in $compilers; do | ||
367 | ln -sf ${ICECC_BIN} ${ICE_PATH}/$compiler | ||
368 | done | ||
369 | |||
370 | ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}" | 359 | ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}" |
371 | ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}" | 360 | ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}" |
372 | # cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix | 361 | # cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix |
@@ -385,6 +374,26 @@ set_icecc_env() { | |||
385 | return | 374 | return |
386 | fi | 375 | fi |
387 | 376 | ||
377 | # Create symlinks to icecc and wrapper-scripts in the recipe-sysroot directory | ||
378 | mkdir -p $ICE_PATH/symlinks | ||
379 | if [ -n "${KERNEL_CC}" ]; then | ||
380 | compilers="${@get_cross_kernel_cc(bb,d)}" | ||
381 | else | ||
382 | compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++" | ||
383 | fi | ||
384 | for compiler in $compilers; do | ||
385 | ln -sf $ICECC_BIN $ICE_PATH/symlinks/$compiler | ||
386 | rm -f $ICE_PATH/$compiler | ||
387 | cat <<-__EOF__ > $ICE_PATH/$compiler | ||
388 | #!/bin/sh -e | ||
389 | export ICECC_VERSION=$ICECC_VERSION | ||
390 | export ICECC_CC=$ICECC_CC | ||
391 | export ICECC_CXX=$ICECC_CXX | ||
392 | $ICE_PATH/symlinks/$compiler "\$@" | ||
393 | __EOF__ | ||
394 | chmod 775 $ICE_PATH/$compiler | ||
395 | done | ||
396 | |||
388 | ICECC_AS="`${ICECC_CC} -print-prog-name=as`" | 397 | ICECC_AS="`${ICECC_CC} -print-prog-name=as`" |
389 | # for target recipes should return something like: | 398 | # for target recipes should return something like: |
390 | # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as | 399 | # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as |
@@ -417,7 +426,6 @@ set_icecc_env() { | |||
417 | export CCACHE_PATH="$PATH" | 426 | export CCACHE_PATH="$PATH" |
418 | export CCACHE_DISABLE="1" | 427 | export CCACHE_DISABLE="1" |
419 | 428 | ||
420 | export ICECC_VERSION ICECC_CC ICECC_CXX | ||
421 | export PATH="$ICE_PATH:$PATH" | 429 | export PATH="$ICE_PATH:$PATH" |
422 | 430 | ||
423 | bbnote "Using icecc path: $ICE_PATH" | 431 | bbnote "Using icecc path: $ICE_PATH" |