Partially revert 6527682ab7 for llvm-based projects

Upstream llvm compiles most of their subprojects with -std=c++17
explicitly, not -std=gnu++17. In gnu++17 mode, both clang and gcc define
the macro 'i386' on i386, which clashes with a namespace identifier in
contrib/llvm-project/llvm/include/llvm/ExecutionEngine/JITLink/i386.h.

Since the default after 6527682ab7 is now CXXSTD=gnu++17, explicitly
set CXXSTD=c++17 for lib/clang, lib/libclang_rt and lib/libomp.
This commit is contained in:
Dimitry Andric 2025-04-24 14:03:38 +02:00
parent f83ec40fca
commit a34d2231fa
3 changed files with 3 additions and 0 deletions

View file

@ -119,6 +119,7 @@ LDFLAGS+= -Wl,-m,elf64lriscv_fbsd
.endif
.endif
CXXSTD= c++17
CXXFLAGS+= -fno-exceptions
CXXFLAGS+= -fno-rtti
.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING)

View file

@ -33,3 +33,4 @@ CXXFLAGS+= -fvisibility-inlines-hidden
CXXFLAGS+= -fvisibility=hidden
CFLAGS+= -I${CRTSRC}/include
CFLAGS+= -I${CRTSRC}/lib
CXXSTD= c++17

View file

@ -57,6 +57,7 @@ CFLAGS+= -fdata-sections
CXXFLAGS+= -fvisibility-inlines-hidden
CXXFLAGS+= -fno-exceptions
CXXFLAGS+= -fno-rtti
CXXSTD= c++17
.if ${COMPILER_TYPE} == "clang"
.if ${MACHINE_CPUARCH} == "i386"