pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/clang clang: enable __float128 on netbsd/x86



details:   https://anonhg.NetBSD.org/pkgsrc/rev/00c1e8cba11d
branches:  trunk
changeset: 386638:00c1e8cba11d
user:      maya <maya%pkgsrc.org@localhost>
date:      Wed Oct 24 21:12:59 2018 +0000

description:
clang: enable __float128 on netbsd/x86

While it is debatable whether we want to have this definition upstream,
this is very necessary in the package for the purpose of building
www/firefox once it is updated to 63.0.

This is because netbsd's base libstdc++ has some __float128 in headers
and otherwise we get fatal errors in clang builds, or in firefox's case,
when generating bindings for Rust via clang.

PR toolchain/53679
Bump PKGREVISION.

diffstat:

 lang/clang/Makefile                                    |   3 +-
 lang/clang/distinfo                                    |   4 +-
 lang/clang/patches/patch-lib_Basic_Targets_OSTargets.h |  29 ++++++++++++++++-
 3 files changed, 31 insertions(+), 5 deletions(-)

diffs (69 lines):

diff -r 43d85cb5c61a -r 00c1e8cba11d lang/clang/Makefile
--- a/lang/clang/Makefile       Wed Oct 24 21:11:45 2018 +0000
+++ b/lang/clang/Makefile       Wed Oct 24 21:12:59 2018 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.44 2017/03/17 22:38:17 adam Exp $
+# $NetBSD: Makefile,v 1.45 2018/10/24 21:12:59 maya Exp $
 
 PKGNAME=               ${DISTNAME:S/.src//:S/cfe/clang/}
+PKGREVISION=           1
 PYTHON_FOR_BUILD_ONLY= yes
 
 CMAKE_ARGS+=   -DCLANG_ENABLE_STATIC_ANALYZER=OFF
diff -r 43d85cb5c61a -r 00c1e8cba11d lang/clang/distinfo
--- a/lang/clang/distinfo       Wed Oct 24 21:11:45 2018 +0000
+++ b/lang/clang/distinfo       Wed Oct 24 21:12:59 2018 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.53 2018/08/09 14:56:41 jperkin Exp $
+$NetBSD: distinfo,v 1.54 2018/10/24 21:12:59 maya Exp $
 
 SHA1 (cfe-6.0.1.src.tar.xz) = d93d8f3e3d7eb549ac58507383f7fcbdd78804d7
 RMD160 (cfe-6.0.1.src.tar.xz) = c280cd2037b19f9bd733944b765f9ca23b35e0a4
 SHA512 (cfe-6.0.1.src.tar.xz) = f64ba9290059f6e36fee41c8f32bf483609d31c291fcd2f77d41fecfdf3c8233a5e23b93a1c73fed03683823bd6e72757ed993dd32527de3d5f2b7a64bb031b9
 Size (cfe-6.0.1.src.tar.xz) = 11905772 bytes
-SHA1 (patch-lib_Basic_Targets_OSTargets.h) = 73043149874a79bc7f048eb854832381939a1397
+SHA1 (patch-lib_Basic_Targets_OSTargets.h) = a8a710720e67c778cf5d4e30e3bb41d9aaf7c9d4
 SHA1 (patch-lib_Driver_ToolChains_Solaris.cpp) = 7cf1d43b50e7a0bf0842f2265b0449b0fea44007
 SHA1 (patch-lib_Driver_ToolChains_Solaris.h) = 13849df72a4b719bbb6109ab1d1abf2e7b97014f
 SHA1 (patch-lib_Frontend_InitHeaderSearch.cpp) = 924cb81bd8e2eb07c3577e25c1b1d4f405e9360f
diff -r 43d85cb5c61a -r 00c1e8cba11d lang/clang/patches/patch-lib_Basic_Targets_OSTargets.h
--- a/lang/clang/patches/patch-lib_Basic_Targets_OSTargets.h    Wed Oct 24 21:11:45 2018 +0000
+++ b/lang/clang/patches/patch-lib_Basic_Targets_OSTargets.h    Wed Oct 24 21:12:59 2018 +0000
@@ -1,10 +1,35 @@
-$NetBSD: patch-lib_Basic_Targets_OSTargets.h,v 1.1 2018/08/09 14:56:41 jperkin Exp $
+$NetBSD: patch-lib_Basic_Targets_OSTargets.h,v 1.2 2018/10/24 21:12:59 maya Exp $
 
 Sync SunOS default defines with a working reality.
+NetBSD __float128, needed to build anything with base libstdc++
+which assumes __float128.
 
 --- lib/Basic/Targets/OSTargets.h.orig 2018-01-04 07:43:41.000000000 +0000
 +++ lib/Basic/Targets/OSTargets.h
-@@ -531,20 +531,16 @@ protected:
+@@ -358,12 +358,22 @@ protected:
+     Builder.defineMacro("__ELF__");
+     if (Opts.POSIXThreads)
+       Builder.defineMacro("_REENTRANT");
++    if (this->HasFloat128)
++      Builder.defineMacro("__FLOAT128__");
+   }
+ 
+ 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;
++    }
+   }
+ };
+ 
+@@ -531,20 +541,16 @@ protected:
      Builder.defineMacro("__ELF__");
      Builder.defineMacro("__svr4__");
      Builder.defineMacro("__SVR4");



Home | Main Index | Thread Index | Old Index