diff mbox series

[1/2] compiler-rt: Use clang for native compile as well

Message ID 20250711064233.590809-1-raj.khem@gmail.com
State Accepted, archived
Commit 0c3ab984e72db424aa2684f5e2073a165b4b0910
Headers show
Series [1/2] compiler-rt: Use clang for native compile as well | expand

Commit Message

Khem Raj July 11, 2025, 6:42 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/clang/compiler-rt_git.bb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

patchtest@automation.yoctoproject.org July 11, 2025, 7:01 a.m. UTC | #1
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch /home/patchtest/share/mboxes/1-2-compiler-rt-Use-clang-for-native-compile-as-well.patch

FAIL: test commit message presence: Please include a commit message on your patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)

PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!
Robert Yang July 20, 2025, 11:44 a.m. UTC | #2
Hi Khem,

I got compiler-rt-native do_configure error Ubuntu 22.04.5 with this patch:

     /ala-lpggp71/lyang1/poky/build-u/tmp/hosttools/ld: cannot find -lstdc++: No 
such file or directory
     clang++: error: linker command failed with exit code 1 (use -v to see 
invocation)
     ninja: build stopped: subcommand failed.


I have tried:
1) Add libcxx-native back to compiler-rt-native's DEPENDS, there would be 
dependency loops.

2) Install libc++1 on the host, it doesn't work, get the same error.

// Robert

On 7/11/25 14:42, Khem Raj via lists.openembedded.org wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>   meta/recipes-devtools/clang/compiler-rt_git.bb | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb
> index 342a7b0e95e..4da85f29378 100644
> --- a/meta/recipes-devtools/clang/compiler-rt_git.bb
> +++ b/meta/recipes-devtools/clang/compiler-rt_git.bb
> @@ -35,9 +35,9 @@ DEPENDS:remove:class-native = "libcxx-native compiler-rt-native"
>   UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
>   COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
>   LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
> -UNWINDLIB:class-native = ""
> -COMPILER_RT:class-native = ""
> -LIBCPLUSPLUS:class-native = ""
> +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++"
> @@ -57,6 +57,7 @@ LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
>   CXXFLAGS += "${LIBCPLUSPLUS}"
>   
>   TOOLCHAIN = "clang"
> +TOOLCHAIN_NATIVE = "clang"
>   
>   def get_compiler_rt_arch(bb, d):
>       if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d):
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#220135): https://lists.openembedded.org/g/openembedded-core/message/220135
> Mute This Topic: https://lists.openembedded.org/mt/114096532/7304958
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [liezhi.yang@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Khem Raj July 20, 2025, 6:53 p.m. UTC | #3
On Sun, Jul 20, 2025 at 4:45 AM Robert Yang <liezhi.yang@windriver.com> wrote:
>
> Hi Khem,
>
> I got compiler-rt-native do_configure error Ubuntu 22.04.5 with this patch:
>
>      /ala-lpggp71/lyang1/poky/build-u/tmp/hosttools/ld: cannot find -lstdc++: No
> such file or directory
>      clang++: error: linker command failed with exit code 1 (use -v to see
> invocation)
>      ninja: build stopped: subcommand failed.
>
>
> I have tried:
> 1) Add libcxx-native back to compiler-rt-native's DEPENDS, there would be
> dependency loops.
>
> 2) Install libc++1 on the host, it doesn't work, get the same error.

you need to install libstdc++-devel that matches to newest gcc version
installed on the host.

>
> // Robert
>
> On 7/11/25 14:42, Khem Raj via lists.openembedded.org wrote:
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >   meta/recipes-devtools/clang/compiler-rt_git.bb | 7 ++++---
> >   1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb
> > index 342a7b0e95e..4da85f29378 100644
> > --- a/meta/recipes-devtools/clang/compiler-rt_git.bb
> > +++ b/meta/recipes-devtools/clang/compiler-rt_git.bb
> > @@ -35,9 +35,9 @@ DEPENDS:remove:class-native = "libcxx-native compiler-rt-native"
> >   UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
> >   COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
> >   LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
> > -UNWINDLIB:class-native = ""
> > -COMPILER_RT:class-native = ""
> > -LIBCPLUSPLUS:class-native = ""
> > +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++"
> > @@ -57,6 +57,7 @@ LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
> >   CXXFLAGS += "${LIBCPLUSPLUS}"
> >
> >   TOOLCHAIN = "clang"
> > +TOOLCHAIN_NATIVE = "clang"
> >
> >   def get_compiler_rt_arch(bb, d):
> >       if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d):
> >
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#220135): https://lists.openembedded.org/g/openembedded-core/message/220135
> > Mute This Topic: https://lists.openembedded.org/mt/114096532/7304958
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [liezhi.yang@eng.windriver.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Robert Yang July 21, 2025, 3:18 a.m. UTC | #4
On 7/21/25 02:53, Khem Raj wrote:
> On Sun, Jul 20, 2025 at 4:45 AM Robert Yang <liezhi.yang@windriver.com> wrote:
>>
>> Hi Khem,
>>
>> I got compiler-rt-native do_configure error Ubuntu 22.04.5 with this patch:
>>
>>       /ala-lpggp71/lyang1/poky/build-u/tmp/hosttools/ld: cannot find -lstdc++: No
>> such file or directory
>>       clang++: error: linker command failed with exit code 1 (use -v to see
>> invocation)
>>       ninja: build stopped: subcommand failed.
>>
>>
>> I have tried:
>> 1) Add libcxx-native back to compiler-rt-native's DEPENDS, there would be
>> dependency loops.
>>
>> 2) Install libc++1 on the host, it doesn't work, get the same error.
> 
> you need to install libstdc++-devel that matches to newest gcc version
> installed on the host.

Thank you very much, it works after install libstdc++-12-dev on my host.

// Robert

> 
>>
>> // Robert
>>
>> On 7/11/25 14:42, Khem Raj via lists.openembedded.org wrote:
>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> ---
>>>    meta/recipes-devtools/clang/compiler-rt_git.bb | 7 ++++---
>>>    1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb
>>> index 342a7b0e95e..4da85f29378 100644
>>> --- a/meta/recipes-devtools/clang/compiler-rt_git.bb
>>> +++ b/meta/recipes-devtools/clang/compiler-rt_git.bb
>>> @@ -35,9 +35,9 @@ DEPENDS:remove:class-native = "libcxx-native compiler-rt-native"
>>>    UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
>>>    COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
>>>    LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
>>> -UNWINDLIB:class-native = ""
>>> -COMPILER_RT:class-native = ""
>>> -LIBCPLUSPLUS:class-native = ""
>>> +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++"
>>> @@ -57,6 +57,7 @@ LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
>>>    CXXFLAGS += "${LIBCPLUSPLUS}"
>>>
>>>    TOOLCHAIN = "clang"
>>> +TOOLCHAIN_NATIVE = "clang"
>>>
>>>    def get_compiler_rt_arch(bb, d):
>>>        if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d):
>>>
>>>
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> View/Reply Online (#220135): https://lists.openembedded.org/g/openembedded-core/message/220135
>>> Mute This Topic: https://lists.openembedded.org/mt/114096532/7304958
>>> Group Owner: openembedded-core+owner@lists.openembedded.org
>>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [liezhi.yang@eng.windriver.com]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>
diff mbox series

Patch

diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb
index 342a7b0e95e..4da85f29378 100644
--- a/meta/recipes-devtools/clang/compiler-rt_git.bb
+++ b/meta/recipes-devtools/clang/compiler-rt_git.bb
@@ -35,9 +35,9 @@  DEPENDS:remove:class-native = "libcxx-native compiler-rt-native"
 UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
 COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
 LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
-UNWINDLIB:class-native = ""
-COMPILER_RT:class-native = ""
-LIBCPLUSPLUS:class-native = ""
+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++"
@@ -57,6 +57,7 @@  LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
 CXXFLAGS += "${LIBCPLUSPLUS}"
 
 TOOLCHAIN = "clang"
+TOOLCHAIN_NATIVE = "clang"
 
 def get_compiler_rt_arch(bb, d):
     if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d):