Add "-", "_", and "A-Z" to the set of allowed characters in the
result from `uname -p`. We already have a platform with an underline ("x86_64"), and the other chars seem harmless.
This commit is contained in:
parent
d2ea53a056
commit
a599e86f4b
6
build.sh
6
build.sh
@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env sh
|
||||
# $NetBSD: build.sh,v 1.204 2009/03/06 16:29:40 apb Exp $
|
||||
# $NetBSD: build.sh,v 1.205 2009/03/09 06:25:51 apb Exp $
|
||||
#
|
||||
# Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
@ -178,7 +178,7 @@ initdefaults()
|
||||
uname_m=$(uname -m 2>/dev/null)
|
||||
uname_p=$(uname -p 2>/dev/null || echo "unknown")
|
||||
case "${uname_p}" in
|
||||
''|unknown|*[^a-z0-9]*) uname_p="${uname_m}" ;;
|
||||
''|unknown|*[^-_A-Za-z0-9]*) uname_p="${uname_m}" ;;
|
||||
esac
|
||||
|
||||
id_u=$(id -u 2>/dev/null || /usr/xpg4/bin/id -u 2>/dev/null)
|
||||
@ -1213,7 +1213,7 @@ createmakewrapper()
|
||||
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.204 2009/03/06 16:29:40 apb Exp $
|
||||
# Generated from: \$NetBSD: build.sh,v 1.205 2009/03/09 06:25:51 apb Exp $
|
||||
# with these arguments: ${_args}
|
||||
#
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: bsd.own.mk,v 1.558 2009/03/06 16:29:41 apb Exp $
|
||||
# $NetBSD: bsd.own.mk,v 1.559 2009/03/09 06:25:51 apb Exp $
|
||||
|
||||
.if !defined(_BSD_OWN_MK_)
|
||||
_BSD_OWN_MK_=1
|
||||
@ -128,7 +128,7 @@ _HOST_OSREL!= uname -r
|
||||
# For _HOST_ARCH, if uname -p fails, or prints "unknown", or prints
|
||||
# something that does not look like an identifier, then use uname -m.
|
||||
_HOST_ARCH!= uname -p 2>/dev/null
|
||||
_HOST_ARCH:= ${HOST_ARCH:tW:C/.*[^a-z0-9].*//:S/unknown//}
|
||||
_HOST_ARCH:= ${HOST_ARCH:tW:C/.*[^-_A-Za-z0-9].*//:S/unknown//}
|
||||
.if empty(_HOST_ARCH)
|
||||
_HOST_ARCH!= uname -m
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user