Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src MACHINE_ARCH from the environment may be overridden by getar...
details: https://anonhg.NetBSD.org/src/rev/44c14039043b
branches: trunk
changeset: 331292:44c14039043b
user: apb <apb%NetBSD.org@localhost>
date: Thu Aug 07 18:10:20 2014 +0000
description:
MACHINE_ARCH from the environment may be overridden by getarch (based
on the MACHINE), but MACHINE_ARCH from the -a option should not be
overridden. The previous commit accidentally removed this behaviour.
diffstat:
build.sh | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (55 lines):
diff -r 311375bc40e7 -r 44c14039043b build.sh
--- a/build.sh Thu Aug 07 17:54:28 2014 +0000
+++ b/build.sh Thu Aug 07 18:10:20 2014 +0000
@@ -1,5 +1,5 @@
#! /usr/bin/env sh
-# $NetBSD: build.sh,v 1.292 2014/08/07 17:54:28 apb Exp $
+# $NetBSD: build.sh,v 1.293 2014/08/07 18:10:20 apb Exp $
#
# Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -1097,7 +1097,7 @@
parseoptions()
{
opts='a:B:C:D:Ehj:M:m:N:nO:oR:rS:T:UuV:w:X:xY:yZ:'
- opt_a=no
+ opt_a=false
if type getopts >/dev/null 2>&1; then
# Use POSIX getopts.
@@ -1128,7 +1128,7 @@
-a)
eval ${optargcmd}
MACHINE_ARCH=${OPTARG}
- opt_a=yes
+ opt_a=true
;;
-B)
@@ -1370,12 +1370,16 @@
# Set up MACHINE*. On a NetBSD host, these are allowed to be unset.
#
+ # MACHINE_ARCH from the environment may be overridden by getarch
+ # (based on the MACHINE), but MACHINE_ARCH from the -a option should
+ # not be overridden.
+ #
if [ -z "${MACHINE}" ]; then
[ "${uname_s}" = "NetBSD" ] ||
bomb "MACHINE must be set, or -m must be used, for cross builds."
MACHINE=${uname_m}
fi
- [ -n "${MACHINE_ARCH}" ] || getarch
+ $opt_a || getarch
validatearch
# Set up default make(1) environment.
@@ -1858,7 +1862,7 @@
eval cat <<EOF ${makewrapout}
#! ${HOST_SH}
# Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from: \$NetBSD: build.sh,v 1.292 2014/08/07 17:54:28 apb Exp $
+# Generated from: \$NetBSD: build.sh,v 1.293 2014/08/07 18:10:20 apb Exp $
# with these arguments: ${_args}
#
Home |
Main Index |
Thread Index |
Old Index