pkgsrc-WIP-changes archive

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

rust: require GCC version 7, same as pkgsrc LLVM.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Sat Aug 27 18:35:28 2022 +0200
Changeset:	8e073902681f815452e76e513bb62504c70eb281

Modified Files:
	rust/Makefile
	rust/files/gcc-wrap
	rust/options.mk

Log Message:
rust: require GCC version 7, same as pkgsrc LLVM.

This avoids ABI incompatibilities, and makes a build on NetBSD/i386
8.2 succeed with pkgsrc LLVM 14, so remove the automatic "use
built-in LLVM on NetBSD < 9" workaround.

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

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

diffstat:
 rust/Makefile       |  4 ++--
 rust/files/gcc-wrap |  1 +
 rust/options.mk     | 11 -----------
 3 files changed, 3 insertions(+), 13 deletions(-)

diffs:
diff --git a/rust/Makefile b/rust/Makefile
index dfb243410e..edf502e6ca 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -12,8 +12,8 @@ LICENSE=	mit OR apache-2.0
 
 CONFLICTS+=	rust-bin-[0-9]*
 
-# uses -std=c++14
-GCC_REQD+=	5
+# LLVM uses gcc7, follow suit.  Also, uses -std=c++14
+GCC_REQD+=	7
 
 USE_GCC_RUNTIME=	yes
 USE_LANGUAGES=		c c++11
diff --git a/rust/files/gcc-wrap b/rust/files/gcc-wrap
index b2db9c5b51..2abbe94e2d 100644
--- a/rust/files/gcc-wrap
+++ b/rust/files/gcc-wrap
@@ -152,6 +152,7 @@ if $native; then
 	# Try to avoid cwrappers, which does "undocumented magic"
 	# by invoking the compiler "directly".
 	cmd="/usr/bin/${who} $args"
+	# (however, this wrapper isn't used when buliding natively...)
 else
 	cmd="${root}/tools/bin/${gnuarch}-${who} \
 		--sysroot=${root}/dest \
diff --git a/rust/options.mk b/rust/options.mk
index 2fca6d9ab7..6a3a7f104e 100644
--- a/rust/options.mk
+++ b/rust/options.mk
@@ -12,17 +12,6 @@ PKG_SUPPORTED_OPTIONS+=		rust-internal-llvm
 .  if !empty(HAVE_LLVM) || !empty(MACHINE_PLATFORM:MDarwin-*-aarch64)
 PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
 .  endif
-# As of 1.61, the pkgsrc LLVM causes build failure on i386 and powerpc
-.  if ${OPSYS} == "NetBSD"
-.    if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc"
-# In-tree g++ is too old on NetBSD 8.x and due to the shenanigans
-# files/gcc-wrap does, we need the internal LLVM
-.      if !empty(OS_VERSION:M8.*)
-PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
-.      endif
-.    endif
-.  endif
-.endif
 
 # Bundle OpenSSL and curl into the cargo binary when producing
 # bootstraps on NetBSD.


Home | Main Index | Thread Index | Old Index