diff options
author | brooks <brooks@FreeBSD.org> | 2016-09-30 18:26:35 +0800 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2016-09-30 18:26:35 +0800 |
commit | 5f6d902a727e75f4a3fba8aa6dd983319a0d9c8e (patch) | |
tree | d9b9dded8a0541e11a852c05d4415a6d81e079ce /devel | |
parent | 21b838e53e73931a0fc7270d50ae44551f58405c (diff) | |
download | freebsd-ports-gnome-5f6d902a727e75f4a3fba8aa6dd983319a0d9c8e.tar.gz freebsd-ports-gnome-5f6d902a727e75f4a3fba8aa6dd983319a0d9c8e.tar.zst freebsd-ports-gnome-5f6d902a727e75f4a3fba8aa6dd983319a0d9c8e.zip |
Import Clang's r280672 into our devel/llvm39 port
This revision is what's needed to make Clang work for CloudABI on ARMv6.
By pulling in this change, the ARMv6 cross compiler set up by the
cloudabi-toolchain port seems functional.
In the process, I did have to replace some ${RMDIR}s by ${RM} -rf, as it
tried to delete nonexistent directories. Brooks, do you know what's up
with that?
Submitted by: ed
Differential Revision: https://reviews.freebsd.org/D8078
Diffstat (limited to 'devel')
-rw-r--r-- | devel/llvm39/Makefile | 6 | ||||
-rw-r--r-- | devel/llvm39/files/clang-patch-svn-r280672 | 39 |
2 files changed, 43 insertions, 2 deletions
diff --git a/devel/llvm39/Makefile b/devel/llvm39/Makefile index db3ced2b7dc4..9a8bca0b44fe 100644 --- a/devel/llvm39/Makefile +++ b/devel/llvm39/Makefile @@ -2,6 +2,7 @@ PORTNAME= llvm DISTVERSION= 3.9.0 +PORTREVISION= 1 CATEGORIES= devel lang MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR} DISTNAME= ${PORTNAME}-${DISTVERSION}.src @@ -51,6 +52,7 @@ PLIST_FILES= CLANG_DESC= Build clang CLANG_EXTRA_PATCHES= \ + ${PATCHDIR}/clang-patch-svn-r280672 \ ${PATCHDIR}/clang-patch-fformat_extensions.diff \ ${PATCHDIR}/clang-patch-fopenmp.diff \ ${PATCHDIR}/clang-patch-tools_clang_lib_Headers_CMakeLists.txt \ @@ -320,7 +322,7 @@ post-build-COMPILER_RT-on: ${MAKE_ENV} ${MAKE_CMD} post-install: - ${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/include/llvm/MC/MCAnalysis + ${RM} -r ${STAGEDIR}${LLVM_PREFIX}/include/llvm/MC/MCAnalysis ${INSTALL_SCRIPT} ${WRKDIR}/llvm-wrapper.sh \ ${STAGEDIR}${PREFIX}/bin/${FIRST_COMMAND}${LLVM_SUFFIX} .for command in ${COMMANDS:C/^/XXXX/1:NXXXX*} @@ -350,7 +352,7 @@ post-install-DOCS-off: post-install-LLDB-on: ${RM} ${STAGEDIR}${LLVM_PREFIX}/lib/python*/site-packages/lib - ${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/include/lldb/Host/windows/getopt + ${RM} -r ${STAGEDIR}${LLVM_PREFIX}/include/lldb/Host/windows/getopt post-install-CLANG-on: ${LN} -f ${STAGEDIR}${LLVM_PREFIX}/bin/clang \ diff --git a/devel/llvm39/files/clang-patch-svn-r280672 b/devel/llvm39/files/clang-patch-svn-r280672 new file mode 100644 index 000000000000..0c6df7b175f0 --- /dev/null +++ b/devel/llvm39/files/clang-patch-svn-r280672 @@ -0,0 +1,39 @@ +------------------------------------------------------------------------ +r280672 | ed | 2016-09-05 18:38:34 +0000 (Mon, 05 Sep 2016) | 6 lines + +Add support for targeting armv6-unknown-cloudabi-eabihf. + +I'm in the progress of adding ARMv6 support to CloudABI. On the compiler +side, everything seems to work properly with this tiny change applied. + + +------------------------------------------------------------------------ +Index: test/Preprocessor/init.c +=================================================================== +--- tools/clang/test/Preprocessor/init.c (revision 280671) ++++ tools/clang/test/Preprocessor/init.c (revision 280672) +@@ -1975,6 +1975,11 @@ + // ARMEABIHARDFP:#define __arm 1 + // ARMEABIHARDFP:#define __arm__ 1 + ++// RUN: %clang_cc1 -E -dM -ffreestanding -triple=armv6-unknown-cloudabi-eabihf < /dev/null | FileCheck -match-full-lines -check-prefix ARMV6-CLOUDABI %s ++// ++// ARMV6-CLOUDABI:#define __CloudABI__ 1 ++// ARMV6-CLOUDABI:#define __arm__ 1 ++ + // RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-netbsd-eabi < /dev/null | FileCheck -match-full-lines -check-prefix ARM-NETBSD %s + // + // ARM-NETBSD-NOT:#define _LP64 +Index: lib/Basic/Targets.cpp +=================================================================== +--- tools/clang/lib/Basic/Targets.cpp (revision 280671) ++++ tools/clang/lib/Basic/Targets.cpp (revision 280672) +@@ -8261,6 +8261,8 @@ + return new DarwinARMTargetInfo(Triple, Opts); + + switch (os) { ++ case llvm::Triple::CloudABI: ++ return new CloudABITargetInfo<ARMleTargetInfo>(Triple, Opts); + case llvm::Triple::Linux: + return new LinuxTargetInfo<ARMleTargetInfo>(Triple, Opts); + case llvm::Triple::FreeBSD: |