View | Details | Raw Unified | Return to bug 214549 | Differences between
and this patch

Collapse All | Expand All

(-)devel/llvm39/Makefile (-12 / +9 lines)
Lines 5-13 Link Here
5
PORTREVISION=	4
5
PORTREVISION=	4
6
CATEGORIES=	devel lang
6
CATEGORIES=	devel lang
7
MASTER_SITES=	http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR}
7
MASTER_SITES=	http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR}
8
PKGNAMESUFFIX=	${LLVM_SUFFIX}
8
DISTNAME=	${PORTNAME}-${DISTVERSION}.src
9
DISTNAME=	${PORTNAME}-${DISTVERSION}.src
9
DISTFILES=	${PORTNAME}-${DISTVERSION}.src${EXTRACT_SUFX}
10
DISTFILES=	${PORTNAME}-${DISTVERSION}.src${EXTRACT_SUFX}
10
PKGNAMESUFFIX=	${LLVM_SUFFIX}
11
11
12
MAINTAINER=	brooks@FreeBSD.org
12
MAINTAINER=	brooks@FreeBSD.org
13
COMMENT=	LLVM and Clang
13
COMMENT=	LLVM and Clang
Lines 48-55 Link Here
48
OPTIONS_DEFAULT_i386=	COMPILER_RT
48
OPTIONS_DEFAULT_i386=	COMPILER_RT
49
OPTIONS_SUB=	yes
49
OPTIONS_SUB=	yes
50
50
51
PLIST_FILES=
52
53
CLANG_DESC=	Build clang
51
CLANG_DESC=	Build clang
54
CLANG_EXTRA_PATCHES= \
52
CLANG_EXTRA_PATCHES= \
55
	${PATCHDIR}/clang-patch-svn-r280672 \
53
	${PATCHDIR}/clang-patch-svn-r280672 \
Lines 74-80 Link Here
74
DOCS_PLIST_FILES=	${MAN1SRCS:S|^|man/man1/|:S|.1$|${LLVM_SUFFIX}.1.gz|}
72
DOCS_PLIST_FILES=	${MAN1SRCS:S|^|man/man1/|:S|.1$|${LLVM_SUFFIX}.1.gz|}
75
EXTRAS_DESC=		Extra clang tools
73
EXTRAS_DESC=		Extra clang tools
76
EXTRAS_IMPLIES=		CLANG
74
EXTRAS_IMPLIES=		CLANG
77
EXTRAS_DISTFILES= clang-tools-extra-${DISTVERSION}.src${EXTRACT_SUFX}
75
EXTRAS_DISTFILES=	clang-tools-extra-${DISTVERSION}.src${EXTRACT_SUFX}
78
GOLD_DESC=		Build the LLVM Gold plugin for LTO
76
GOLD_DESC=		Build the LLVM Gold plugin for LTO
79
GOLD_CMAKE_ON=		-DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include
77
GOLD_CMAKE_ON=		-DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include
80
GOLD_BUILD_DEPENDS=	${LOCALBASE}/bin/ld.gold:devel/binutils
78
GOLD_BUILD_DEPENDS=	${LOCALBASE}/bin/ld.gold:devel/binutils
Lines 195-213 Link Here
195
193
196
.if ! ${OPTIONS_DEFINE:MCOMPILER_RT}
194
.if ! ${OPTIONS_DEFINE:MCOMPILER_RT}
197
# Hack to disable COMPILER_RT in plist of unsupported architectures
195
# Hack to disable COMPILER_RT in plist of unsupported architectures
198
PLIST_SUB+=    COMPILER_RT="@comment "
196
PLIST_SUB+=	COMPILER_RT="@comment "
199
.else
197
.else
200
.endif
198
.endif
201
199
202
.if ! ${OPTIONS_DEFINE:MGOLD}
200
.if ! ${OPTIONS_DEFINE:MGOLD}
203
# Hack to disable GOLD in plist of unsupported architectures
201
# Hack to disable GOLD in plist of unsupported architectures
204
PLIST_SUB+=    GOLD="@comment "
202
PLIST_SUB+=	GOLD="@comment "
205
.else
203
.else
206
.endif
204
.endif
207
205
208
.if ! ${OPTIONS_DEFINE:MOPENMP}
206
.if ! ${OPTIONS_DEFINE:MOPENMP}
209
# Hack to disable OPENMP in plist of unsupported architectures
207
# Hack to disable OPENMP in plist of unsupported architectures
210
PLIST_SUB+=    OPENMP="@comment "
208
PLIST_SUB+=	OPENMP="@comment "
211
.else
209
.else
212
.endif
210
.endif
213
211
Lines 222-228 Link Here
222
220
223
.include <bsd.port.pre.mk>
221
.include <bsd.port.pre.mk>
224
222
225
_CRTLIBDIR=    ${LLVM_PREFIX:S|${PREFIX}/||}/lib/clang/${LLVM_RELEASE}/lib/freebsd
223
_CRTLIBDIR=	${LLVM_PREFIX:S|${PREFIX}/||}/lib/clang/${LLVM_RELEASE}/lib/freebsd
226
.if ${ARCH} == "amd64"
224
.if ${ARCH} == "amd64"
227
_COMPILER_RT_LIBS= \
225
_COMPILER_RT_LIBS= \
228
	libclang_rt.asan-preinit-x86_64.a \
226
	libclang_rt.asan-preinit-x86_64.a \
Lines 424-430 Link Here
424
	    -e 's|${LLVM_RELEASE:C/\./\\./g}|%%LLVM_RELEASE%%|' \
422
	    -e 's|${LLVM_RELEASE:C/\./\\./g}|%%LLVM_RELEASE%%|' \
425
	    -e 's|${LLVM_MAJOR:C/\./\\./}|%%LLVM_MAJOR%%|' | \
423
	    -e 's|${LLVM_MAJOR:C/\./\\./}|%%LLVM_MAJOR%%|' | \
426
	    ${SORT} >> ${PLIST}.tmp
424
	    ${SORT} >> ${PLIST}.tmp
427
	awk '{ \
425
	${AWK} '{ \
428
	    if ($$0 ~ /${CLANG_PATTERN}/ && $$0 !~ /(omp.h|${EXTRAS_PATTERN}|libclang_rt)/) {printf "%%%%CLANG%%%%"} \
426
	    if ($$0 ~ /${CLANG_PATTERN}/ && $$0 !~ /(omp.h|${EXTRAS_PATTERN}|libclang_rt)/) {printf "%%%%CLANG%%%%"} \
429
	    if ($$0 ~ /${COMPILER_RT_PATTERN}/) \
427
	    if ($$0 ~ /${COMPILER_RT_PATTERN}/) \
430
		{printf "%%%%COMPILER_RT%%%%"} \
428
		{printf "%%%%COMPILER_RT%%%%"} \
Lines 436-442 Link Here
436
	    if ($$0 !~ /libclang_rt/) {print}}' ${PLIST}.tmp >> ${PLIST}
434
	    if ($$0 !~ /libclang_rt/) {print}}' ${PLIST}.tmp >> ${PLIST}
437
	${RM} ${PLIST}.tmp
435
	${RM} ${PLIST}.tmp
438
436
439
440
check-commands:
437
check-commands:
441
.for command in ${COMMANDS}
438
.for command in ${COMMANDS}
442
	test -e ${STAGEDIR}${LLVM_PREFIX}/bin/${command}
439
	test -e ${STAGEDIR}${LLVM_PREFIX}/bin/${command}
Lines 451-457 Link Here
451
svn-patch-clang:
448
svn-patch-clang:
452
	svn log -c ${PATCH_REV} ${_LLVM_BASE} >> ${_PATCH_FILE}
449
	svn log -c ${PATCH_REV} ${_LLVM_BASE} >> ${_PATCH_FILE}
453
	svn diff -c ${PATCH_REV} ${_LLVM_BASE} | \
450
	svn diff -c ${PATCH_REV} ${_LLVM_BASE} | \
454
	    sed -E -e 's;^(---|\+\+\+) ;\1 tools/clang/;' >> ${_PATCH_FILE}
451
	    ${SED} -E -e 's;^(---|\+\+\+) ;\1 tools/clang/;' >> ${_PATCH_FILE}
455
.endif
452
.endif
456
.if make(svn-patch-compiler-rt)
453
.if make(svn-patch-compiler-rt)
457
.if !defined(PATCH_REV)
454
.if !defined(PATCH_REV)
Lines 462-468 Link Here
462
svn-patch-compiler-rt:
459
svn-patch-compiler-rt:
463
	svn log -c ${PATCH_REV} ${_LLVM_BASE} >> ${_PATCH_FILE}
460
	svn log -c ${PATCH_REV} ${_LLVM_BASE} >> ${_PATCH_FILE}
464
	svn diff -c ${PATCH_REV} ${_LLVM_BASE} | \
461
	svn diff -c ${PATCH_REV} ${_LLVM_BASE} | \
465
	    sed -E -e 's;^(---|\+\+\+) ;\1 tools/compiler-rt/;' >> ${_PATCH_FILE}
462
	    ${SED} -E -e 's;^(---|\+\+\+) ;\1 tools/compiler-rt/;' >> ${_PATCH_FILE}
466
.endif
463
.endif
467
.if make(svn-patch-lldb)
464
.if make(svn-patch-lldb)
468
.if !defined(PATCH_REV)
465
.if !defined(PATCH_REV)

Return to bug 214549