Module Name:    src
Committed By:   mrg
Date:           Fri Jan 30 12:23:47 UTC 2015

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

Log Message:
canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 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.79 src/tools/gcc/mknative-gcc:1.80
--- src/tools/gcc/mknative-gcc:1.79	Thu May 29 16:27:50 2014
+++ src/tools/gcc/mknative-gcc	Fri Jan 30 12:23:47 2015
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.79 2014/05/29 16:27:50 skrll Exp $
+#	$NetBSD: mknative-gcc,v 1.80 2015/01/30 12:23:47 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -331,7 +331,7 @@ get_gcc () {
 		write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
 		if [ "${MACHINE_ARCH}" = "powerpc" -a "${f}" = "configargs" ]
 		then
-			ex <<__EOF__ $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
+			ex <<__EOF__ $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
 /configuration_arguments/ s/$//
 ya
 i
@@ -355,6 +355,14 @@ a
 wq
 __EOF__
 		fi
+		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__
+		fi
 	done
 
 	# keep identical

Reply via email to