ports/devel/llvm39/files/clang-patch-svn-r280672
Brooks Davis 08a7ca817e 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
2016-09-30 10:26:35 +00:00

39 lines
1.6 KiB
Text

------------------------------------------------------------------------
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: