mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-07-19 15:29:08 +02:00

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 <andrea.adami@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
15 lines
402 B
Diff
15 lines
402 B
Diff
diff --git a/klcc/klcc.in b/klcc/klcc.in
|
|
index 43d0984..61e9385 100644
|
|
--- a/klcc/klcc.in
|
|
+++ b/klcc/klcc.in
|
|
@@ -204,6 +204,9 @@ while ( defined($a = shift(@ARGV)) ) {
|
|
# Libraries
|
|
push(@libs, $a);
|
|
push(@libs, shift(@ARGV)) if ( $2 eq '' );
|
|
+ } elsif ( $a =~ /^--([sysroot=])(.*)$/ ) {
|
|
+ # Override gcc encoded sysroot
|
|
+ push(@ccopt, $a);
|
|
} else {
|
|
die "$0: unknown option: $a\n";
|
|
}
|