mirror of
git://git.savannah.gnu.org/config.git
synced 2025-05-29 02:26:36 +12:00
* config.guess (set_cc_for_build): Guard against $CC_FOR_BUILD,
$HOST_CC and $CC being undefined by using ${var-} style expansion. (*:NetBSD:*:*): Likewise for $abi. * testsuite/config-guess.sh: Run config.guess under `sh -eu'.
This commit is contained in:
parent
32d5bd9cec
commit
382847f038
@ -1,3 +1,10 @@
|
|||||||
|
2018-05-19 Ben Elliston <bje@gnu.org>
|
||||||
|
|
||||||
|
* config.guess (set_cc_for_build): Guard against $CC_FOR_BUILD,
|
||||||
|
$HOST_CC and $CC being undefined by using ${var-} style expansion.
|
||||||
|
(*:NetBSD:*:*): Likewise for $abi.
|
||||||
|
* testsuite/config-guess.sh: Run config.guess under `sh -eu'.
|
||||||
|
|
||||||
2018-05-19 Ben Elliston <bje@gnu.org>
|
2018-05-19 Ben Elliston <bje@gnu.org>
|
||||||
|
|
||||||
* testsuite/config-guess.sh: Set -eu for robustness. Run
|
* testsuite/config-guess.sh: Set -eu for robustness. Run
|
||||||
|
6
config.guess
vendored
6
config.guess
vendored
@ -2,7 +2,7 @@
|
|||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2018-03-08'
|
timestamp='2018-05-19'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@ -106,7 +106,7 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
|||||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||||
dummy=$tmp/dummy ;
|
dummy=$tmp/dummy ;
|
||||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
|
||||||
,,) echo "int x;" > "$dummy.c" ;
|
,,) echo "int x;" > "$dummy.c" ;
|
||||||
for c in cc gcc c89 c99 ; do
|
for c in cc gcc c89 c99 ; do
|
||||||
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
||||||
@ -237,7 +237,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|||||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||||
# contains redundant information, the shorter form:
|
# contains redundant information, the shorter form:
|
||||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||||
echo "$machine-${os}${release}${abi}"
|
echo "$machine-${os}${release}${abi-}"
|
||||||
exit ;;
|
exit ;;
|
||||||
*:Bitrig:*:*)
|
*:Bitrig:*:*)
|
||||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||||
|
@ -30,7 +30,7 @@ run_config_guess()
|
|||||||
[ \$1 = -p ] && echo "@PROCESSOR@" && exit 0
|
[ \$1 = -p ] && echo "@PROCESSOR@" && exit 0
|
||||||
EOF
|
EOF
|
||||||
chmod +x uname
|
chmod +x uname
|
||||||
output=$(sh -e ../config.guess 2>/dev/null)
|
output=$(sh -eu ../config.guess 2>/dev/null)
|
||||||
if test $? != 0 ; then
|
if test $? != 0 ; then
|
||||||
echo "FAIL: unable to guess $machine:$release:$system:$version"
|
echo "FAIL: unable to guess $machine:$release:$system:$version"
|
||||||
rc=1
|
rc=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user