mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-08 05:29:22 +00:00
klibc: Add clang's -rtlib to known options
This helps in ensuring that we always link klibc apps with libgcc as compiler-rt does not work for klibc due to missing libssp functions e.g. __stack_chk_guard and __stack_chk_guard which it expects in libc Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Andrea Adami <andrea.adami@gmail.com>
This commit is contained in:
@@ -5,7 +5,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|||||||
|
|
||||||
--- a/klcc/klcc.in
|
--- a/klcc/klcc.in
|
||||||
+++ b/klcc/klcc.in
|
+++ b/klcc/klcc.in
|
||||||
@@ -207,6 +207,24 @@ while ( defined($a = shift(@ARGV)) ) {
|
@@ -207,6 +207,27 @@ while ( defined($a = shift(@ARGV)) ) {
|
||||||
} elsif ( $a =~ /^--([sysroot=])(.*)$/ ) {
|
} elsif ( $a =~ /^--([sysroot=])(.*)$/ ) {
|
||||||
# Override gcc encoded sysroot
|
# Override gcc encoded sysroot
|
||||||
push(@ccopt, $a);
|
push(@ccopt, $a);
|
||||||
@@ -26,6 +26,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|||||||
+ push(@ccopt, $a);
|
+ push(@ccopt, $a);
|
||||||
+ } elsif ( $a =~ '--unwindlib=.*' ) {
|
+ } elsif ( $a =~ '--unwindlib=.*' ) {
|
||||||
+ # Allow clang options
|
+ # Allow clang options
|
||||||
|
+ push(@ccopt, $a);
|
||||||
|
+ } elsif ( $a =~ '-rtlib=.*' ) {
|
||||||
|
+ # Allow clang options
|
||||||
+ push(@ccopt, $a);
|
+ push(@ccopt, $a);
|
||||||
} else {
|
} else {
|
||||||
die "$0: unknown option: $a\n";
|
die "$0: unknown option: $a\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user