summaryrefslogtreecommitdiffstats
path: root/classes
Commit message (Collapse)AuthorAgeFilesLines
* 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-native.bbclass: DeleteKhem Raj2025-07-061-23/+0
| | | | | | This is now available in oe-core Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Rename to clang-legacyKhem Raj2025-07-061-0/+0
| | | | | | A similar bbclass is added to oe-core, so rename it as legacy class Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Do not add lld linker for ppc32 when ld-is-lld is in distro featuresKhem Raj2025-05-061-1/+2
| | | | | | Causes binaries to segfault in qemu user mode Signed-off-by: Khem Raj <raj.khem@gmail.com>
* cmake-native: RemoveKhem Raj2025-05-051-56/+0
| | | | | | Moved to OE-core Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass,compiler-rt: Do not set -target for native clangKhem Raj2025-03-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | When building native recipes using clang as native compiler e.g. compiler-rt-native, setting -target can be out of sync with the underlying distro's understanding of gcc tuple e.g. aarch64-linux or aarch64-linux-gnu, which is used by distros to house the gcc runtime e.g. on ubuntu /usr/lib/gcc/aarch64-linux-gnu/11 /usr/lib/gcc/aarch64-linux-gnu/9 if we provide -target its not able to deduce it from the build host which is required for native packages try with recipe-sysroot-native/usr/bin/clang -xc /dev/null -rtlib=libgcc --unwindlib=libgcc -stdlib=libstdc++ -v or recipe-sysroot-native/usr/bin/clang -xc /dev/null -rtlib=libgcc --unwindlib=libgcc -stdlib=libstdc++ -target aarch64-linux -v to see the difference Signed-off-by: Khem Raj <raj.khem@gmail.com>
* recipes: Update to match OE-Core virtual/cross-* changesRichard Purdie2025-01-211-1/+1
| | | | | | | Update meta-clang to match OE-Core changes to use recipe specific virtual providers (without yet switching to the new switching mechanism). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* clang.bbclass: Use ld.lld as default for LD with ld-is-lldKhem Raj2024-10-101-0/+1
| | | | | | | | When ld-is-lld is in DISTRO_FEATURE, user wants to use lld as system linker, therefore honor the setting for bare linker as well, for compiler its being taken care by clang itself using -fuse-ld=lld Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Do not override default ld with ld.lldKhem Raj2024-10-101-11/+0
| | | | | | | | | | | This creates a problem when swapping linkers, it does not work without cleaning the recipe first, in anycase if we want to use lld as default in clang then it should be done during clang compile Add packageconfig to let clang defualt Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: remove mcpu option with qualifiers for the octeontx2 coreRuiqiang Hao2024-07-041-1/+1
| | | | | | | | | Currently, only the '-mcpu=octeontx2' option is removed, and any -mcpu parameters with qualifiers (such as +crc+crypto) are not removed, e.g., '-mcpu=octeontx2+crypto'. Remove these mcpu parameters with qualifiers by using '-mcpu=octeontx2${TUNE_CCARGS_MARCH_OPTS}'. Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
* clang.bbclass: Do not lose TUNE_CCARGS_MARCH_OPTS when rewriting big.LITTLE mcpuKhem Raj2024-03-191-5/+13
| | | | | | | | | Currently, clang options lose the qualifiers like +crc+crypto which are in TUNE_CCARGS_MARCH_OPTS when options like -mcpu=big.little are transformed to -mcpu=little as clang does not understand -mcpu=big.little while gcc does. Here we append TUNE_CCARGS_MARCH_OPTS after the rewrite Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Use +nocrypto with -mcpu for rpi3/rpi4Khem Raj2024-03-191-0/+4
| | | | | | This avoids qtwebengine crashes on rpi4/rpi3 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Revert "cmake-native.bbclass: Add ubfs specific variable to ignore list"Khem Raj2023-11-221-2/+0
| | | | | | | | The problem is in BSP layer [1], these variable should not be exported universally moreover its not needed as well. [1] https://github.com/varigit/meta-variscite-bsp-imx/pull/36 This reverts commit 288f752445d3783dbaf06a60919a2b35b14e3a62.
* cmake-native.bbclass: Add ubfs specific variable to ignore listKhem Raj2023-11-221-0/+2
| | | | | | | | These variables show up as dependencies of native recipes otherwise can cause clang-native to rebuild without a reason just when defined by a machine using ubifs. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Stage along with gcc toolchainKhem Raj2023-11-121-1/+1
| | | | | | | | | So far when using toolchain = clang would punt gcc from native-sysroot but its beneficial to keep both compilers since they can co-exist its not a big problem to have both in sysroot. This helps in debugging issues as well. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: fix a typoMing Liu2023-10-301-1/+1
| | | | | | A pair of '[]' is missing, add them in. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* clang.bbclass: Use llvm-strip on all architecturesKhem Raj2023-10-251-2/+1
| | | | | | It was just used for RISCV32/RISCV64 until now. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* meta-clang: Replace RUNTIME with TC_CXX_RUNTIMEKhem Raj2023-10-251-9/+9
| | | | | | TC_CXX_RUNTIME is now defined in OE-core Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Simplify check when to enable lldKhem Raj2023-08-311-2/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* scan-build: Add --no-browser option to scan-viewKhem Raj2023-08-141-1/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* scan-build.bbclass: Use 0.0.0.0 for CLANG_SCAN_SERVER_IPKhem Raj2023-08-141-2/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* recipe_sysroot_check_ld_is_lld: Do not create symlink for allarch recipesKhem Raj2023-08-121-0/+1
| | | | | | | | | | | allarch recipes do not really need compiler toolchains, otherwise they are not allarch Fixes issues like | ln: failed to create symbolic link 'TOPDIR/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/ca-certificates/20211016-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux/aarch64-yoe-linux-ld': No such file or directory Reported-by: Cliff Brake <cbrake@bec-systems.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Use llvm-strip for rv32/rv64Khem Raj2023-06-161-1/+2
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* recipe_sysroot_check_ld_is_lld: Use STAGING_BINDIR_TOOLCHAIN to find ↵Khem Raj2023-06-111-1/+1
| | | | | | | | compiler installation This ensures correct directory is used to create linker symlink Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Check for INHIBIT_DEFAULT_DEPS in creating ld->lld symlinkKhem Raj2023-06-091-1/+2
| | | | | | | | | | | When INHIBIT_DEFAULT_DEPS = "1" then the toolchain is not staged in Recipe specific native sysroot at all, therefore there is no point of creating the symlink Moreover it also fixes build of such recipes when ld-is-lld is set at distro level Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: create lld symbolic link in sysroot when ld-is-lld is setMing Liu2023-05-161-0/+10
| | | | | | | | | Create a symbolic link lld -> ld in recipe sysroot to choose the default linker lld when ld-is-lld is set in DISTRO_FEATURES. othereise, we can get linking issues when '-fuse-ld=lld' is in LDFLAGS but the actual ld is not lld. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* clang.bbclass: Remove gcc specific -fcanon-prefix-mapKhem Raj2023-04-281-1/+4
| | | | | | This option is not available in clang yet Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Revert "toolchain-clang: Specify -ffile-compilation-dir to omit absolute ↵Khem Raj2022-10-101-2/+0
| | | | | | | | | | file paths in debug info" Original issue has been fixed in clang 15+, -ffile-compilation-dir actually conflicts with creating separate -src packages since it confuses the packager about relative locations of the source files This reverts commit 224863150c9320b32f344792928af7fbda56d65d.
* clang.bbclass: Allow creating src-pkgsKhem Raj2022-10-071-1/+0
| | | | | | | Older versions of clang sometime crashed so this was a workaround but it degrades debugging experience especially with SDK. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Remove -mno-relaxKhem Raj2022-09-121-4/+0
| | | | | | clang-15 now supports linker relaxations therefore enable it Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Add a comment to describe RUNTIME combinationsKhem Raj2022-09-121-0/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-native.bbclass: Move to classes folderKhem Raj2022-09-031-0/+23
| | | | | | | | | | classes-recipe domain is new and will break kirkstone and need very recent bitbake, let it settle some dust before adopting it for meta-clang Fixes https://github.com/kraj/meta-clang/issues/651 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Do not use llvm-strip for nowKhem Raj2022-08-301-1/+1
| | | | | | | We need a fix for https://github.com/llvm/llvm-project/issues/57407 before we can re-enable it Signed-off-by: Khem Raj <raj.khem@gmail.com>
* toolchain-clang: Specify -ffile-compilation-dir to omit absolute file paths ↵Khem Raj2022-08-121-0/+2
| | | | | | | | | | | | in debug info Clang does not remap the src filename in asm files debug info when using -fdebug-prefix-map but gcc does [1], however, there is an option to help reproducibility with clang namely ffile-compilation-dir to remove the source directory from path. use it globally with clang compiler [1] https://github.com/llvm/llvm-project/issues/56609 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Use BASELIB instead of base_libdir in YOCTO_ALTERNATE_LIBDIRKhem Raj2022-04-241-1/+1
| | | | | | base_libdir may vary e.g. when using usrmerge feature Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Enable altivec again for ppc32Khem Raj2022-04-241-4/+0
| | | | | | This was disabled for musl issue which is not related to altivec Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Do not export llvm-config variablesKhem Raj2022-03-291-6/+4
| | | | | | | | | exporting them changes signatures of the tasks for all recipes includeing native ones, so when meta-clang is not used it ends up building all native recipes too. Defining these variables is good enought for clang to see them in do_compile shell for target recipes Signed-off-by: Khem Raj <raj.khem@gmail.com>