* config.guess: Replace "if [ EXPR ]" with "if test EXPR".

* config.sub: Likewise.
	* testsuite/config-guess.sh: Likewise.
	* testsuite/config-sub.sh: Likewise.

Signed-off-by: Ben Elliston <bje@gnu.org>
This commit is contained in:
Issam E. Maghni 2020-08-17 13:36:41 +10:00 committed by Ben Elliston
parent 2593751ef2
commit 0b5188819b
5 changed files with 31 additions and 24 deletions

View File

@ -1,3 +1,10 @@
2020-08-17 Issam E. Maghni <issam.e.maghni@mailbox.org>
* config.guess: Replace "if [ EXPR ]" with "if test EXPR".
* config.sub: Likewise.
* testsuite/config-guess.sh: Likewise.
* testsuite/config-sub.sh: Likewise.
2020-07-12 Ben Elliston <bje@gnu.org>
* config.guess (arm64:Darwin:*:*): Recognise.

28
config.guess vendored
View File

@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2020 Free Software Foundation, Inc.
timestamp='2020-07-12'
timestamp='2020-08-17'
# 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
@ -404,7 +404,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if test "$CC_FOR_BUILD" != no_compiler_found; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
@ -544,10 +544,10 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
then
if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
[ "$TARGET_BINARY_INTERFACE"x = x ]
if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
test "$TARGET_BINARY_INTERFACE"x = x
then
echo m88k-dg-dgux"$UNAME_RELEASE"
else
@ -580,7 +580,7 @@ EOF
echo i386-ibm-aix
exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
if test -x /usr/bin/oslevel ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
@ -620,7 +620,7 @@ EOF
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/lslpp ] ; then
if test -x /usr/bin/lslpp ; then
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
@ -655,7 +655,7 @@ EOF
9000/31?) HP_ARCH=m68000 ;;
9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
if test -x /usr/bin/getconf; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "$sc_cpu_version" in
@ -669,7 +669,7 @@ EOF
esac ;;
esac
fi
if [ "$HP_ARCH" = "" ]; then
if test "$HP_ARCH" = ""; then
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
@ -708,7 +708,7 @@ EOF
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ "$HP_ARCH" = hppa2.0w ]
if test "$HP_ARCH" = hppa2.0w
then
set_cc_for_build
@ -782,7 +782,7 @@ EOF
echo hppa1.0-hp-osf
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
if test -x /usr/sbin/sysversion ; then
echo "$UNAME_MACHINE"-unknown-osf1mk
else
echo "$UNAME_MACHINE"-unknown-osf1
@ -1097,7 +1097,7 @@ EOF
x86_64:Linux:*:*)
set_cc_for_build
LIBCABI=$LIBC
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if test "$CC_FOR_BUILD" != no_compiler_found; then
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_X32 >/dev/null
@ -1294,7 +1294,7 @@ EOF
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
if test -d /usr/nec; then
echo mips-nec-sysv"$UNAME_RELEASE"
else
echo mips-unknown-sysv"$UNAME_RELEASE"
@ -1359,7 +1359,7 @@ EOF
else
set_cc_for_build
fi
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if test "$CC_FOR_BUILD" != no_compiler_found; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null

4
config.sub vendored
View File

@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2020 Free Software Foundation, Inc.
timestamp='2020-07-10'
timestamp='2020-08-17'
# 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
@ -1278,7 +1278,7 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x$basic_os != x ]
if test x$basic_os != x
then
# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just

View File

@ -22,12 +22,12 @@ run_config_guess()
-e "s,@VERSION@,$version," \
-e "s,@PROCESSOR@,$processor," > ./uname << EOF
#!/bin/sh
[ \$# -ne 1 ] && exec sh \$0 -s
[ \$1 = -m ] && echo "@MACHINE@" && exit 0
[ \$1 = -r ] && echo "@RELEASE@" && exit 0
[ \$1 = -s ] && echo "@SYSTEM@" && exit 0
[ \$1 = -v ] && echo "@VERSION@" && exit 0
[ \$1 = -p ] && echo "@PROCESSOR@" && exit 0
test \$# -ne 1 && exec sh \$0 -s
test \$1 = -m && echo "@MACHINE@" && exit 0
test \$1 = -r && echo "@RELEASE@" && exit 0
test \$1 = -s && echo "@SYSTEM@" && exit 0
test \$1 = -v && echo "@VERSION@" && exit 0
test \$1 = -p && echo "@PROCESSOR@" && exit 0
EOF
chmod +x uname
output=$(CC_FOR_BUILD=no_compiler_found sh -eu ../config.guess 2>/dev/null)

View File

@ -36,7 +36,7 @@ run_config_sub()
while read -r alias canonical ; do
run_one_config_sub "$alias" "$canonical" &
numtests+=1 jobs+=1
if [ $jobs -eq $maxprocs ] ; then
if test $jobs -eq $maxprocs ; then
for pid in $(jobs -p) ; do
wait "$pid"
rc=$((rc || $?))
@ -73,7 +73,7 @@ run_config_sub_idempotent()
sed -r 's/\t+/\t/g' < config-sub.data | cut -f 2 | uniq | while read -r canonical ; do
run_one_config_sub_idempotent "$canonical" &
numtests+=1 jobs+=1
if [ $jobs -eq $maxprocs ] ; then
if test $jobs -eq $maxprocs ; then
for pid in $(jobs -p) ; do
wait "$pid"
rc=$((rc || $?))