pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

clang-netbsd: Add __float128 and enable tests



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Thu Jun 8 16:42:22 2017 +0200
Changeset:	899f9c0d4fcda66df84822449665e28d03ed482c

Modified Files:
	clang-netbsd/Makefile.common
	clang-netbsd/distinfo
Added Files:
	clang-netbsd/patches/patch-lib_Basic_Targets.cpp
	clang-netbsd/patches/patch-test_Sema_128bitfloat.cpp

Log Message:
clang-netbsd: Add __float128 and enable tests

__float128 is required to build cmake.

Sponsored by <The NetBSD Foundation>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=899f9c0d4fcda66df84822449665e28d03ed482c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 clang-netbsd/Makefile.common                       |  2 ++
 clang-netbsd/distinfo                              |  2 ++
 clang-netbsd/patches/patch-lib_Basic_Targets.cpp   | 29 ++++++++++++++++++++++
 .../patches/patch-test_Sema_128bitfloat.cpp        | 13 ++++++++++
 4 files changed, 46 insertions(+)

diffs:
diff --git a/clang-netbsd/Makefile.common b/clang-netbsd/Makefile.common
index de24c308ca..151d573366 100644
--- a/clang-netbsd/Makefile.common
+++ b/clang-netbsd/Makefile.common
@@ -100,6 +100,8 @@ PLIST.notdylib=	yes
 .endif
 PLIST_SUBST+=	SOEXT=${SOEXT}
 
+CMAKE_ARGS+=		-DLLVM_INCLUDE_TESTS=ON
+CMAKE_ARGS+=		-DCLANG_INCLUDE_TESTS=ON
 TEST_TARGET=		check-clang
 TEST_ENV+=		LD_LIBRARY_PATH=${WRKDIR}/build/lib
 
diff --git a/clang-netbsd/distinfo b/clang-netbsd/distinfo
index 91cb19c77c..99a1ac1691 100644
--- a/clang-netbsd/distinfo
+++ b/clang-netbsd/distinfo
@@ -12,8 +12,10 @@ Size (libcxx-3.6.2.src.tar.xz) = 944020 bytes
 SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
 RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
 Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
+SHA1 (patch-lib_Basic_Targets.cpp) = 7b2e13a71f2b09c3f7336f21371637d3e39e4043
 SHA1 (patch-lib_Driver_ToolChains_NetBSD.cpp) = 83982b7fee74a199bcf99e1dbbe5b92a17514cd3
 SHA1 (patch-test_Driver_netbsd.c) = 03d935c4362391fbaee264e02a9c02f3233c6576
+SHA1 (patch-test_Sema_128bitfloat.cpp) = cc11582dd9495b603a22ef73609ab04f65324da2
 SHA1 (patch-tools_clang-format_CMakeLists.txt) = f119d2a94cbfb8c00a285d1aa7789ed26f8309cf
 SHA1 (patch-unittests_ASTMatchers_Dynamic_RegistryTest.cpp) = 27a198a0efe237497f97e1903df5e8303e02745d
 SHA1 (patch-unittests_Basic_MemoryBufferCacheTest.cpp) = ec0b3f1348d45c45285e97a707223f34701d0df0
diff --git a/clang-netbsd/patches/patch-lib_Basic_Targets.cpp b/clang-netbsd/patches/patch-lib_Basic_Targets.cpp
new file mode 100644
index 0000000000..481e9133a9
--- /dev/null
+++ b/clang-netbsd/patches/patch-lib_Basic_Targets.cpp
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- lib/Basic/Targets.cpp.orig	2017-05-31 16:58:37.000000000 +0000
++++ lib/Basic/Targets.cpp
+@@ -514,6 +514,8 @@ protected:
+     Builder.defineMacro("__ELF__");
+     if (Opts.POSIXThreads)
+       Builder.defineMacro("_REENTRANT");
++    if (this->HasFloat128)
++      Builder.defineMacro("__FLOAT128__");
+ 
+     switch (Triple.getArch()) {
+     default:
+@@ -530,6 +532,15 @@ public:
+   NetBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
+       : OSTargetInfo<Target>(Triple, Opts) {
+     this->MCountName = "_mcount";
++
++    switch (Triple.getArch()) {
++    default:
++      break;
++    case llvm::Triple::x86:
++    case llvm::Triple::x86_64:
++      this->HasFloat128 = true;
++      break;
++    }
+   }
+ };
+ 
diff --git a/clang-netbsd/patches/patch-test_Sema_128bitfloat.cpp b/clang-netbsd/patches/patch-test_Sema_128bitfloat.cpp
new file mode 100644
index 0000000000..4737025c85
--- /dev/null
+++ b/clang-netbsd/patches/patch-test_Sema_128bitfloat.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- test/Sema/128bitfloat.cpp.orig	2017-05-29 10:06:54.000000000 +0000
++++ test/Sema/128bitfloat.cpp
+@@ -4,6 +4,8 @@
+ // RUN: %clang_cc1 -triple i686-windows-gnu -verify -std=c++11 %s
+ // RUN: %clang_cc1 -triple x86_64-windows-gnu -verify -std=c++11 %s
+ // RUN: %clang_cc1 -triple x86_64-windows-msvc -verify -std=c++11 %s
++// RUN: %clang_cc1 -triple i386--netbsd -verify -std=c++11 %s
++// RUN: %clang_cc1 -triple x86_64--netbsd -verify -std=c++11 %s
+ 
+ #if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)
+ __float128 f;


Home | Main Index | Thread Index | Old Index