Module Name:    src
Committed By:   mrg
Date:           Tue Sep  4 06:40:37 UTC 2018

Modified Files:
        src/tools/gcc: mknative-gcc

Log Message:
in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on.  (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8.  this will
avoid that in the future.)


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.92 src/tools/gcc/mknative-gcc:1.93
--- src/tools/gcc/mknative-gcc:1.92	Tue Feb  6 07:04:01 2018
+++ src/tools/gcc/mknative-gcc	Tue Sep  4 06:40:37 2018
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.92 2018/02/06 07:04:01 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.93 2018/09/04 06:40:37 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -369,10 +369,9 @@ __EOF__
 		if [ "${f}" = "configargs" ]
 		then
 			_srcquoted=$(echo "$_SRC" | sed 's/\//\\\//g')
-			ex <<__EOF__ $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
-/static const char configuration_arguments/ s/$_srcquoted/\/usr\/src/g
-wq
-__EOF__
+			sed -i -E -e "s,$_srcquoted,/usr/src,g" \
+				  -e 's/--build=[^ ]+ --host=([^ ]+)/--build=\1 --host=\1/' \
+				$_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
 		fi
 	done
 

Reply via email to