HomeFreeBSD

devel/flang-clang: fix build with libc++ 14

Description

devel/flang-clang: fix build with libc++ 14

During an exp-run for llvm 14 (see bug 261742), it turned out that
devel/flang-clang fails to build with libc++ 14:

  • Performing Test LLVM_NO_OLD_LIBSTDCXX - Failed

CMake Error at /usr/local/llvm70/lib/cmake/llvm/CheckCompilerVersion.cmake:38 (message):

Host Clang must be able to find libstdc++4.8 or newer!

Call Stack (most recent call first):

/usr/local/llvm70/lib/cmake/llvm/HandleLLVMOptions.cmake:9 (include)
CMakeLists.txt:95 (include)
  • Configuring incomplete, errors occurred!

See also "/wrkdirs/usr/ports/devel/flang-clang/work/.build/CMakeFiles/CMakeOutput.log".
See also "/wrkdirs/usr/ports/devel/flang-clang/work/.build/CMakeFiles/CMakeError.log".

  • Error code 1

This is because libc++ 14 no longer builds if the compiler doesn't
support __builtin_is_constant_evaluated(). Similar to other ports, add a
wrapper to make it work.

PR: 263179
Approved by: maintainer timeout (2 weeks)
MFH: 2022Q2

Details

Provenance
dimAuthored on Apr 9 2022, 3:12 PM
Parents
R11:84cb3885ad58: shells/starship: Update 1.6.2 -> 1.6.3
Branches
Unknown
Tags
Unknown