summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use libgcc instead of compiler-rt on klibc appsKhem Raj2021-06-141-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>
* aufs-util,libhugetlbfs,libc-bench: Use libgcc unwinder on glibc/armKhem Raj2021-06-101-2/+3
| | | | | | | | these packages do static linking in parts and when libc is glibc then it has linked in some portions of libgcc since we can not use clang to compile glibc yet. Therefore use libgcc where needed for now Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nonclangable: Use libgcc for unwinder as well when using for builtinsKhem Raj2021-06-101-9/+11
| | | | | | | | | | | | | | clang 13 does not like to mix rtlib and unwindlib when using libgcc Fixes clang-13: error: --rtlib=libgcc requires --unwindlib=libgcc secondly compiler-rt does not havw 128 bit ( tf ) functions on x86 so fallback to libgcc for those use libatomic for x86 since 64bit atomics are not in compiler-rt Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Do not force libgcc libunwind in rv32 and rv64Khem Raj2021-06-101-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>
* clang: Update to latest on master branchKhem Raj2021-06-0835-63/+61
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* poke: Do not use -O2 with clangKhem Raj2021-06-081-0/+3
| | | | | | | | clang13 has a regression which segfaults the compiler while compiling poke, its reported upstream, until it is fixed do not use -O2 compiler switch Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nonclangable: pass -rtlib only when using clang with gnu runtime hereKhem Raj2021-06-081-9/+9
| | | | | | | The defaults wirh using RUNTIME = "llvm" is already pointing to compiler-rt there is no need to clutter cmdline Signed-off-by: Khem Raj <raj.khem@gmail.com>
* mongodb: Use llvm runtime when using clangKhem Raj2021-06-081-0/+1
| | | | | | | | | | Fixes linker errors like src/mongo/platform/overflow_arithmetic.h:63: error: undefined reference to '__mulodi4' src/mongo/platform/overflow_arithmetic.h:63: error: undefined reference to '__mulodi4' src/mongo/platform/overflow_arithmetic.h:63: error: undefined reference to '__mulodi4' src/mongo/platform/overflow_arithmetic.h:63: error: undefined reference to '__mulodi4' Signed-off-by: Khem Raj <raj.khem@gmail.com>
* mongodb: Remove from nonclangable listKhem Raj2021-06-081-2/+0
| | | | | | mongodb builds fine with latest clang/13.0.0 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* bcc: Update to master tipKhem Raj2021-06-089-913/+7
| | | | | | | | | | | | In order to use latest clang, latest bcc sources are needed, this also means that we need to use vendored libbpf as thats the newest one needed and avoids dependencies on kernel bpf headers which maybe old and out of sync examples use error.h header which is not available on musl therefore disable examples when building on musl Signed-off-by: Khem Raj <raj.khem@gmail.com>
* compiler-rt-sanitizers: Fix hwsan builds with llvm libunwindKhem Raj2021-06-082-0/+36
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* libunwind: Hide when llvm runtime is usedKhem Raj2021-06-081-0/+3
| | | | | | We want to use llvm libunwind implementation when RUNTIME = "llvm" Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Package libunwind independentlyKhem Raj2021-06-081-2/+4
| | | | | | This helps in ensuring it pose as RPROVIDES when llvm runtime is used Signed-off-by: Khem Raj <raj.khem@gmail.com>
* libunwind: Implement unw_backtraceKhem Raj2021-06-082-0/+56
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* libunwind: Install headers and pkgconfig fileKhem Raj2021-06-083-0/+21
| | | | | | | This ensures it can replace nongnu libunwind Use it only when selecting RUNTIME = "llvm" Signed-off-by: Khem Raj <raj.khem@gmail.com>
* ghostscript: Fix build when using libc++Khem Raj2021-06-081-0/+7
| | | | | | RUNTIME=llvm means we use libc++ instead of libstdc++ among other things Signed-off-by: Khem Raj <raj.khem@gmail.com>
* libc-bench: It works fine with new way of choosing llvm runtimeKhem Raj2021-06-081-3/+0
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Limit using clang to target recipes onlyKhem Raj2021-06-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>
* compiler-rt-native: Fix build with clangKhem Raj2021-06-081-3/+18
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nss: Pass options to select runtime for native partsKhem Raj2021-06-081-1/+1
| | | | | | | Since clang maybe configured to use llvm runtime, we need to ensure to use gnu runtime in native builds Signed-off-by: Khem Raj <raj.khem@gmail.com>
* layer.conf: Prefer llvm libunwind when RUNTIME = "llvm"Khem Raj2021-06-081-0/+1
| | | | | | Avoids conflicts with libunwind recipe from OE-Core Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang.bbclass: Adjust for clang default changesKhem Raj2021-06-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>
* libcxx: Build undwinder when RUNTIME = "llvm"Khem Raj2021-06-081-1/+5
| | | | | | | ensure that libcxx can be built when RUNTIME = "llvm" as it might need to pass some cmake compiler tests Signed-off-by: Khem Raj <raj.khem@gmail.com>
* compiler-rt-sanitizers: Use packageconfig to use static libcxxKhem Raj2021-06-081-6/+3
| | | | | | | | | | | | | sanitizers can link libc++/libc++abi statically or dynamically, we default to use dynamic version but leave the option to enable static linking if so needed Use virtual/crypt to represent crypt implementation which becomes libc independent Fix dependencies for native recipes Signed-off-by: Khem Raj <raj.khem@gmail.com>
* compiler-rt: Use gcc runtime to bootstrapKhem Raj2021-06-081-2/+8
| | | | | | | | | while compiler-rt may not use any of these libraries, but the cmake environment pokes for working compiler, linker and other tools, this ensures that it can build when RUNTIME = "llvm" and also RUNTIME = "gnu" Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Default to compiler-rt/libcxx/libunwind when RUNTIME = "llvm"Khem Raj2021-06-081-5/+9
| | | | | | | | | | | | This ensures that compiler defaults are defaulting to llvm provided c/c++ runtimes which includes c-runtime, c++runtime, unwinder and omp runtime, current approach is to inject commandline options but it does not get passed in all cases and a lot of smaller/big patches are used to make such package recipes behave If RUNTIME = "gnu" then defaults stay to use gcc runtime as it is Signed-off-by: Khem Raj <raj.khem@gmail.com>
* scan-build.bbclass: Fix typoKhem Raj2021-06-081-1/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* libcxx: Build libunwind shared lib when enabledKhem Raj2021-06-081-10/+7
| | | | | | | Use compile-rt consistently across when building libc++ and libc++abi and libunwind Signed-off-by: Khem Raj <raj.khem@gmail.com>
* compiler-rt-sanitizers: Do not package orc support libKhem Raj2021-06-081-0/+2
| | | | | | Its already shipped with compile-rt recipe Signed-off-by: Khem Raj <raj.khem@gmail.com>
* lldb: Do not build for mips as wellKhem Raj2021-06-081-4/+7
| | | | | | | lldb-server is not fully ported for mips yet see https://reviews.llvm.org/D102872 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* compiler-rt-sanitizers: Fix build on mipsKhem Raj2021-06-082-0/+30
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* compiler-rt-sanitizers: Limit to buildable arch/libc combinationsKhem Raj2021-06-081-0/+6
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* compiler-rt-sanitizers: Link with static C++ runtime when availableKhem Raj2021-06-082-0/+29
| | | | | | This fixes build on ARM Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Fix x86 tuple for include search pathsKhem Raj2021-06-082-0/+26
| | | | | | | | | | | | This ensures that search path for c++ headers is using right directory structure as per Openembedded gcc and sysroot install e.g. ignoring nonexistent directory "/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux-musl/compiler-rt/13.0.0-r0/recipe-sysroot/usr/lib/i686-yoe-linux-musl/11.1.0/../../../include/ c++/11.1.0/i386-linux-gnu" Signed-off-by: Khem Raj <raj.khem@gmail.com>
* compiler-rt: Fix sanitizer build on musl/x86_64Khem Raj2021-06-082-0/+69
| | | | | | backtrace APIs are glibc specific so do not use them Signed-off-by: Khem Raj <raj.khem@gmail.com>
* libclc: Pass -cl-no-stdinc to compiler and assemblerKhem Raj2021-06-081-0/+1
| | | | | | | | | | | | libclc uses clang CLC preprocessor on .ll files, llvm/clang-13 started including clc declarations by default (clang cf3ef15a6ec5e5b45c6c54e8fbe3769255e815ce), thus corrupting any .ll assembly files that are used by libclc. Inclusion of the default declarations can be turned off using a cmdline switch but that remains to be implemented in the libclc build system. manually adding '-cl-no-stdinc' should work as a workaround. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* spirv-llvm-translator: Upgrade to 13.0.0/trunkKhem Raj2021-06-083-63/+3
| | | | | | This is in sync with clang trunk (upcoming 13.0.0) release Signed-off-by: Khem Raj <raj.khem@gmail.com>
* openmp: Fix building amdgcn filesKhem Raj2021-06-081-3/+10
| | | | | | License name should be LICENSE.TXT not LICENSE.txt Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Upgrade to trunk/13.0 future seriesKhem Raj2021-06-0837-591/+196
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Import missing patch for Reporter.pyJan-Simon Möller2021-05-252-0/+223
| | | | | | | | | | | Upstream removed Reporter.py and added it back later. Backport the patch. Create 0033-Import-upstream-patch-to-re-add-Reporter.py.patch Upstream status: Backport of https://github.com/llvm/llvm-project/commit/3263c81589eca689341ab5084723bdb7fe4a1286 Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
* compiler-rt: Disable libfuzzer and profiler supportKhem Raj2021-05-191-0/+2
| | | | | | These are now moved into compiler-rt-sanitizers recipe Signed-off-by: Khem Raj <raj.khem@gmail.com>
* compiler-rt-sanitizers: Add recipeKhem Raj2021-05-191-0/+97
| | | | | | This recipe builds all sanitizers runtimes provided by compiler-rt Signed-off-by: Khem Raj <raj.khem@gmail.com>
* replace --rtlib with -rtlibKhem Raj2021-05-192-29/+29
| | | | | | This is advertised option from clang Signed-off-by: Khem Raj <raj.khem@gmail.com>
* compiler-rt: Remove -D_LIBCPP_HAS_MUSL_LIBC=ONKhem Raj2021-05-191-2/+0
| | | | | | this option is only effective when building libcxx Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Replace --stdlibc=libc++ with -stdlibc=libc++Khem Raj2021-05-192-4/+4
| | | | | | | | | 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: Enable dwarf-5 default debug infoKhem Raj2021-05-0434-61/+122
| | | | | | This matches with GCC 11 which is also defaulting to DWARF-5 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Add SDK_VENDOR string to CLANG_EXTRA_OE_VENDORSKhem Raj2021-04-261-1/+1
| | | | | | | | | | | | This helps in ensuring that SDK elements are built correctly as well, at present we get right builds for cross/target/native clang but not for nativesdk since it use SDK_VENDOR string for vendor eg. -yoesdk which currently is not added to known OE vendors, as a result nativesdk-clang does not build since crosssdk clang can not find runtime files e.g. libgcc Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Martin Jansa <Martin.Jansa@gmail.com>
* openssh: Link with compiler-rt when using clangKhem Raj2021-04-232-3/+1
| | | | | | | | clang -ftrapv, needs compiler-rt [1] [1] https://github.com/openssh/openssh-portable/blob/master/INSTALL#L7 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>
* layer.conf: Add 3.4 as supported releaseKhem Raj2021-04-151-1/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>