Commit Graph

9 Commits

Author SHA1 Message Date
Khem Raj
582664d64d compiler-rt,libcxx: Use clang for native-libcxx and gcc for compiler-rt-native
compiler-rt configure calls for c++ compiler which can cause C++ runtime to
not be detected on some Yocto autobuilder workers running ubuntu 24.04
therefore let it use gcc for native version

Set TOOLCHAIN_NATIVE for using clang for libcxx

(From OE-Core rev: d54512c1c0a98516077b77d5414af47d8c2b8c39)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-07-04 14:56:41 +01:00
Alexander Kanavin
dc9faa3cdc meta: remove consecutive blank lines
Some of them were introduced by mass-removal of S = WORKDIR/git assignments;
rather than try to fix up (or redo) just these, I've run this sed command over
the whole tree:

sed -i -z -E 's/([ \t\f\v\r]*\n){3,}/\n\n/g' `find . -name *.bb -o -name *.inc`

The rationale is that more than one empty line is wasting vertical screen space, and
does nothing for readability.

(From OE-Core rev: cedc4ff7c9bcfb22a20e43e47f9759f4007a4f1a)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:27 +01:00
Richard Purdie
99e842451f compiler-rt/libcxx: Use clang as compiler
(From OE-Core rev: e75b2dee39fc0a35f764caa6b72af2a0b9beb165)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-09 17:43:41 +01:00
Khem Raj
92ce706e23 compile-rt: Fix building compiler-native on aarch64 build hosts.
Using target triple confuses the native system compiler to find
libgcc and C runtime during compiler-rt-native build

Fixes
|     /home/khem/yoe/build/tmp/hosttools/ld: cannot find crtbeginS.o: No such file or directory
|     /home/khem/yoe/build/tmp/hosttools/ld: cannot find -lgcc: No such file or directory
|     /home/khem/yoe/build/tmp/hosttools/ld: cannot find -lgcc_s: No such file or directory
|     clang: error: linker command failed with exit code 1 (use -v to see invocation)
|     ninja: build stopped: subcommand failed.

(From OE-Core rev: 1d4676d6b7c0fe40ab4f808dda436dc2f2915fd8)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-15 10:55:26 +01:00
Khem Raj
a104d73d7a compiler-rt: Map the COMPILER_RT_DEFAULT_TARGET_ARCH
COMPILER_RT_DEFAULT_TARGET_ARCH is not 1 to 1 match with HOST_ARCH
especially for armv5/arm4

(From OE-Core rev: 71f7db2e5d264bc6ed50fae48567ae674af9a700)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-15 10:55:26 +01:00
Khem Raj
4f94b4b45d compiler-rt: Rename the rt libraries if compiled with arm hardfloat ABI
OE does not rely on tuple to deduce hardfloat ABI, but clang/llvm does
arm-yoe-linux-gnueabi is used for both soft and softfp and hardfp float
ABIs in OE, LLVM expects arm-yoe-linux-gnueabihf for it to be treated as
hardfloat ABI, and look for correct name for rt libraries.

We know when we compile them with Hard-float ABI so rename them in such
case so clang can find it when using -rtlib=compiler-rt it needs to
has 'armhf' suffix

(From OE-Core rev: b369e99cb27bd327ab244335b637f0ad3393d9b8)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-12 22:01:56 +01:00
Khem Raj
77c0cff6a7 compiler-rt: Consolidate and fix cmake arguments
Specify CMAKE_C_COMPILER_TARGET and COMPILER_RT_DEFAULT_TARGET_ARCH
in common for native/target/nativesdk

set COMPILER_RT_DEFAULT_TARGET_ARCH to use HOST_ARCH across all recipe
variants

It is not needed to set COMPILER_RT_DEFAULT_TARGET_ARCH for powerpc anymore
as it is already fixed by setting COMPILER_RT_DEFAULT_TARGET_ARCH to
HOST_ARCH

(From OE-Core rev: 945e9a799ddbb28c169155368f1998cb8e9f455f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-12 22:01:56 +01:00
Khem Raj
6d0cb00c68 compiler-rt: Always use clang for compiler
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

(From OE-Core rev: 4df1f0da627e0985312ae4a330e7f0800c0c87a5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-08 10:28:19 +01:00
Khem Raj
79030cd4c4 clang: Merge llvm/clang family recipes from meta-clang
This can ensure that meta-clang does not carry them and can rely on core layer
while mesa can use them too.

Omit time stamps in openmp from generated files to improve
reproducibility

fix the issue that:
| file /usr/include/llvm/Config/llvm-config.h conflicts between attempted installs of lib32-llvm-dev-20.1.2-r0.core2_32 and llvm-dev-20.1.2-r0.core2_64

(From OE-Core rev: d77e398095228b34851762858a76640e3c2cb0ab)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-05 18:02:48 +01:00