From 0a67b9f3fd164b808c66286ff0435c65421e5352 Mon Sep 17 00:00:00 2001 From: Andrea Adami Date: Fri, 19 Sep 2014 23:09:29 +0200 Subject: klibc: klcc: consider --sysroot option and override gcc-cross encoded sysroot For the recipes built with klcc-cross it is necessary to pass --sysroot otherwise we default to the one encoded in gcc-cross which actually is the 'first one' built. The issue was revealed when building for armv4 after having built for armv5te: the produced binaries did contain Illegal Instruction (bx lr). Use ${TOOLCHAIN_OPTIONS} variable to specify --sysroot=${STAGING_DIR_TARGET} Signed-off-by: Andrea Adami Signed-off-by: Martin Jansa --- meta-initramfs/classes/klibc.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta-initramfs/classes') diff --git a/meta-initramfs/classes/klibc.bbclass b/meta-initramfs/classes/klibc.bbclass index ca741cd8b7..f864104cfb 100644 --- a/meta-initramfs/classes/klibc.bbclass +++ b/meta-initramfs/classes/klibc.bbclass @@ -4,8 +4,8 @@ DEPENDS =+ "klcc-cross" # Default for klcc is to build static binaries. # Set CC = "${TARGET_PREFIX}klcc -shared" to build the dynamic version. -export CC = "${TARGET_PREFIX}klcc" -export CC_armv4_linux-gnueabi = "${TARGET_PREFIX}klcc -march=armv4 -mthumb-interwork" +export CC = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS}" +export CC_armv4_linux-gnueabi = "${TARGET_PREFIX}klcc ${TOOLCHAIN_OPTIONS} -march=armv4 -mthumb-interwork" export CPP = "${CC} -E" -- cgit v1.2.3-54-g00ecf