summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config.sub
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-07-10 23:03:59 +0000
committerobrien <obrien@FreeBSD.org>1999-07-10 23:03:59 +0000
commitd4db5fb866b7ad5216abd5047774a3973b9901a9 (patch)
treeedca008aa0e9cdfae2ef7478f9109ca7f3a2a028 /contrib/gcc/config.sub
parentb822db150531f5b7067d4d970080b7358e07ae89 (diff)
downloadFreeBSD-src-d4db5fb866b7ad5216abd5047774a3973b9901a9.zip
FreeBSD-src-d4db5fb866b7ad5216abd5047774a3973b9901a9.tar.gz
Virgin import of GCC 2.7.2.3
Diffstat (limited to 'contrib/gcc/config.sub')
-rwxr-xr-xcontrib/gcc/config.sub32
1 files changed, 21 insertions, 11 deletions
diff --git a/contrib/gcc/config.sub b/contrib/gcc/config.sub
index e67a800..9bb45e9 100755
--- a/contrib/gcc/config.sub
+++ b/contrib/gcc/config.sub
@@ -62,11 +62,21 @@ case $1 in
;;
esac
-# Separate what the user gave into CPU-COMPANY and OS (if any).
-basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-if [ $basic_machine != $1 ]
-then os=`echo $1 | sed 's/.*-/-/'`
-else os=; fi
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ linux-gnu*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
@@ -129,7 +139,7 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
- tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
+ tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
| arme[lb] | pyramid \
| tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
| alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
@@ -144,7 +154,7 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
- vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \
+ vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
| sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
| none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
@@ -308,19 +318,19 @@ case $basic_machine in
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i[345]86v32)
+ i[3456]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
os=-sysv32
;;
- i[345]86v4*)
+ i[3456]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
os=-sysv4
;;
- i[345]86v)
+ i[3456]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
os=-sysv
;;
- i[345]86sol2)
+ i[3456]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
os=-solaris2
;;
OpenPOWER on IntegriCloud