Tue Sep 4 06:40:37 2018 UTC ()
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.)


(mrg)
diff -r1.92 -r1.93 src/tools/gcc/mknative-gcc

cvs diff -r1.92 -r1.93 src/tools/gcc/mknative-gcc (expand / switch to unified diff)

--- src/tools/gcc/mknative-gcc 2018/02/06 07:04:01 1.92
+++ src/tools/gcc/mknative-gcc 2018/09/04 06:40:37 1.93
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2# $NetBSD: mknative-gcc,v 1.92 2018/02/06 07:04:01 mrg Exp $ 2# $NetBSD: mknative-gcc,v 1.93 2018/09/04 06:40:37 mrg Exp $
3# 3#
4# Shell script for generating all the constants needed for a native 4# Shell script for generating all the constants needed for a native
5# platform build of gcc. 5# platform build of gcc.
6# 6#
7# This version is for GCC 6.4 7# This version is for GCC 6.4
8 8
9# initialise 9# initialise
10 10
11_TMPDIR=$2 11_TMPDIR=$2
12_TOP=$3 12_TOP=$3
13_SRC=$4 13_SRC=$4
14_PLATFORM=$5 14_PLATFORM=$5
15_DESTDIR=$6 15_DESTDIR=$6
@@ -359,30 +359,29 @@ a @@ -359,30 +359,29 @@ a
359a 359a
360#ifdef _SOFT_FLOAT 360#ifdef _SOFT_FLOAT
361 { "float", "soft" }, 361 { "float", "soft" },
362#endif 362#endif
363 { NULL, NULL } 363 { NULL, NULL }
364}; 364};
365. 365.
366wq 366wq
367__EOF__ 367__EOF__
368 fi 368 fi
369 if [ "${f}" = "configargs" ] 369 if [ "${f}" = "configargs" ]
370 then 370 then
371 _srcquoted=$(echo "$_SRC" | sed 's/\//\\\//g') 371 _srcquoted=$(echo "$_SRC" | sed 's/\//\\\//g')
372 ex <<__EOF__ $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h 372 sed -i -E -e "s,$_srcquoted,/usr/src,g" \
373/static const char configuration_arguments/ s/$_srcquoted/\/usr\/src/g 373 -e 's/--build=[^ ]+ --host=([^ ]+)/--build=\1 --host=\1/' \
374wq 374 $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
375__EOF__ 
376 fi 375 fi
377 done 376 done
378 377
379 # keep identical 378 # keep identical
380 for f in all-tree.def; do 379 for f in all-tree.def; do
381 cp $_TMPDIR/gcc/$f $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f 380 cp $_TMPDIR/gcc/$f $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f
382 done 381 done
383 382
384 # special transforms 383 # special transforms
385 for f in gtyp-input.list; do 384 for f in gtyp-input.list; do
386 sed -e "s@^.*$_OUTDIRBASE/dist@SRCDIR@" < $_TMPDIR/gcc/$f > $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f 385 sed -e "s@^.*$_OUTDIRBASE/dist@SRCDIR@" < $_TMPDIR/gcc/$f > $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f
387 done 386 done
388 387