* [meta-initramfs][PATCH] klibc: Add clang's -rtlib to known options
@ 2021-06-11 2:42 Khem Raj
2021-06-11 8:34 ` Andrea Adami
0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2021-06-11 2:42 UTC (permalink / raw)
To: openembedded-devel; +Cc: Khem Raj, Andrea Adami
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>
---
.../klibc/files/klcc-cross-accept-clang-options.patch | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch b/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch
index 56905a5159..431c75e3af 100644
--- a/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch
+++ b/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch
@@ -5,7 +5,7 @@ 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)) ) {
+@@ -207,6 +207,27 @@ while ( defined($a = shift(@ARGV)) ) {
} elsif ( $a =~ /^--([sysroot=])(.*)$/ ) {
# Override gcc encoded sysroot
push(@ccopt, $a);
@@ -26,6 +26,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
+ 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";
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [meta-initramfs][PATCH] klibc: Add clang's -rtlib to known options
2021-06-11 2:42 [meta-initramfs][PATCH] klibc: Add clang's -rtlib to known options Khem Raj
@ 2021-06-11 8:34 ` Andrea Adami
0 siblings, 0 replies; 2+ messages in thread
From: Andrea Adami @ 2021-06-11 8:34 UTC (permalink / raw)
To: Khem Raj; +Cc: OpenEmbedded Devel List
Thanks, I'll plan to do more testing with clang/llvm.
BTW there is now klibc 2.0.9.
Cheers
Andrea
On Fri, Jun 11, 2021 at 4:42 AM Khem Raj <raj.khem@gmail.com> wrote:
>
> 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>
> ---
> .../klibc/files/klcc-cross-accept-clang-options.patch | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch b/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch
> index 56905a5159..431c75e3af 100644
> --- a/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch
> +++ b/meta-initramfs/recipes-devtools/klibc/files/klcc-cross-accept-clang-options.patch
> @@ -5,7 +5,7 @@ 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)) ) {
> +@@ -207,6 +207,27 @@ while ( defined($a = shift(@ARGV)) ) {
> } elsif ( $a =~ /^--([sysroot=])(.*)$/ ) {
> # Override gcc encoded sysroot
> push(@ccopt, $a);
> @@ -26,6 +26,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
> + 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";
> --
> 2.32.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-11 8:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 2:42 [meta-initramfs][PATCH] klibc: Add clang's -rtlib to known options Khem Raj
2021-06-11 8:34 ` Andrea Adami
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.