summaryrefslogtreecommitdiffstats
path: root/classes/clang-legacy.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* clang-legacy.bbclass: Remove -fuse-ld=lld from SELECTED_OPTIMIZATION when ↵mark.yang2025-12-061-0/+1
| | | | | | | | | | | | | | | | using LTO. Referring to lto.inc in openembedded-core, when using lto, the LTO variable is added to SELECTED_OPTIMIZATION. In this case, with the clang toolchain, -fuse-ld=lld is added when using -flto, but the -fuse-ld=lld option is sufficient as a linker flag. If -fuse-ld=lld is present in CFLAGS, an unused-command-line-argument warning occurs. In recipes that treat this warning as an error, the build fails. aarch64-yoe-linux-clang: error: argument unused during compilation: '-fuse-ld=lld' [-Werror,-Wunused-command-line-argument] See more details https://errors.yoctoproject.org/Errors/Details/886599 Signed-off-by: mark.yang <mark.yang@lge.com>
* clang-legacy: Add -ffat-lto-objects to LTO settingsmark.yang2025-12-061-2/+2
| | | | | | | | | | | | | | | | | | | When enabling LTO in the clang toolchain, .o files are generated in LLVM IR bitcode format instead of ELF format. In this case, dwarfsrcfiles fails in do_package. See more details at: https://errors.yoctoproject.org/Errors/Details/886597 ``` dwarfsrcfiles: TOPDIR/build/tmp/work/cortexa72-yoe-linux/libcxx/21.1.4/package/usr/lib/libc++experimental.a: not a valid ELF file ``` As already discussed on the mailing list https://www.mail-archive.com/yocto@lists.yoctoproject.org/msg15501.html, setting `INHIBIT_PACKAGE_DEBUG_SPLIT = "1"` disables debug splitting. It is not desirable to disable debug splitting just to avoid the dwarfsrcfiles error. A simple solution, as Khem Raj suggested in the lto.inc file of openembedded-core, is to add the `-ffat-lto-objects` flag to the LTO settings. This keeps both IR bitcode and ELF format, preventing the error. Signed-off-by: mark.yang <mark.yang@lge.com>
* Do not set YOCTO_ALTERNATE_EXE_PATH and OCTO_ALTERNATE_LIBDIRKhem Raj2025-08-061-6/+0
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Remove COMPILER_RT/UNWINDLIB/LIBCPLUSPLUSKhem Raj2025-08-061-4/+0
| | | | | | clang runtime recipe set them rightly in core Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Drop octeon kludgeKhem Raj2025-08-061-4/+0
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Remove runtime-<RUNTIME> overrideKhem Raj2025-08-061-4/+0
| | | | | | | This is better fixed in recipes if needed now that clang is a core recipe. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Drop CCACHE_COMPILERCHECKKhem Raj2025-07-301-2/+0
| | | | | | This is gone from OE-core so good riddance Signed-off-by: Khem Raj <raj.khem@gmail.com>
* classes/clang-legacy: Remove rewrite of big.LITTLE -mcpu argsKhem Raj2025-07-281-16/+1
| | | | | | | These are not supported by clang, but now they are handled in core tune files. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy.bbclass: Unbolt rpi3/rpi4 workaroundKhem Raj2025-07-281-4/+1
| | | | | | This should be part of default tune infra in core Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Remove klibc specific pinsKhem Raj2025-07-281-4/+0
| | | | | | Its moved into klibc.bbclass in meta-initramfs Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Adjust to clang merging to core for YP compatibilityKhem Raj2025-07-281-74/+7
| | | | | | | | Some of these settings are moved to OE-core and some are deferred to distros where it belongs. This makes meta-clang compatible with YP again. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Add unwindlib to LDFLAGS as well, rtlib and unwindlibKhem Raj2025-07-161-1/+1
| | | | | | | | options should be in sync or else clang will not link the binaries | x86_64-yoesdk-linux-clang: error: --rtlib=libgcc requires --unwindlib=libgcc Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Do not use --unwindlib or -rtlib for native toolchainKhem Raj2025-07-061-2/+0
| | | | | | | It will add these options to gcc as well when building native recipes as it is implemented in oe-core, this logic is different so adjust Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Do not set TOOLCHAIN hereKhem Raj2025-07-061-2/+0
| | | | | | TOOLCHAIN is possible to set for target/native/nativesdk separately Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Adjust for oe-core changesKhem Raj2025-07-061-27/+14
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-legacy: Do not use toolchain-clang override for native/nativesdkKhem Raj2025-07-061-2/+2
| | | | | | | | clang.bbclass in oe-core will define toolchain-gcc for nativesdk and thats perhaps better, ideally we should depend on llvm runtime unconditionally, so a package can use either llvm or gcc runtimes Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Rename to clang-legacyKhem Raj2025-07-061-0/+162
A similar bbclass is added to oe-core, so rename it as legacy class Signed-off-by: Khem Raj <raj.khem@gmail.com>