summaryrefslogtreecommitdiffstats
path: root/classes
Commit message (Collapse)AuthorAgeFilesLines
* clang.bbclass: create lld symbolic link in sysroot when ld-is-lld is setMing Liu2023-09-081-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> (cherry picked from commit 71321ddf78ea522b87a6b4bffefb14c988a6d921)
* clang.bbclass: Use BASELIB instead of base_libdir in YOCTO_ALTERNATE_LIBDIRKhem Raj2023-09-081-1/+1
| | | | | | | base_libdir may vary e.g. when using usrmerge feature Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit e8b870b3c0a0ca0ef7d41551b6e8a607d1a39433)
* clang: Enable altivec again for ppc32Khem Raj2023-09-081-4/+0
| | | | | | | This was disabled for musl issue which is not related to altivec Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 10461fab44ebdcee5e06c2eeb943b4d08f817965)
* clang.bbclass: Do not export llvm-config variablesKhem Raj2023-09-081-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> (cherry picked from commit 17a6480b5e03a73d38b2d26c072aa51957ae747d)
* clang.bbclass: Export YOCTO_ALTERNATE_LIBDIR and YOCTO_ALTERNATE_EXE_PATHKhem Raj2023-09-081-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> (cherry picked from commit 7008a2e1ee0755d5c35210f0bf5077f37126bf23)
* clang.bbclass: Be mindful of multilibs when adding tools dependenciesKhem Raj2023-09-081-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> (cherry picked from commit 1d8389b120231a2a1bfde478ec2910b14a808c7c)
* clang: Avoid double libcxx in BASE_DEFAULT_DEPSEsben Haabendal2023-09-081-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> (cherry picked from commit c63c71b03b413a590825861e3fcb1ebed42eb98a)
* clang.bbclass: Remove commented codeKhem Raj2023-09-081-4/+0
| | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 1eb90320efec7c904e4e71454f5239dda173c40d)
* clang: Use -mno-altivec for ppc 7400Khem Raj2023-09-081-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> (cherry picked from commit 321edad13fd9275fb08700252d58a38b2b400670)
* clang: Upgrade to latest on 14.xKhem Raj2023-09-081-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> (cherry picked from commit b3e3eeea3d64a7443ff7253f8ce4609b17ed5e3f)
* clang: Use GNU objdump on mipsKhem Raj2023-09-081-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> (cherry picked from commit a6cea51ab2b0923340012655ac0f13afba899e57)
* clang: set POPULATESYSROOTDEPS so that strip is presentRoss Burton2023-09-081-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> (cherry picked from commit bf344026d9798d8a9077aa7d52ba29e83cc4dd42)
* clang.bbclass: Use llvm provided binutils when using toolchain-clangKhem Raj2023-09-081-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> (cherry picked from commit 9bcf8e4c708e208b5f94633b94262f62a94d5162)
* clang.bbclass: Fix typo about big.LITTLE tune optionsyangpeng19952023-09-081-1/+1
| | | | | Signed-off-by: yangpeng1995 <1336781165@qq.com> (cherry picked from commit 6a447c0fcb1dc8dae08eb6bf2c12b0f0d7bdf637)
* clang: Remove unintended dependency on gcc-runtimeEsben Haabendal2023-09-081-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> (cherry picked from commit 03648d617e04ec46c227a52e35f5eff766f79814)
* clang: support android runtimeHsia-Jun(Randy) Li2023-09-081-3/+4
| | | | | Signed-off-by: Hsia-Jun(Randy) Li <randy.li@synaptics.com> (cherry picked from commit a494bbb6ec44a723703951a061c2adde5bca6852)
* Use GCC runtime on ppc32 and armv5Khem Raj2023-09-081-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> (cherry picked from commit e411e74db0fff0d1a915855daacff11f37a74e25)
* nativesdk-clang: Fix build when using RUNTIME = llvmKhem Raj2023-09-081-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> (cherry picked from commit 826f7287ffb8ae87bd843ecfe4a21a661bb03294)
* clang.bbclass: Convert libc-klibc override to new syntaxKhem Raj2023-09-081-1/+1
| | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 5b30d620ba40f6d4176adf668139404b97003daa)
* recipes: Fix remaining override conversionKhem Raj2023-09-081-1/+1
| | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 1fbf558d6ff699ae0c8b60ad8313515367e83898)
* Manually finish conversionMartin Jansa2023-09-082-5/+5
| | | | | | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 953591e89fba92501cf421adf448aa69caa12e14)
* meta-clang: Convert to new override syntaxSigned-off-by: Martin Jansa2023-09-082-57/+57
| | | | | | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 17737cc4ecd3aea2c978bf83e283bcb08d097487)
* clang: Depend on clang runtime when using RUNTIME = "llvm" for native packagesKhem Raj2023-09-081-0/+1
| | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 77394fabd1fee7f4ea3a9358dfba7e94e6a98e8d)
* libcxx: Fix native buildKhem Raj2023-09-081-11/+13
| | | | | | | | | | | | | Use libgcc with clang-native to compile it Fixes #465 Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 4d066667c3cbba3b88d2f8d6c5640f5f793d10b4) Conflicts: - recipes-devtools/clang/libcxx_git.bb: Commit 93552c79eed5daa44a24bf4b7a063a2ade739e97 had some of the changes already.
* Use libgcc instead of compiler-rt on klibc appsKhem Raj2023-09-081-0/+2
| | | | | | | | | | | | | | klibc does not provide libssp functions e.g. __stack_chk_guard and __stack_chk_guard which it expects from libc and compiler-rt code tend to use these functions, so when using compiler-rt it ends up with undefined symbols e.g. /usr/lib/clang/13.0.0/lib/linux/libclang_rt.builtins-armhf.a(divmoddi4.c.o): in function `__divmoddi4': divmoddi4.c:(.text+0x70): undefined reference to `__stack_chk_fail' arm-yoe-linux-gnueabi-ld.bfd: divmoddi4.c:(.text+0x74): undefined reference to `__stack_chk_guard' Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit bc2b5e4b874968745fdcfbcea43e2eb8eafa592e)
* clang: Do not force libgcc libunwind in rv32 and rv64Khem Raj2023-09-081-2/+0
| | | | | | | | llvm unwind can work on rv32 and rv64 with latest clang so open up that option Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit bfad2060bcf17f26fff1e6dd760732d551794c2b)
* clang.bbclass: Limit using clang to target recipes onlyKhem Raj2023-09-081-9/+9
| | | | | | | | since toolchain-clang maybe available for native as well now, it means we have to ensure we do not use it for native recipes _yet_ Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 95b2e77c088aacaae58aa9157fc7b7bde82527c8)
* clang.bbclass: Adjust for clang default changesKhem Raj2023-09-081-7/+11
| | | | | | | | | | | | | | | | Now that clang can pass right options automatically when RUNTIME = "llvm", adjust the variables e.g. COMPILER_RT/UNWINDLIB/LIBCPLUSPLUS are no more required to be defaulted Disable enforcing gcc runtime for packages using gcc as its no longer needed here but is taken care by RUNTIME variable as an aside it also helps in building native and nativesdk llvm runtimes Compute right dependencies based on selected RUNTIME along with COMPILER_RT/UNWINDLIB/LIBCPLUSPLUS variables Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit dc5e04e5819a5e7384ae48f1740ac82970a80b8f)
* scan-build.bbclass: Fix typoKhem Raj2023-09-081-1/+1
| | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit da92b363e8b57c506250cd677436d1a44b163c98)
* clang.bbclass: Replace mcpu with mtune to match dunfellCaner Altinbasak2023-02-231-1/+1
| | | | | | | | dunfell meta/conf/machine/include/tune-cortexa57-cortexa53.inc defines mtune, not, mcpu. clang.bbclass attempts to remove these optimisations but it fails due to mismatch. Signed-off-by: Caner Altinbasak <cal@brightsign.biz>
* replace --rtlib with -rtlibKhem Raj2021-05-191-3/+3
| | | | | | This is advertised option from clang Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Replace --stdlibc=libc++ with -stdlibc=libc++Khem Raj2021-05-191-2/+2
| | | | | | | | | This ensures that it matches with CMake's understanding of this option and when its removed then it silently removes -stdlibc=libc++ but leaves the spurious '-' in the commandline which confuses the compiler as it them expects input from stdin Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Define CMAKE_CLANG_TIDY directly using ${HOST_PREFIX}clang-tidyKhem Raj2021-04-231-4/+1
| | | | | | | There is no need for exporting CLANG_TIDY, since its not a standard variable Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Replace mtune with mcpu to match oe-coreKhem Raj2021-01-261-5/+5
| | | | | | Fixes Issue #415 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Set CCACHE_COMPILERCHECK as default valueMike Crowe2021-01-251-1/+1
| | | | | | | | | | | | | oe-core's ccache.bbclass contains: export CCACHE_COMPILERCHECK ?= "%compiler% -dumpspecs" which sets a default value and allows others to easily override the value of CCACHE_COMPILERCHECK if they wish to. Let's update clang.bbclass to also set only the default value of CCACHE_COMPILERCHECK too. Signed-off-by: Mike Crowe <mac@mcrowe.com>
* clang.bbclass: Remove -mcpu option for the octeontx2 coreKevin Hao2021-01-041-0/+3
| | | | | | | | | | The tune file for octeontx2 has been added into oe-core by commit ad4f82742c6f ("tune-octeontx2.inc: Add tune for Marvell OCTEON TX2 core"). But the clang doesn't support this core yet. So remove the -mcpu from the TUNE_CCARGS to fix the build failure for the octeontx2 core. Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
* clang: Use lld for LTO linkKhem Raj2020-11-131-1/+2
| | | | | | | | | Core uses a dumb utility called dwarfsrcfiles to grok source file names and it assumes that .o and .a files are good old ELF files, that is not true when using LTO in which case it becomes IR code, this tool starts to puke, therefore disable using this tool Signed-off-by: Khem Raj <raj.khem@gmail.com>
* lto: Override LTO variable from oe-core for thin-ltoKhem Raj2020-11-132-7/+2
| | | | | | If thin-lto is used in DISTRO_FEATURES then enable thin-lto Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Use -mno-relax with clang for riscvKhem Raj2020-11-131-0/+4
| | | | | | lld yet does not work relaxation so accomodate for that so LTO can work Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Use python3 explicitly in scriptsKhem Raj2020-10-151-0/+9
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* classes/clang.bbclass: Remove -mmusl flag from toolchain.cmake.Leon Woestenberg2020-09-301-0/+1
| | | | | | | | | | The -mmusl flag is GCC specific, Clang supports MUSL differently. Prevents clang-11: error: unknown argument: '-mmusl' Verified it does not affect the GCC toolchain.cmake build. Signed-off-by: Leon Woestenberg <leon@sidebranch.com>
* clang: usrmerge workaroundOleksandr Ocheretnyi2020-07-021-0/+2
| | | | | | | | | | | | | | | |  * issue:     the openembedded-core build procedure relies on changed default dynamic loader path when the usrmerge distro feature turned on. As we can find the GCC which is used as default toolchain uses SYSTEMLIBS_DIR macro variable set to /usr/(lib|lib64) at build time and hardcodes the binaries with that default loader path.  * solution:     change the default dynamic loader location with --dyld-prefix clang option to conform the loader location (as GCC does) to openembedded-core build procedure. Signed-off-by: Oleksandr Ocheretnyi <oocheret@cisco.com>
* clang.bbclass: Define -target in HOST_CC_ARCHKhem Raj2020-05-161-0/+1
| | | | | | | This helps extra tools like clang-tidy to find arch-specific macros, headers in a cross compile environment. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Define CLANG_TIDY and extend it to cmake as wellKhem Raj2020-05-161-1/+8
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* cmake-native.bbclass: remove reset of CCACHEKai Kang2020-05-151-3/+0
| | | | | | | | | | It reset variable CCACHE to disable ccache. But that doesn't effect that CCACHE is set in an anonymous function from ccache.bbclass at last and ccache is always not disabled with cmake. Remove these useless piece of code. Signed-off-by: Kai Kang <kai.kang@windriver.com>
* clang.bbclass: override CCACHE_COMPILERCHECKKai Kang2020-05-151-0/+1
| | | | | | | | | | | | It fails to build compiler-rt when ccache is enabled: | ccache: error: Failure running compiler check command: %compiler% -dumpspecs Because clang doesn't recognize option '-dumpspecs' from default value of CCACHE_COMPILERCHECK, override CCACHE_COMPILERCHECK for toolchain clang in clang.bbclass. Signed-off-by: Kai Kang <kai.kang@windriver.com>
* clang.bbclass: Handle big.LITTLE mtune options on arm/aarch64Khem Raj2020-04-231-0/+7
| | | | | | | | | | | Clang does not yet support big.LITTLE performance tunes, so use the LITTLE for tunes see [1] Fixes Issue #313 [1] https://reviews.llvm.org/D32076 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* recipes: Do not Add -Wno-error=unused-command-line-argument globallyKhem Raj2020-03-161-1/+1
| | | | | | | This option can turn Valid options into warnings and cause unintended behaviour Signed-off-by: Khem Raj <raj.khem@gmail.com>
* cmake-native.bbclass: Add include and libdir from native sysrootKhem Raj2020-02-211-0/+8
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Use 64bit long double on musl/ppc64leKhem Raj2020-01-231-0/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>