kumquat-buildroot/package/llvm-project/clang/Config.in
Lang Daniel d8291fde5e package/llvm-project: bump to version 15.0.3
- 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] 4c72deb613
  [2] 5be08b8bb9/CMakeLists.txt (LL82C6-L82C6)

Signed-off-by: Daniel Lang <d.lang@abatec.at>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr>
Tested-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-07-20 22:57:43 +02:00

28 lines
980 B
Plaintext

config BR2_PACKAGE_CLANG
bool "clang"
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_INSTALL_LIBSTDCPP
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
depends on !BR2_STATIC_LIBS
depends on BR2_USE_WCHAR # std::wstring
depends on BR2_HOST_GCC_AT_LEAST_7
select BR2_PACKAGE_LLVM
help
Clang is a C/C++, Objective C/C++ and OpenCL C front-end
for the LLVM compiler.
http://clang.llvm.org
comment "clang needs a toolchain w/ wchar, threads, C++, gcc >= 7, dynamic library, host gcc >= 7"
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_7 \
|| BR2_STATIC_LIBS || !BR2_USE_WCHAR \
|| !BR2_HOST_GCC_AT_LEAST_7
comment "clang needs a toolchain not affected by GCC bug 64735"
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735