pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/clang/patches Make C++ constructors work for aarc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0fd63aa3dfd1
branches:  trunk
changeset: 416203:0fd63aa3dfd1
user:      rjs <rjs%pkgsrc.org@localhost>
date:      Mon Oct 21 11:14:44 2019 +0000

description:
Make C++ constructors work for aarch64.

Discussed here:

<http://mail-index.netbsd.org/tech-toolchain/2019/08/29/msg003611.html>

diffstat:

 lang/clang/patches/patch-lib_Driver_ToolChains_NetBSD.cpp |  26 +++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diffs (30 lines):

diff -r 293b1d8c059c -r 0fd63aa3dfd1 lang/clang/patches/patch-lib_Driver_ToolChains_NetBSD.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/clang/patches/patch-lib_Driver_ToolChains_NetBSD.cpp Mon Oct 21 11:14:44 2019 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-lib_Driver_ToolChains_NetBSD.cpp,v 1.1 2019/10/21 11:14:44 rjs Exp $
+
+--- lib/Driver/ToolChains/NetBSD.cpp.orig      2019-01-30 19:13:49.000000000 +0000
++++ lib/Driver/ToolChains/NetBSD.cpp
+@@ -469,10 +469,20 @@ SanitizerMask NetBSD::getSupportedSaniti
+   return Res;
+ }
+ 
+-void NetBSD::addClangTargetOptions(const ArgList &,
++void NetBSD::addClangTargetOptions(const ArgList &DriverArgs,
+                                    ArgStringList &CC1Args,
+                                    Action::OffloadKind) const {
+   const SanitizerArgs &SanArgs = getSanitizerArgs();
++  bool UseInitArrayDefault =
++      getTriple().getArch() == llvm::Triple::aarch64 ||
++      getTriple().getArch() == llvm::Triple::aarch64_be ||
++      getTriple().getArch() == llvm::Triple::riscv32 ||
++      getTriple().getArch() == llvm::Triple::riscv64;
++
++  if (DriverArgs.hasFlag(options::OPT_fuse_init_array,
++                         options::OPT_fno_use_init_array, UseInitArrayDefault))
++    CC1Args.push_back("-fuse-init-array");
++
+   if (SanArgs.hasAnySanitizer())
+     CC1Args.push_back("-D_REENTRANT");
+ }



Home | Main Index | Thread Index | Old Index