pkgsrc-WIP-changes archive

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

rust176: fix for NetBSD/sparc64 10.x:



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Sun Mar 3 09:45:33 2024 +0000
Changeset:	592aae2474c340c75f5456acfff3d18f7caae2af

Modified Files:
	rust176/options.mk

Log Message:
rust176: fix for NetBSD/sparc64 10.x:

 * No longer insist on an internal LLVM, LLVM 16.x from pkgsrc
   and the corresponding libunwind builds nicely.
 * The gcc in 10.x (or 10.0_BETA) (10.4.0 or 10.5.0) appears to
   mis-compile the now-embedded LLVM, while using gcc 12 fixes it,
   so encode that requirement.

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

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

diffstat:
 rust176/options.mk | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diffs:
diff --git a/rust176/options.mk b/rust176/options.mk
index b8c81c8815..8c59cc8b5d 100644
--- a/rust176/options.mk
+++ b/rust176/options.mk
@@ -19,10 +19,15 @@ PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
 PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
 .endif
 
-# (NetBSD)/sparc64 systems fail to build libunwind,
-# a dependency of pkgsrc llvm, so use the internal one instead
-.if ${MACHINE_PLATFORM:MNetBSD-*-sparc64}
-PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
+# NetBSD/sparc64 when using the internal LLVM needs
+# to not use gcc 10.4 or 10.5 (as found in 10.0_BETA or 10.0), ref.
+# https://github.com/rust-lang/rust/issues/117231
+# (however, gcc from 9.x produces a working LLVM).
+.if ${MACHINE_PLATFORM:MNetBSD-10.*-sparc64}
+.  if !empty(PKG_OPTIONS:Mrust-internal-llvm)
+# Require GCC 12 (from pkgsrc) to correctly build the embedded LLVM (17.x).
+GCC_REQD=	12
+.  endif
 .endif
 
 # Bundle OpenSSL and curl into the cargo binary when producing


Home | Main Index | Thread Index | Old Index