pkgsrc-WIP-changes archive

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

rust: minor tweaks to gcc-wrap script.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Tue Aug 30 12:07:54 2022 +0000
Changeset:	707d496edd43710c4f12570664f878d448d99a2a

Modified Files:
	rust/files/gcc-wrap

Log Message:
rust: minor tweaks to gcc-wrap script.

This script is, AFAIR only used for cross-building, but
despite this make some adjustments here for the "native" case.

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

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

diffstat:
 rust/files/gcc-wrap | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diffs:
diff --git a/rust/files/gcc-wrap b/rust/files/gcc-wrap
index 2abbe94e2d..c83c870dba 100644
--- a/rust/files/gcc-wrap
+++ b/rust/files/gcc-wrap
@@ -73,7 +73,9 @@ while [ $# -gt 0 ]; do
 			;;
 		-I/usr/pkg/include)
 # Try to drop this...
-#			args="$args -I=/usr/pkg/include"
+			if ! $native; then
+				args="$args -I=/usr/pkg/include"
+			fi
 			;;
 		-I)
 			if [ $2 = "/usr/include" ]; then
@@ -84,7 +86,9 @@ while [ $# -gt 0 ]; do
 				shift
 			elif [ $2 = "/usr/pkg/include" ]; then
 # Try to drop this too...
-#				args="$args -I=/usr/pkg/include"
+				if ! $native; then
+					args="$args -I=/usr/pkg/include"
+				fi
 				shift
 			else
 				args="$args -I"
@@ -151,8 +155,9 @@ done
 if $native; then
 	# Try to avoid cwrappers, which does "undocumented magic"
 	# by invoking the compiler "directly".
-	cmd="/usr/bin/${who} $args"
+	#cmd="/usr/bin/${who} $args"
 	# (however, this wrapper isn't used when buliding natively...)
+	cmd="${who} $args"
 else
 	cmd="${root}/tools/bin/${gnuarch}-${who} \
 		--sysroot=${root}/dest \


Home | Main Index | Thread Index | Old Index