pkgsrc-WIP-changes archive

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

rust191: drop rust-analyzer from tools for NetBSD/powerpc.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Fri Nov 7 20:18:26 2025 +0000
Changeset:	943d4c3b3afbac8cfb6af939b4284e56d94e2d61

Modified Files:
	rust191/files/gcc-wrap
	rust191/options.mk

Log Message:
rust191: drop rust-analyzer from tools for NetBSD/powerpc.

The reason is https://github.com/rust-lang/rust/issues/148497:
rust-analyzer just outgrew the 24-bit word PC-relative offset
provided by the default relocation type.

With this the cross-build of rust for powerpc-unknown-netbsd now succeeds.

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

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

diffstat:
 rust191/files/gcc-wrap |  3 +++
 rust191/options.mk     | 10 ++++++++++
 2 files changed, 13 insertions(+)

diffs:
diff --git a/rust191/files/gcc-wrap b/rust191/files/gcc-wrap
index b76d061236..48e17d57fb 100644
--- a/rust191/files/gcc-wrap
+++ b/rust191/files/gcc-wrap
@@ -34,6 +34,9 @@ else
 				# mips64 does soft-float
 		mips64*)	madd="-msoft-float"
 				;;
+		powerpc*)	# Now needed due to bloat
+				madd="-mlongcall"
+				;;
 	esac
 	# We build both for -8 and -9 due to ABI differences,
 	# so can't just test $gnuarch...  Yes, a vile hack.
diff --git a/rust191/options.mk b/rust191/options.mk
index 925667938a..2d6bd13f99 100644
--- a/rust191/options.mk
+++ b/rust191/options.mk
@@ -90,6 +90,16 @@ BUILDLINK_API_DEPENDS.curl+= 	curl>=7.67.0
 .include "../../security/openssl/buildlink3.mk"
 .endif
 
+# Work around https://github.com/rust-lang/rust/issues/148497
+# where the linking of rust-analyzer fails because it's now too big
+# for 24-bit word-based PC-relative relocation offsets.
+# Apply on or for powerpc:
+.if ${MACHINE_PLATFORM:M*-powerpc} ||
+    (!empty(TARGET) && ${TARGET:Mpowerpc-*})
+CONFIGURE_ARGS+=	--tools="cargo,clippy,rustdoc,rustfmt,analysis,src,wasm-component-ld"
+# rust-analyzer dropped from list
+.endif
+
 #
 # Install documentation.
 #


Home | Main Index | Thread Index | Old Index