[Buildroot] [PATCH v4 09/10] package/llvm-project: bump to version 15.0.3

Romain Naour romain.naour at smile.fr
Wed Jul 12 13:06:00 UTC 2023


Hello,

Le 15/06/2023 à 15:43, Sebastian Weyer a écrit :
> From: Lang Daniel <d.lang at abatec.at>
> 
> - Add new build dependencies to lld and llvm
> - Add host-gcc and gcc >= 7.x dependency since clang doesn't build with gcc 6.3
> 
>   [ 28%] Building CXX object utils/TableGen/CMakeFiles/obj.clang-tblgen.dir/TableGen.cpp.o
>   output/build/host-clang-15.0.3/utils/TableGen/RISCVVEmitter.cpp: In instantiation of ‘{anonymous}::SemaSignatureTable::init(llvm::ArrayRef<{anonymous}::SemaRecord>)::<lambda(auto:2&)> [with auto:2 = const llvm::SmallVector<clang::RISCV::PrototypeDescriptor>]’:
>   /usr/include/c++/6/bits/stl_algo.h:3769:5:   required from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = std::_Rb_tree_const_iterator<llvm::SmallVector<clang::RISCV::PrototypeDescriptor> >; _Funct = {anonymous}::SemaSignatureTable::init(llvm::ArrayRef<{anonymous}::SemaRecord>)::<lambda(auto:2&)>]’
>   output/host/include/llvm/ADT/STLExtras.h:1611:23:   required from ‘UnaryFunction llvm::for_each(R&&, UnaryFunction) [with R = std::set<llvm::SmallVector<clang::RISCV::PrototypeDescriptor>, {anonymous}::SemaSignatureTable::init(llvm::ArrayRef<{anonymous}::SemaRecord>)::Compare>&; UnaryFunction = {anonymous}::SemaSignatureTable::init(llvm::ArrayRef<{anonymous}::SemaRecord>)::<lambda(auto:2&)>]’
>   output/build/host-clang-15.0.3/utils/TableGen/RISCVVEmitter.cpp:249:64:   required from here
>   output/build/host-clang-15.0.3/utils/TableGen/RISCVVEmitter.cpp:249:50: error: cannot call member function ‘void {anonymous}::SemaSignatureTable::insert(llvm::ArrayRef<clang::RISCV::PrototypeDescriptor>)’ without object
>     llvm::for_each(Signatures, [this](auto &Sig) { insert(Sig); });
>                                                       ^~~~~~
>   utils/TableGen/CMakeFiles/obj.clang-tblgen.dir/build.make:313: recipe for target 'utils/TableGen/CMakeFiles/obj.clang-tblgen.dir/RISCVVEmitter.cpp.o' failed
>   make[4]: *** [utils/TableGen/CMakeFiles/obj.clang-tblgen.dir/RISCVVEmitter.cpp.o] Error 1
> 
>   Indeed LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN is OFF, the CheckCompilerVersion.cmake
>   trigger an error if gcc < 7.x. Indded since llvm 15 this option check for C++17 [1]
> 
>   The last gcc 7.x version (7.5) has been released in 2019.
>   Fixing llvm/clang issues for old compiler maybe it's not worth it.
> 
> - Remove LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN since
>   gcc >= 7 is mendatory.
> 
>   When updating LLVM, we also need to update the version of
>   SPIRV_LLVM_TRANSLATOR because its CMakeLists.txt verifies the LLVM
>   base version [2].
> 
>   The patch
>   package/llvm/0002-Add-missing-cstdint-header-to-Signals.h.patch has
>   been included in tag llvmorg-15.0.0 of llvm-project.
> 
>   [1] https://github.com/llvm/llvm-project/commit/4c72deb613d9d8838785b431facb3eb480fb2f51
>   [2] https://github.com/KhronosGroup/SPIRV-LLVM-Translator/blob/5be08b8bb91fc6ca62857792c177bc7479e5e3db/CMakeLists.txt#LL82C6-L82C6
> 
> Signed-off-by: Daniel Lang <d.lang at abatec.at>
> Signed-off-by: Romain Naour <romain.naour at smile.fr>
> Signed-off-by: Sebastian Weyer <sebastian.weyer at smile.fr>
> ---
> v4: - update spirv-llvm-translator version as well
>     - remove package/llvm/0002-Add-missing-cstdint-header-to-Signals.h.patch
> 
> v3: - add libclc bump
>     - llvm, clang, lld, mesa3d (llvm): add gcc >= 7.x dependency
> 
> Changes v1 -> v2:
> - Bump to 15.0.3 instead of 15.0.1
> - llvm: use CMAKE_HOST_C_COMPILER instead of HOSTCC
> ---

I noticed a new runtime issue [1] with the ClangCompilerRT test:

# fuzz_me
==74==ERROR: AddressSanitizer failed to allocate 0x0 (0) bytes of
SetAlternateSignalStack (error code: 22)

The issue is due to the recent ARM aarch64 toolchain bump that provide a glibc
>= 2.34.

See bug reports [2] [3].

The issue has been fixed in llvm 13.0.0 [4] and it's fixed in Buildroot as soon
as the llvm/clang version bump to 15.0.x patch series is applied [5].

[1] https://gitlab.com/buildroot.org/buildroot/-/jobs/4621046299
[2] https://github.com/llvm/llvm-project/issues/55785
[3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100114
[4]
https://github.com/llvm/llvm-project/commit/82150606fb11d28813ae6da1101f5bda638165fe
[5] http://patchwork.ozlabs.org/project/buildroot/list/?series=359890

Best regards,
Romain




More information about the buildroot mailing list