Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 2019 22:22:05 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r518116 - head/devel/mdb
Message-ID:  <201911212222.xALMM54C040270@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb (src,doc committer)
Date: Thu Nov 21 22:22:04 2019
New Revision: 518116
URL: https://svnweb.freebsd.org/changeset/ports/518116

Log:
  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
  MFH:		2019Q3
  Differential Revision:	https://reviews.freebsd.org/D22486

Modified:
  head/devel/mdb/Makefile

Modified: head/devel/mdb/Makefile
==============================================================================
--- head/devel/mdb/Makefile	Thu Nov 21 21:51:33 2019	(r518115)
+++ head/devel/mdb/Makefile	Thu Nov 21 22:22:04 2019	(r518116)
@@ -9,7 +9,7 @@ COMMENT=	Solaris Modular Debugger
 
 LICENSE=	CDDL
 
-USES=		uidfix
+USES=		compiler uidfix
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	bsdjhb
@@ -29,6 +29,15 @@ CFLAGS+=	-DMDB_PREFIX=\\\"${PREFIX}\\\" -g
 
 .if !exists(${SRC_BASE}/cddl/compat) || !exists(${SRC_BASE}/sys/cddl/compat)
 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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911212222.xALMM54C040270>