aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2019-12-09 18:58:14 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2019-12-09 18:58:14 +0000
commit469884765efe2df126f6242ed1b4c77df412a655 (patch)
treedb23a3a23934764a3261dc3a39d2f6e2a8188562
parent2129081c7e704786e8c017cee8b349a22698395a (diff)
downloadports-469884765efe2df126f6242ed1b4c77df412a655.tar.gz
ports-469884765efe2df126f6242ed1b4c77df412a655.zip
MFH: r518116
Use clang 7 as compiler on 11.x and 12.x to fix build. clang 8 and later error for duplicate definitions of enum values. mdb depends on having identical but duplicate definitions. This was fixed differently in 13 with a change to the kernel, but that change is disruptive and cannot be easily backported. Reported by: pkg-fallout, Attila Nagy Approved by: bdrewery Differential Revision: https://reviews.freebsd.org/D22486 Approved by: ports-secteam (joneum)
Notes
Notes: svn path=/branches/2019Q4/; revision=519627
-rw-r--r--devel/mdb/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/devel/mdb/Makefile b/devel/mdb/Makefile
index 1e5968658d48..bc73a80b5fa2 100644
--- a/devel/mdb/Makefile
+++ b/devel/mdb/Makefile
@@ -9,7 +9,7 @@ COMMENT= Solaris Modular Debugger
LICENSE= CDDL
-USES= uidfix
+USES= compiler uidfix
USE_GITHUB= yes
GH_ACCOUNT= bsdjhb
@@ -31,6 +31,15 @@ CFLAGS+= -DMDB_PREFIX=\\\"${PREFIX}\\\" -g
IGNORE= requires full source tree with CDDL sources
.endif
+.if ${OSVERSION} < 1300015 && ${COMPILER_TYPE} == "clang" && \
+ ${COMPILER_VERSION} >= 80
+# clang 8 cannot compile due to enum redefinitions in kernel.h
+BUILD_DEPENDS+= ${LOCALBASE}/bin/clang70:devel/llvm70
+CPP= ${LOCALBASE}/bin/clang-cpp70
+CC= ${LOCALBASE}/bin/clang70
+CXX= ${LOCALBASE}/bin/clang++70
+.endif
+
pre-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/mdb/kvm/${MACHINE_ARCH}