summaryrefslogtreecommitdiffstats
path: root/classes
Commit message (Collapse)AuthorAgeFilesLines
* clang: Do not add lld linker for ppc32 when ld-is-lld is in distro featuresHEADmasterKhem Raj6 days1-1/+2
| | | | | | Causes binaries to segfault in qemu user mode Signed-off-by: Khem Raj <raj.khem@gmail.com>
* cmake-native: RemoveKhem Raj7 days1-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>
* clang.bbclass: Export YOCTO_ALTERNATE_LIBDIR and YOCTO_ALTERNATE_EXE_PATHKhem Raj2022-03-241-0/+9
| | | | | | | These variables are used during target package compiles in packages which user llvm-config e.g. libclc Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Be mindful of multilibs when adding tools dependenciesKhem Raj2022-03-181-2/+2
| | | | | | | This ensures that multilib prefix is respected in dependencies and can be handled when distro enables multilib Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Avoid double libcxx in BASE_DEFAULT_DEPSEsben Haabendal2022-03-171-1/+1
| | | | | | | When RUNTIME=="llvm" the libcxx entry will be added in a separate if clause right after this. We don't need it twice. Signed-off-by: Esben Haabendal <esben.haabendal@huawei.com>
* clang.bbclass: Remove commented codeKhem Raj2022-03-131-4/+0
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Use -mno-altivec for ppc 7400Khem Raj2022-03-131-7/+11
| | | | | | | | | | | Workaround qemuppc illegal instruction trap on vxor instruction emulation this instruction is emitted by clang with -mcpu=7400 on ppc32 when compiling musl/strspn.c file The crash shows up running qemu-ppc via gobject-introspection, so a long unwieldy path but we know whats happening Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Upgrade to latest on 14.xKhem Raj2022-03-101-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable __int128 for compiler-rt/ppc32 Drop redundant ppc patch which is fixed upstream already Brings these fixes * e879b2bf82ef [libcxxabi] [test] Depend on unwind only if available * 569b773323a3 [libcxx][CI] Set Arm triples to match native clang build's default * f7007c570a21 Lambdas are not necessarily locals. This resolves DR48250. * eb84577cbc23 Revert "[release] Use the Bootstrapping build for building LLVM releases" * d843bde69aab [clang][driver] Fix float128 diagnostics with glibc >= 2.32 * ba9ff030d302 [SimplifyCFG][PhaseOrdering] Defer lowering switch into an integer range comparison and branch until after at least the IPSCCP * da3953fb0315 [NFC][PhaseOrdering] Add some tests from D119839 * 8b51e5ee0a2e [NewPM][Inliner] Make inlined calls to functions in same SCC as callee exponentially expensive * 6a713120502a [llvm] [bindings/OCaml] Remove unused dep on ounit2 * 2de2a2bba998 [LICM][PhaseOrder] Don't speculate in LICM until after running loop rotate * 7d1cd3380add [NFC][PhaseOrdering] Improve test coverage for D119975 * 1f4613675051 [NFC][PhaseOrdering] spurious-peeling.ll: also test -O1/-O2 results * 36bf1a9e628d [NFC][PhaseOrdering] Precommit tests from D119965 * 67555104d23a [MachineSink] Disable if there are any irreducible cycles * 1e4fd59253c6 [CodeGen] Add test for PR53990 (NFC) * bfaed485756a [BOLT][CMAKE] Remove CMake 3.13.4 incompatible parameter * 43b4544023b7 [LLD] [COFF] Order .debug_* sections at the end, to avoid leaving gaps if stripped * e6d2aa9b0f13 [MC][WebAssembly] Fix crash when relocation addend underlows U32 * f6a4df3a0a3d [WebAssembly] Covert llvm/test/MC/WebAssembly/reloc-code.ll to asm. NFC * 9d54fe21c67f [docs] Add RISC-V release notes for LLVM 14 * 1e3d5ccab6b6 Add cmake to source release tarballs * 0205cc086e50 [OpenMP][FIX] Ensure custom state machine works * 0826716786cd [Mips] support "sp" named register * 09546e1b5103 [libc++][doc] Update the release notes. * 8f9f84c6873e [docs] clang/docs/ReleaseNotes.rst: Add blank line * aab33202d239 [docs] PowerPC release notes formatting/grammar fixes * acf67b7a0dfc [docs] Tweak wording of note re: LTO on AIX * ce1e90fc8dba [docs] Add PowerPC release notes for LLVM 14 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Revert "clang: Use GNU objdump on mips"Khem Raj2022-03-031-3/+0
| | | | This reverts commit a6cea51ab2b0923340012655ac0f13afba899e57.
* clang: Use GNU objdump on mipsKhem Raj2022-02-241-0/+3
| | | | | | | There are missing features in llvm-objdump especially for gnu-hash sections for mips Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: set POPULATESYSROOTDEPS so that strip is presentRoss Burton2022-02-231-0/+3
| | | | | | | | | | | | do_populate_sysroot will execute the cross STRIP as part of the processing. In non-clang builds this is present via POPULATESYSROOTDEPS pulling in binutils, but in clang builds STRIP is set to llvm-strip which obviously isn't part of binutils. Set POPULATESYSROOTDEPS correctly to ensure that do_populate_sysroot has the strip binary available. Signed-off-by: Ross Burton <ross.burton@arm.com>
* clang.bbclass: Use llvm provided binutils when using toolchain-clangKhem Raj2022-02-211-0/+5
| | | | | | | These tools are better integrated with clang produced output consumption pipeline, therefore use them when using clang as compiler Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Fix typo about big.LITTLE tune optionsyangpeng19952022-02-201-1/+1
| | | | Signed-off-by: yangpeng1995 <1336781165@qq.com>
* clang: Remove unintended dependency on gcc-runtimeEsben Haabendal2022-02-151-1/+3
| | | | | | | | | | | Commit a494bbb6ec44 ("clang: support android runtime") introduced an unrelated change causing builds with RUNTIME="llvm" and COMPILER_RT not set to get a dependency on virtual/${TARGET_PREFIX}compilerlibs. This is clearly unrelated to addition of support for android runtime, and causing unwanted depdencies to gcc-runtime for LLVM builds. Signed-off-by: Esben Haabendal <esben.haabendal@huawei.com>
* clang: support android runtimeHsia-Jun(Randy) Li2021-12-151-3/+4
| | | | Signed-off-by: Hsia-Jun(Randy) Li <randy.li@synaptics.com>
* Use GCC runtime on ppc32 and armv5Khem Raj2021-12-091-0/+4
| | | | | | | libcxx does not build for armv5 due to atomic locks issue and compile-rt cross build needs to be fixed for ppc32 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nativesdk-clang: Fix build when using RUNTIME = llvmKhem Raj2021-09-271-0/+1
| | | | | | | | | | | | We can not use nativesdk variants of libcxx and compiler-rt yet when compiling nativesdk-clang because, it will need this compiler to build them, so solve this catch-22, since we do not use the runtime built during compiler builds, use libgcc/libstdc++ to pass cmake tests during configure, this should be fine as it will be not needed for final builds where nativesdk-clang will be used, it can still default to llvm runtime on SDK host Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Convert libc-klibc override to new syntaxKhem Raj2021-08-041-1/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>