Update to a new snapshot.

Add CROSS_TOOLCHAIN files (currently requiring in-tree binutils).
This commit is contained in:
Brooks Davis 2017-10-13 01:25:39 +00:00
parent eed9bf7571
commit 4324c2050f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=451941
9 changed files with 885 additions and 247 deletions

View file

@ -2,7 +2,6 @@
PORTNAME= llvm
PORTVERSION= ${LLVM_MAJOR}.d${SNAPDATE}
PORTREVISION= 3
CATEGORIES= devel lang
PKGNAMESUFFIX= ${LLVM_SUFFIX}
@ -27,6 +26,10 @@ SHEBANG_FILES= utils/lit/lit.py utils/llvm-lit/llvm-lit.in \
SUB_FILES= llvm-wrapper.sh
SUB_LIST= LLVM_PREFIX="${LLVM_PREFIX}" LLVM_SUFFIX="${LLVM_SUFFIX}"
SUB_FILES+= mips-cheri-clang.mk
SUB_LIST+= STACK_ALIGN=${STACK_ALIGN}
STACK_ALIGN?= -mstack-alignment=32
CMAKE_INSTALL_PREFIX= ${LLVM_PREFIX}
CMAKE_ARGS+= -DBUILD_SHARED_LIBS=ON \
-DLLVM_DEFAULT_TARGET_TRIPLE=cheri-unknown-freebsd
@ -37,13 +40,14 @@ GH_TAGNAME= ${LLVM_COMMIT}
.include "Makefile.snapshot"
OPTIONS_DEFINE= CLANG DOCS LIT
OPTIONS_DEFAULT= CLANG LIT
OPTIONS_DEFINE= CLANG DOCS LIT LLD
OPTIONS_DEFAULT= CLANG LIT LLD
OPTIONS_SUB= yes
CLANG_DESC= Build clang
CLANG_EXTRA_PATCHES= ${PATCHDIR}/clang-patch-tools_clang_lib_Headers_CMakeLists.txt
CLANG_GH_PROJECT= clang:clang
CLANG_GH_SUBDIR= tools/clang:clang
CLANG_GH_TAGNAME= ${CLANG_COMMIT}:clang
CLANG_PORTDOCS= clang
DOCS_PORTDOCS= llvm
@ -52,6 +56,11 @@ DOCS_CMAKE_ON= -DLLVM_ENABLE_SPHINX=ON \
-DLLVM_BUILD_DOCS=ON
DOCS_PLIST_FILES= ${MAN1SRCS:S|^|man/man1/|:S|.1$|${LLVM_SUFFIX}.1.gz|}
LIT_DESC= Install lit and FileCheck test tools
LLD_DESC= Install lld linker
LLD_GH_PROJECT= lld:lld
LLD_GH_SUBDIR= tools/lld:lld
LLD_GH_TAGNAME= ${LLD_COMMIT}:lld
LLD_PORTDOCS= lld
LLDB_DESC= Install lldb, the LLVM debugger (ignore on 9.x)
LLDB_BUILD_DEPENDS= swig:devel/swig13
LLDB_GH_PROJECT= lldb:lldb
@ -67,32 +76,50 @@ PLIST_SUB+= COMMAND_SUFFIX=${COMMAND_SUFFIX} \
LLVM_SUFFIX=${LLVM_SUFFIX}
COMMANDS= bugpoint \
c-index-test \
llc \
lli \
llvm-ar \
llvm-as \
llvm-bcanalyzer \
llvm-cat \
llvm-config \
llvm-cov \
llvm-cvtres \
llvm-cxxdump \
llvm-cxx-filt \
llvm-diff \
llvm-dis \
llvm-dsymutil \
llvm-dwarfdump \
llvm-dwp \
llvm-extract \
llvm-lib \
llvm-link \
llvm-lto \
llvm-lto2 \
llvm-mc \
llvm-mcmarkup \
llvm-nm \
llvm-objdump \
llvm-opt-report \
llvm-pdbdump \
llvm-profdata \
llvm-ranlib \
llvm-readobj \
llvm-rtdyld \
llvm-size \
llvm-stress \
llvm-split \
llvm-stress \
llvm-strings \
llvm-symbolizer \
llvm-tblgen \
opt
llvm-xray \
opt \
sancov \
sanstats \
verify-uselistorder \
yaml2obj
FIRST_COMMAND= ${COMMANDS:C/^/XXXX/1:MXXXX*:C/^XXXX//}
STRIP_LIBS= BugpointPasses.so \
@ -110,8 +137,11 @@ COMMANDS+= clang \
clang++ \
clang-check \
clang-cpp \
clang-format
clang-format \
scan-build \
scan-view
MAN1SRCS+= clang.1
DOCS_PLIST_FILES+= man/man1/scan-build${LLVM_SUFFIX}.1.gz
.endif
.if ${PORT_OPTIONS:MLIT}
@ -120,6 +150,10 @@ _USES_PYTHON= python
LIT_COMMANDS= lit llvm-lit FileCheck
.endif
.if ${PORT_OPTIONS:MLLD}
COMMANDS+= ld.lld
.endif
.if ${PORT_OPTIONS:MLLDB}
COMMANDS+= argdumper \
lldb \
@ -145,9 +179,6 @@ MAN1SRCS+= bugpoint.1 llc.1 lli.1 llvm-ar.1 llvm-as.1 \
PLIST_SUB:= ${PLIST_SUB:NLLDB=*} LLDB="@comment "
.endif
post-extract-CLANG-on:
${MV} ${WRKSRC_clang} ${PATCH_WRKSRC}/tools/clang
post-extract-LLDB-on:
.if ${OPSYS} != "FreeBSD" || ${COMPILER_TYPE} == clang
${MV} ${WRKSRC_lldb} ${PATCH_WRKSRC}/tools/lldb
@ -162,6 +193,9 @@ post-patch:
${WRKSRC}/CMakeLists.txt
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/share/toolchains/
${INSTALL_DATA} ${WRKDIR}/mips-cheri-clang.mk \
${STAGEDIR}${PREFIX}/share/toolchains/mips${LLVM_SUFFIX}-clang.mk
${INSTALL_SCRIPT} ${WRKDIR}/llvm-wrapper.sh \
${STAGEDIR}${PREFIX}/bin/${COMMAND_PREFIX}${FIRST_COMMAND}${COMMAND_SUFFIX}
.for command in ${COMMANDS:C/^/XXXX/1:NXXXX*}
@ -181,6 +215,12 @@ post-install-DOCS-on:
.endif
${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/share/man/man1/
${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/share/man/
.if ${PORT_OPTIONS:MCLANG}
${MV} ${STAGEDIR}${LLVM_PREFIX}/man/man1/scan-build.1 \
${STAGEDIR}${MANPREFIX}/man/man1/scan-build${LLVM_SUFFIX}.1
${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/man/man1
${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/man
.endif
post-install-LLDB-on:
.if ${OPSYS} != "FreeBSD" || ${COMPILER_TYPE} == clang
@ -219,6 +259,7 @@ regression-test: ${BUILD_COOKIE}
build-plist:
${RM} ${PLIST} ${PLIST}.tmp
${ECHO_CMD} share/toolchains/mips%%LLVM_SUFFIX%%-clang.mk >> ${PLIST}.tmp
.for command in ${COMMANDS}
${ECHO_CMD} bin/${COMMAND_PREFIX}${command}%%COMMAND_SUFFIX%% >> ${PLIST}.tmp
.endfor
@ -238,7 +279,14 @@ build-plist:
${SED} -e 's|${STAGEDIR}${PYTHON_SITELIBDIR}|%%LIT%%%%PYTHON_SITELIBDIR%%|' \
-e 's|${LLVM_SUFFIX}|%%LLVM_SUFFIX%%|' | \
${SORT} >> ${PLIST}.tmp
awk '{if ($$0 ~ /clang/ && $$0 !~ /omp.h/) {printf "%%%%CLANG%%%%"} if ($$0 ~ /(argdumper|lldb)/) {printf "%%%%LLDB%%%%"} print}' ${PLIST}.tmp >> ${PLIST}
awk '{ \
if ($$0 ~ /clang/ && $$0 !~ /omp.h/) {printf "%%%%CLANG%%%%"} \
if ($$0 ~ /lld/ && $$0 !~ /lldb/) {printf "%%%%LLD%%%%"} \
if ($$0 ~ /(argdumper|lldb)/) {printf "%%%%LLDB%%%%"} \
print \
}' \${PLIST}.tmp >> ${PLIST}
${ECHO_CMD} '@postexec if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi' >> ${PLIST}
${ECHO_CMD} '@postunexec if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi' >> ${PLIST}
${RM} ${PLIST}.tmp
check-commands:

View file

@ -4,10 +4,11 @@
#
# Generated by: files/gen-Makefile.snapshot.sh.
#
LLVM_MAJOR= 3.8
LLVM_MAJOR= 5.0
LLVM_RELEASE= ${LLVM_MAJOR}.0
SNAPDATE= 20160808
SNAPDATE= 20171005
LLVM_COMMIT= b08d7dff16999ac41ccd5c250194afd4800309ee
CLANG_COMMIT= f8b93d4881438c4368509c2a579f59e3c9d11c61
LLVM_COMMIT= 70b462defcb7cce1a3994008b2459916d92e1c4c
CLANG_COMMIT= 93e490fea128c0d86b8b46c1b87a2771dc6d48c5
LLD_COMMIT= cef2e6d8dde394a35eb7f858d8f217971213b86f
LLDB_COMMIT= 7ee5905d0109a13d543a127a9cda7c280c8103c8

View file

@ -1,5 +1,7 @@
TIMESTAMP = 1471431824
SHA256 (CTSRD-CHERI-llvm-3.8.d20160808-b08d7dff16999ac41ccd5c250194afd4800309ee_GH0.tar.gz) = 714b98446c02d5e683b7bbc7e666ac64a86d095db3577fd4b24249b29af726b9
SIZE (CTSRD-CHERI-llvm-3.8.d20160808-b08d7dff16999ac41ccd5c250194afd4800309ee_GH0.tar.gz) = 22363938
SHA256 (CTSRD-CHERI-clang-f8b93d4881438c4368509c2a579f59e3c9d11c61_GH0.tar.gz) = 07836943ec0c3b0b9b082292dfa2aee787bc894633784d5f1ac71e4a0da9192d
SIZE (CTSRD-CHERI-clang-f8b93d4881438c4368509c2a579f59e3c9d11c61_GH0.tar.gz) = 12891612
TIMESTAMP = 1507834219
SHA256 (CTSRD-CHERI-llvm-5.0.d20171005-70b462defcb7cce1a3994008b2459916d92e1c4c_GH0.tar.gz) = b28819b9d08e16da104e9599279ba7be71f6d087de089f4312628c5a41f58c10
SIZE (CTSRD-CHERI-llvm-5.0.d20171005-70b462defcb7cce1a3994008b2459916d92e1c4c_GH0.tar.gz) = 33778607
SHA256 (CTSRD-CHERI-clang-93e490fea128c0d86b8b46c1b87a2771dc6d48c5_GH0.tar.gz) = 5950361422ca8b82d65859ef636cb8b5cd4bb594f29068e1be349051de173bce
SIZE (CTSRD-CHERI-clang-93e490fea128c0d86b8b46c1b87a2771dc6d48c5_GH0.tar.gz) = 15873591
SHA256 (CTSRD-CHERI-lld-cef2e6d8dde394a35eb7f858d8f217971213b86f_GH0.tar.gz) = 4f4466524f918bc05f2474542eea2130039c6b23da9c1ed23a77f38c458149d8
SIZE (CTSRD-CHERI-lld-cef2e6d8dde394a35eb7f858d8f217971213b86f_GH0.tar.gz) = 860023

View file

@ -1,14 +1,17 @@
--- tools/clang/lib/Headers/CMakeLists.txt.orig 2015-12-02 16:47:45.000000000 +0000
+++ tools/clang/lib/Headers/CMakeLists.txt 2015-12-04 10:15:34.524729263 +0000
@@ -30,7 +30,6 @@
Intrin.h
$FreeBSD$
--- tools/clang/lib/Headers/CMakeLists.txt.orig
+++ tools/clang/lib/Headers/CMakeLists.txt
@@ -46,7 +46,6 @@
intrin.h
inttypes.h
iso646.h
- limits.h
lwpintrin.h
lzcntintrin.h
memcap.h
mm3dnow.h
@@ -46,20 +45,12 @@
@@ -66,20 +65,12 @@
s390intrin.h
shaintrin.h
smmintrin.h
@ -27,5 +30,5 @@
vadefs.h
- varargs.h
vecintrin.h
__wmmintrin_aes.h
wmmintrin.h
__wmmintrin_aes.h

View file

@ -32,6 +32,8 @@ query_repo llvm
LLVM_COMMIT=$SHA
query_repo clang
CLANG_COMMIT=$SHA
query_repo lld
LLD_COMMIT=$SHA
query_repo lldb
LLDB_COMMIT=$SHA
@ -42,12 +44,13 @@ cat <<EOF > Makefile.snapshot
#
# Generated by: files/gen-Makefile.snapshot.sh.
#
LLVM_MAJOR= 3.8
LLVM_MAJOR= 5.0
LLVM_RELEASE= \${LLVM_MAJOR}.0
SNAPDATE= ${MAX_DATE}
LLVM_COMMIT= ${LLVM_COMMIT}
CLANG_COMMIT= ${CLANG_COMMIT}
LLD_COMMIT= ${LLD_COMMIT}
LLDB_COMMIT= ${LLDB_COMMIT}
EOF

View file

@ -0,0 +1,7 @@
# $FreeBSD$
XCC=%%PREFIX%%/llvm%%LLVM_SUFFIX%%/bin/clang
XCXX=%%PREFIX%%/llvm%%LLVM_SUFFIX%%/bin/clang++
XCPP=%%PREFIX%%/llvm%%LLVM_SUFFIX%%/bin/clang-cpp
XCFLAGS=-integrated-as %%STACK_ALIGN%%
X_COMPILER_TYPE=clang

View file

@ -1,10 +0,0 @@
--- tools/clang/lib/Sema/SemaChecking.cpp.orig 2016-05-23 13:56:25 UTC
+++ tools/clang/lib/Sema/SemaChecking.cpp
@@ -38,6 +38,7 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/raw_ostream.h"
+#include <cstdio>
#include <limits>
using namespace clang;
using namespace sema;

File diff suppressed because it is too large Load diff

View file

@ -3,6 +3,7 @@
CMAKE_ARGS= -DLLVM_CHERI_IS_128=ON
LLVM_SUFFIX= -cheri128
STACK_ALIGN=
COMMENT= LLVM and Clang with support for the CHERI architecture (128-bit)