aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/creduce/Makefile10
-rw-r--r--devel/creduce/files/builtin_is_constant_evaluated.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/devel/creduce/Makefile b/devel/creduce/Makefile
index d0cf2295c97f..ec9dfa3a841c 100644
--- a/devel/creduce/Makefile
+++ b/devel/creduce/Makefile
@@ -26,7 +26,7 @@ CONFIGURE_ENV= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_VER} \
CXX=${LOCALBASE}/bin/clang++${LLVM_VER} \
CPP=${LOCALBASE}/bin/clang-cpp${LLVM_VER}
-USES= autoreconf gmake libtool perl5
+USES= autoreconf compiler gmake libtool perl5
CFLAGS_powerpc64= -mabi=elfv2
@@ -36,4 +36,12 @@ CFLAGS_powerpc64= -mabi=elfv2
LLD_UNSAFE= yes
.endif
+.include <bsd.port.pre.mk>
+
+# Detect base system libc++ >= 14 by checking for COMPILER_VERSION.
+# Not really the ideal way, but it should work.
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 140
+CXXFLAGS+= -include ${FILESDIR}/builtin_is_constant_evaluated.h
+.endif
+
.include <bsd.port.mk>
diff --git a/devel/creduce/files/builtin_is_constant_evaluated.h b/devel/creduce/files/builtin_is_constant_evaluated.h
new file mode 100644
index 000000000000..2775e8fa1bf3
--- /dev/null
+++ b/devel/creduce/files/builtin_is_constant_evaluated.h
@@ -0,0 +1 @@
+constexpr bool __builtin_is_constant_evaluated() { return false; }