* [PATCH v2] compiler-rt: Always use clang for compiler
@ 2025-05-06 20:11 Khem Raj
2025-07-14 15:03 ` [OE-core] " Gyorgy Sarvari
0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2025-05-06 20:11 UTC (permalink / raw)
To: openembedded-core; +Cc: Khem Raj
This makes it build for all architectures e.g. riscv/mips/ppc etc.
Using clang-native to build all variants of recipe makes it easier to
handle compiling with various distros choosing different runtimes
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Fix builds when using clang as default system compiler
.../recipes-devtools/clang/compiler-rt_git.bb | 29 ++++++++++++-------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb
index 93928541273..a0f9c769a06 100644
--- a/meta/recipes-devtools/clang/compiler-rt_git.bb
+++ b/meta/recipes-devtools/clang/compiler-rt_git.bb
@@ -32,15 +32,15 @@ DEPENDS:append:class-nativesdk = " virtual/cross-c++ clang-native clang-crosssdk
DEPENDS:append:class-native = " clang-native"
# Trick clang.bbclass into not creating circular dependencies
-UNWINDLIB:class-nativesdk:toolchain-clang = "--unwindlib=libgcc"
-COMPILER_RT:class-nativesdk:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
-LIBCPLUSPLUS:class-nativesdk:toolchain-clang = "-stdlib=libstdc++"
-UNWINDLIB:class-native:toolchain-clang = "--unwindlib=libgcc"
-COMPILER_RT:class-native:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
-LIBCPLUSPLUS:class-native:toolchain-clang = "-stdlib=libstdc++"
-UNWINDLIB:class-target:toolchain-clang = "--unwindlib=libgcc"
-COMPILER_RT:class-target:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
-LIBCPLUSPLUS:class-target:toolchain-clang = "-stdlib=libstdc++"
+UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
+COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
+LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
+UNWINDLIB:class-native = "--unwindlib=libgcc"
+COMPILER_RT:class-native = "-rtlib=libgcc"
+LIBCPLUSPLUS:class-native = "-stdlib=libstdc++"
+UNWINDLIB:class-target = "--unwindlib=libgcc"
+COMPILER_RT:class-target = "-rtlib=libgcc"
+LIBCPLUSPLUS:class-target = "-stdlib=libstdc++"
PACKAGECONFIG ??= ""
PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF"
@@ -52,6 +52,13 @@ HF = ""
HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}"
HF[vardepvalue] = "${HF}"
+CC = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+CXX = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+BUILD_CC = "${CCACHE}clang ${BUILD_CC_ARCH}"
+BUILD_CXX = "${CCACHE}clang++ ${BUILD_CC_ARCH}"
+LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
+CXXFLAGS += "${LIBCPLUSPLUS}"
+
OECMAKE_TARGET_COMPILE = "compiler-rt"
OECMAKE_TARGET_INSTALL = "install-compiler-rt install-compiler-rt-headers"
OECMAKE_SOURCEPATH = "${S}/llvm"
@@ -72,7 +79,7 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
EXTRA_OECMAKE:append:class-native = "\
-DCOMPILER_RT_DEFAULT_TARGET_ARCH=${HOST_ARCH} \
- -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH} \
+ -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
"
EXTRA_OECMAKE:append:class-target = "\
@@ -89,7 +96,7 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
-DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
-DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
-DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \
- -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}${HF} \
+ -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
"
EXTRA_OECMAKE:append:powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc "
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH v2] compiler-rt: Always use clang for compiler
2025-05-06 20:11 [PATCH v2] compiler-rt: Always use clang for compiler Khem Raj
@ 2025-07-14 15:03 ` Gyorgy Sarvari
2025-07-14 16:59 ` Khem Raj
0 siblings, 1 reply; 4+ messages in thread
From: Gyorgy Sarvari @ 2025-07-14 15:03 UTC (permalink / raw)
To: raj.khem, openembedded-core
I realize that this is a fairly old commit... anyway.
During the weekend I decided to update a personal project of mine to the
tip of master, but after performing the main required changes, I faced
compiler-rt build failures, complaining about unrecognized -mcpu
argument during the compiler sanity check in do_configure[1].
Bisecting oe-core points to this commit. The project I'm using uses
-mcpu=cortex-a72.cortex-a53+crc+crypto (DEFAULTTUNE =
"cortexa72-cortexa53-crypto"), which is not accepted after this change.
Is this a user error, and I'm supposed to change something after this
revision, or is this a regression?
Thanks
[1]:
https://gist.github.com/OldManYellsAtCloud/1e0a931a815a054a35cf61792e529b70
On 5/6/25 22:11, Khem Raj via lists.openembedded.org wrote:
> This makes it build for all architectures e.g. riscv/mips/ppc etc.
>
> Using clang-native to build all variants of recipe makes it easier to
> handle compiling with various distros choosing different runtimes
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> v2: Fix builds when using clang as default system compiler
>
> .../recipes-devtools/clang/compiler-rt_git.bb | 29 ++++++++++++-------
> 1 file changed, 18 insertions(+), 11 deletions(-)
>
> diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb
> index 93928541273..a0f9c769a06 100644
> --- a/meta/recipes-devtools/clang/compiler-rt_git.bb
> +++ b/meta/recipes-devtools/clang/compiler-rt_git.bb
> @@ -32,15 +32,15 @@ DEPENDS:append:class-nativesdk = " virtual/cross-c++ clang-native clang-crosssdk
> DEPENDS:append:class-native = " clang-native"
>
> # Trick clang.bbclass into not creating circular dependencies
> -UNWINDLIB:class-nativesdk:toolchain-clang = "--unwindlib=libgcc"
> -COMPILER_RT:class-nativesdk:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
> -LIBCPLUSPLUS:class-nativesdk:toolchain-clang = "-stdlib=libstdc++"
> -UNWINDLIB:class-native:toolchain-clang = "--unwindlib=libgcc"
> -COMPILER_RT:class-native:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
> -LIBCPLUSPLUS:class-native:toolchain-clang = "-stdlib=libstdc++"
> -UNWINDLIB:class-target:toolchain-clang = "--unwindlib=libgcc"
> -COMPILER_RT:class-target:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
> -LIBCPLUSPLUS:class-target:toolchain-clang = "-stdlib=libstdc++"
> +UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
> +COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
> +LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
> +UNWINDLIB:class-native = "--unwindlib=libgcc"
> +COMPILER_RT:class-native = "-rtlib=libgcc"
> +LIBCPLUSPLUS:class-native = "-stdlib=libstdc++"
> +UNWINDLIB:class-target = "--unwindlib=libgcc"
> +COMPILER_RT:class-target = "-rtlib=libgcc"
> +LIBCPLUSPLUS:class-target = "-stdlib=libstdc++"
>
> PACKAGECONFIG ??= ""
> PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF"
> @@ -52,6 +52,13 @@ HF = ""
> HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}"
> HF[vardepvalue] = "${HF}"
>
> +CC = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> +CXX = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> +BUILD_CC = "${CCACHE}clang ${BUILD_CC_ARCH}"
> +BUILD_CXX = "${CCACHE}clang++ ${BUILD_CC_ARCH}"
> +LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
> +CXXFLAGS += "${LIBCPLUSPLUS}"
> +
> OECMAKE_TARGET_COMPILE = "compiler-rt"
> OECMAKE_TARGET_INSTALL = "install-compiler-rt install-compiler-rt-headers"
> OECMAKE_SOURCEPATH = "${S}/llvm"
> @@ -72,7 +79,7 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
>
> EXTRA_OECMAKE:append:class-native = "\
> -DCOMPILER_RT_DEFAULT_TARGET_ARCH=${HOST_ARCH} \
> - -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH} \
> + -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
> "
>
> EXTRA_OECMAKE:append:class-target = "\
> @@ -89,7 +96,7 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
> -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
> -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
> -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \
> - -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}${HF} \
> + -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
> "
> EXTRA_OECMAKE:append:powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc "
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#216082): https://lists.openembedded.org/g/openembedded-core/message/216082
> Mute This Topic: https://lists.openembedded.org/mt/112656561/6084445
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH v2] compiler-rt: Always use clang for compiler
2025-07-14 15:03 ` [OE-core] " Gyorgy Sarvari
@ 2025-07-14 16:59 ` Khem Raj
2025-07-14 17:08 ` Gyorgy Sarvari
0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2025-07-14 16:59 UTC (permalink / raw)
To: Gyorgy Sarvari; +Cc: openembedded-core
On Mon, Jul 14, 2025 at 8:03 AM Gyorgy Sarvari <skandigraun@gmail.com> wrote:
>
> I realize that this is a fairly old commit... anyway.
>
> During the weekend I decided to update a personal project of mine to the
> tip of master, but after performing the main required changes, I faced
> compiler-rt build failures, complaining about unrecognized -mcpu
> argument during the compiler sanity check in do_configure[1].
> Bisecting oe-core points to this commit. The project I'm using uses
> -mcpu=cortex-a72.cortex-a53+crc+crypto (DEFAULTTUNE =
> "cortexa72-cortexa53-crypto"), which is not accepted after this change.
>
> Is this a user error, and I'm supposed to change something after this
> revision, or is this a regression?
clang has differences in syntax for big.LITTLE arm systems sadly. In meta-clang
we have a fix for this
https://github.com/kraj/meta-clang/blob/master/classes/clang-legacy.bbclass#L25-L38
We need to do something similar in either clang bbclass or in recipes
using toolchain-clang
override.
>
> Thanks
>
> [1]:
> https://gist.github.com/OldManYellsAtCloud/1e0a931a815a054a35cf61792e529b70
>
> On 5/6/25 22:11, Khem Raj via lists.openembedded.org wrote:
> > This makes it build for all architectures e.g. riscv/mips/ppc etc.
> >
> > Using clang-native to build all variants of recipe makes it easier to
> > handle compiling with various distros choosing different runtimes
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> > v2: Fix builds when using clang as default system compiler
> >
> > .../recipes-devtools/clang/compiler-rt_git.bb | 29 ++++++++++++-------
> > 1 file changed, 18 insertions(+), 11 deletions(-)
> >
> > diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb
> > index 93928541273..a0f9c769a06 100644
> > --- a/meta/recipes-devtools/clang/compiler-rt_git.bb
> > +++ b/meta/recipes-devtools/clang/compiler-rt_git.bb
> > @@ -32,15 +32,15 @@ DEPENDS:append:class-nativesdk = " virtual/cross-c++ clang-native clang-crosssdk
> > DEPENDS:append:class-native = " clang-native"
> >
> > # Trick clang.bbclass into not creating circular dependencies
> > -UNWINDLIB:class-nativesdk:toolchain-clang = "--unwindlib=libgcc"
> > -COMPILER_RT:class-nativesdk:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
> > -LIBCPLUSPLUS:class-nativesdk:toolchain-clang = "-stdlib=libstdc++"
> > -UNWINDLIB:class-native:toolchain-clang = "--unwindlib=libgcc"
> > -COMPILER_RT:class-native:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
> > -LIBCPLUSPLUS:class-native:toolchain-clang = "-stdlib=libstdc++"
> > -UNWINDLIB:class-target:toolchain-clang = "--unwindlib=libgcc"
> > -COMPILER_RT:class-target:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
> > -LIBCPLUSPLUS:class-target:toolchain-clang = "-stdlib=libstdc++"
> > +UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
> > +COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
> > +LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
> > +UNWINDLIB:class-native = "--unwindlib=libgcc"
> > +COMPILER_RT:class-native = "-rtlib=libgcc"
> > +LIBCPLUSPLUS:class-native = "-stdlib=libstdc++"
> > +UNWINDLIB:class-target = "--unwindlib=libgcc"
> > +COMPILER_RT:class-target = "-rtlib=libgcc"
> > +LIBCPLUSPLUS:class-target = "-stdlib=libstdc++"
> >
> > PACKAGECONFIG ??= ""
> > PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF"
> > @@ -52,6 +52,13 @@ HF = ""
> > HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}"
> > HF[vardepvalue] = "${HF}"
> >
> > +CC = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> > +CXX = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> > +BUILD_CC = "${CCACHE}clang ${BUILD_CC_ARCH}"
> > +BUILD_CXX = "${CCACHE}clang++ ${BUILD_CC_ARCH}"
> > +LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
> > +CXXFLAGS += "${LIBCPLUSPLUS}"
> > +
> > OECMAKE_TARGET_COMPILE = "compiler-rt"
> > OECMAKE_TARGET_INSTALL = "install-compiler-rt install-compiler-rt-headers"
> > OECMAKE_SOURCEPATH = "${S}/llvm"
> > @@ -72,7 +79,7 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
> >
> > EXTRA_OECMAKE:append:class-native = "\
> > -DCOMPILER_RT_DEFAULT_TARGET_ARCH=${HOST_ARCH} \
> > - -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH} \
> > + -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
> > "
> >
> > EXTRA_OECMAKE:append:class-target = "\
> > @@ -89,7 +96,7 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
> > -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
> > -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
> > -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \
> > - -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}${HF} \
> > + -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
> > "
> > EXTRA_OECMAKE:append:powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc "
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#216082): https://lists.openembedded.org/g/openembedded-core/message/216082
> > Mute This Topic: https://lists.openembedded.org/mt/112656561/6084445
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH v2] compiler-rt: Always use clang for compiler
2025-07-14 16:59 ` Khem Raj
@ 2025-07-14 17:08 ` Gyorgy Sarvari
0 siblings, 0 replies; 4+ messages in thread
From: Gyorgy Sarvari @ 2025-07-14 17:08 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On 7/14/25 18:59, Khem Raj wrote:
> On Mon, Jul 14, 2025 at 8:03 AM Gyorgy Sarvari <skandigraun@gmail.com> wrote:
>> I realize that this is a fairly old commit... anyway.
>>
>> During the weekend I decided to update a personal project of mine to the
>> tip of master, but after performing the main required changes, I faced
>> compiler-rt build failures, complaining about unrecognized -mcpu
>> argument during the compiler sanity check in do_configure[1].
>> Bisecting oe-core points to this commit. The project I'm using uses
>> -mcpu=cortex-a72.cortex-a53+crc+crypto (DEFAULTTUNE =
>> "cortexa72-cortexa53-crypto"), which is not accepted after this change.
>>
>> Is this a user error, and I'm supposed to change something after this
>> revision, or is this a regression?
> clang has differences in syntax for big.LITTLE arm systems sadly. In meta-clang
> we have a fix for this
> https://github.com/kraj/meta-clang/blob/master/classes/clang-legacy.bbclass#L25-L38
>
> We need to do something similar in either clang bbclass or in recipes
> using toolchain-clang
> override.
Thanks a lot. Will run some tests in the coming days, and if I don't
find any issues locally, will try to submit a patch (I think it would
make sense to put it in clang.bbclass, most likely others would stumble
upon this too over time)
>> Thanks
>>
>> [1]:
>> https://gist.github.com/OldManYellsAtCloud/1e0a931a815a054a35cf61792e529b70
>>
>> On 5/6/25 22:11, Khem Raj via lists.openembedded.org wrote:
>>> This makes it build for all architectures e.g. riscv/mips/ppc etc.
>>>
>>> Using clang-native to build all variants of recipe makes it easier to
>>> handle compiling with various distros choosing different runtimes
>>>
>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> ---
>>> v2: Fix builds when using clang as default system compiler
>>>
>>> .../recipes-devtools/clang/compiler-rt_git.bb | 29 ++++++++++++-------
>>> 1 file changed, 18 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb
>>> index 93928541273..a0f9c769a06 100644
>>> --- a/meta/recipes-devtools/clang/compiler-rt_git.bb
>>> +++ b/meta/recipes-devtools/clang/compiler-rt_git.bb
>>> @@ -32,15 +32,15 @@ DEPENDS:append:class-nativesdk = " virtual/cross-c++ clang-native clang-crosssdk
>>> DEPENDS:append:class-native = " clang-native"
>>>
>>> # Trick clang.bbclass into not creating circular dependencies
>>> -UNWINDLIB:class-nativesdk:toolchain-clang = "--unwindlib=libgcc"
>>> -COMPILER_RT:class-nativesdk:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
>>> -LIBCPLUSPLUS:class-nativesdk:toolchain-clang = "-stdlib=libstdc++"
>>> -UNWINDLIB:class-native:toolchain-clang = "--unwindlib=libgcc"
>>> -COMPILER_RT:class-native:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
>>> -LIBCPLUSPLUS:class-native:toolchain-clang = "-stdlib=libstdc++"
>>> -UNWINDLIB:class-target:toolchain-clang = "--unwindlib=libgcc"
>>> -COMPILER_RT:class-target:toolchain-clang = "-rtlib=libgcc --unwindlib=libgcc"
>>> -LIBCPLUSPLUS:class-target:toolchain-clang = "-stdlib=libstdc++"
>>> +UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
>>> +COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
>>> +LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
>>> +UNWINDLIB:class-native = "--unwindlib=libgcc"
>>> +COMPILER_RT:class-native = "-rtlib=libgcc"
>>> +LIBCPLUSPLUS:class-native = "-stdlib=libstdc++"
>>> +UNWINDLIB:class-target = "--unwindlib=libgcc"
>>> +COMPILER_RT:class-target = "-rtlib=libgcc"
>>> +LIBCPLUSPLUS:class-target = "-stdlib=libstdc++"
>>>
>>> PACKAGECONFIG ??= ""
>>> PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF"
>>> @@ -52,6 +52,13 @@ HF = ""
>>> HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}"
>>> HF[vardepvalue] = "${HF}"
>>>
>>> +CC = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
>>> +CXX = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
>>> +BUILD_CC = "${CCACHE}clang ${BUILD_CC_ARCH}"
>>> +BUILD_CXX = "${CCACHE}clang++ ${BUILD_CC_ARCH}"
>>> +LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
>>> +CXXFLAGS += "${LIBCPLUSPLUS}"
>>> +
>>> OECMAKE_TARGET_COMPILE = "compiler-rt"
>>> OECMAKE_TARGET_INSTALL = "install-compiler-rt install-compiler-rt-headers"
>>> OECMAKE_SOURCEPATH = "${S}/llvm"
>>> @@ -72,7 +79,7 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
>>>
>>> EXTRA_OECMAKE:append:class-native = "\
>>> -DCOMPILER_RT_DEFAULT_TARGET_ARCH=${HOST_ARCH} \
>>> - -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH} \
>>> + -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
>>> "
>>>
>>> EXTRA_OECMAKE:append:class-target = "\
>>> @@ -89,7 +96,7 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
>>> -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
>>> -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
>>> -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \
>>> - -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}${HF} \
>>> + -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
>>> "
>>> EXTRA_OECMAKE:append:powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc "
>>>
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> View/Reply Online (#216082): https://lists.openembedded.org/g/openembedded-core/message/216082
>>> Mute This Topic: https://lists.openembedded.org/mt/112656561/6084445
>>> Group Owner: openembedded-core+owner@lists.openembedded.org
>>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-14 17:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-06 20:11 [PATCH v2] compiler-rt: Always use clang for compiler Khem Raj
2025-07-14 15:03 ` [OE-core] " Gyorgy Sarvari
2025-07-14 16:59 ` Khem Raj
2025-07-14 17:08 ` Gyorgy Sarvari
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox