meta-clang passes this option to compiler defaults

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>

--- a/klcc/klcc.in
+++ b/klcc/klcc.in
@@ -207,6 +207,24 @@ while ( defined($a = shift(@ARGV)) ) {
     } elsif ( $a =~ /^--([sysroot=])(.*)$/ ) {
 	# Override gcc encoded sysroot
 	push(@ccopt, $a);
+    } elsif ( $a eq '-nostartfiles' ) {
+        # Allow clang options
+        push(@ccopt, $a);
+    } elsif ( $a eq '-nostdlib' ) {
+        # Allow clang options
+        push(@ccopt, $a);
+    } elsif ( $a eq '-nodefaultlibs' ) {
+        # Allow clang options
+        push(@ccopt, $a);
+    } elsif ( $a eq '-no-pie' ) {
+        # Allow clang options
+        push(@ccopt, $a);
+    } elsif ( $a eq '-no-integrated-as' ) {
+	# Allow clang options
+	push(@ccopt, $a);
+    } elsif ( $a =~ '--unwindlib=.*' ) {
+	# Allow clang options
+	push(@ccopt, $a);
     } else {
 	die "$0: unknown option: $a\n";
     }

meta-clang passes this option to compiler defaults

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>

--- a/klcc/klcc.in
+++ b/klcc/klcc.in
@@ -207,6 +207,27 @@ while ( defined($a = shift(@ARGV)) ) {
     } elsif ( $a =~ /^--([sysroot=])(.*)$/ ) {
 	# Override gcc encoded sysroot
 	push(@ccopt, $a);
+    } elsif ( $a eq '-nostartfiles' ) {
+        # Allow clang options
+        push(@ccopt, $a);
+    } elsif ( $a eq '-nostdlib' ) {
+        # Allow clang options
+        push(@ccopt, $a);
+    } elsif ( $a eq '-nodefaultlibs' ) {
+        # Allow clang options
+        push(@ccopt, $a);
+    } elsif ( $a eq '-no-pie' ) {
+        # Allow clang options
+        push(@ccopt, $a);
+    } elsif ( $a eq '-no-integrated-as' ) {
+	# Allow clang options
+	push(@ccopt, $a);
+    } elsif ( $a =~ '--unwindlib=.*' ) {
+	# Allow clang options
+	push(@ccopt, $a);
+    } elsif ( $a =~ '-rtlib=.*' ) {
+	# Allow clang options
+	push(@ccopt, $a);
     } else {
 	die "$0: unknown option: $a\n";
     }

Add clang's -rtlib to known options
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 <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>
Cc: Andrea Adami <58a22b0beb8ec13ae546a060c8b4c576f22f6153@gmail.com>
