[OE-core] [PATCH] gmp-4.2.1: Set CC_FOR_BUILD to ensure the host system compiler is used, not the target one

Richard Purdie richard.purdie at linuxfoundation.org
Wed Aug 22 18:30:22 UTC 2012


This addresses errors like:

| NOTE: make -j 16
| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-non-gpl3/build/build/tmp/sysroots/qemux86 `test -f 'gen-fac_ui.c' || echo './'`gen-fac_ui.c -o gen-fac_ui
| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-non-gpl3/build/build/tmp/sysroots/qemux86 `test -f 'gen-fib.c' || echo './'`gen-fib.c -o gen-fib
| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-non-gpl3/build/build/tmp/sysroots/qemux86 `test -f 'gen-bases.c' || echo './'`gen-bases.c -o gen-bases -lm
| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-non-gpl3/build/build/tmp/sysroots/qemux86 `test -f 'gen-psqr.c' || echo './'`gen-psqr.c -o gen-psqr -lm
| ./gen-fac_ui 32 0 >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1)
| ./gen-bases header 32 0 >mp_bases.h || (rm -f mp_bases.h; exit 1)
| ./gen-bases table 32 0 >mpn/mp_bases.c || (rm -f mpn/mp_bases.c; exit 1)
| ./gen-fib header 32 0 >fib_table.h || (rm -f fib_table.h; exit 1)
| ./gen-bases: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
| ./gen-bases: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
| ./gen-fib table 32 0 >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1)
| make: *** [mp_bases.h] Error 1

and matches the fix for the other gmp version.

[YOCTO #2992]

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
diff --git a/meta/recipes-support/gmp/gmp_4.2.1.bb b/meta/recipes-support/gmp/gmp_4.2.1.bb
index 49ee59b..1f86a65 100644
--- a/meta/recipes-support/gmp/gmp_4.2.1.bb
+++ b/meta/recipes-support/gmp/gmp_4.2.1.bb
@@ -16,4 +16,6 @@ SRC_URI = "${GNU_MIRROR}/gmp/${BP}.tar.bz2 \
 SRC_URI[md5sum] = "091c56e0e1cca6b09b17b69d47ef18e3"
 SRC_URI[sha256sum] = "d07ffcb37eecec35c5ec72516d10b35fdf6e6fef1fcf1dcd37e30b8cbf8bf941"
 
+export CC_FOR_BUILD = "${BUILD_CC}"
+
 inherit autotools






More information about the Openembedded-core mailing list