aboutsummaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2014-09-19 23:09:29 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2014-09-26 05:41:54 +0200
commit0a67b9f3fd164b808c66286ff0435c65421e5352 (patch)
tree844fedb8ee378aa6924c4cf457b869e384efc66a /meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch
parent2b32463cfc617a5497544e67afab50b1f3d0fc3c (diff)
downloadmeta-openembedded-0a67b9f3fd164b808c66286ff0435c65421e5352.tar.gz
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 <andrea.adami@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch')
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch
new file mode 100644
index 0000000000..9bc4835dcd
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch
@@ -0,0 +1,14 @@
+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";
+ }