pkgsrc-WIP-changes archive

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

rust180: place testing of options after "options.mk" is included.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Sat Oct 5 19:47:25 2024 +0200
Changeset:	ed74058d1e2ea988bb01132b5e73c3fdb845e8bb

Modified Files:
	rust180/options.mk

Log Message:
rust180: place testing of options after "options.mk" is included.

This mirror a change done to rust181, and should fix the build
of rust on NetBSD/sparc64 10.0.

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

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

diffstat:
 rust180/options.mk | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diffs:
diff --git a/rust180/options.mk b/rust180/options.mk
index 3557dba720..2263d72c42 100644
--- a/rust180/options.mk
+++ b/rust180/options.mk
@@ -19,16 +19,7 @@ PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
 PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
 .endif
 
-# 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
+PKG_OPTIONS_LEGACY_OPTS+=	rust-llvm:rust-internal-llvm
 
 # Bundle OpenSSL and curl into the cargo binary when producing
 # bootstraps on NetBSD.
@@ -36,11 +27,20 @@ GCC_REQD+=	12
 PKG_SUGGESTED_OPTIONS+=	rust-cargo-static
 .endif
 
-PKG_OPTIONS_LEGACY_OPTS+=	rust-llvm:rust-internal-llvm
-
 .include "../../mk/bsd.options.mk"
 
 #
+# 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
+
 # Use the internal copy of LLVM or the external one?
 #
 .if empty(PKG_OPTIONS:Mrust-internal-llvm)


Home | Main Index | Thread Index | Old Index