2
2
# Attempt to guess a canonical system name.
3
3
# Copyright 1992-2015 Free Software Foundation, Inc.
4
4
5
- timestamp=' 2015-01-01 '
5
+ timestamp=' 2015-03-04 '
6
6
7
7
# This file is free software; you can redistribute it and/or modify it
8
8
# under the terms of the GNU General Public License as published by
@@ -168,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
168
168
# Note: NetBSD doesn't particularly care about the vendor
169
169
# portion of the name. We always set it to "unknown".
170
170
sysctl=" sysctl -n hw.machine_arch"
171
- UNAME_MACHINE_ARCH=` (/sbin/$sysctl 2> /dev/null || \
172
- /usr/sbin/$sysctl 2> /dev/null || echo unknown)`
171
+ UNAME_MACHINE_ARCH=` (uname -p 2> /dev/null || \
172
+ /sbin/$sysctl 2> /dev/null || \
173
+ /usr/sbin/$sysctl 2> /dev/null || \
174
+ echo unknown)`
173
175
case " ${UNAME_MACHINE_ARCH} " in
174
176
armeb) machine=armeb-unknown ;;
175
177
arm* ) machine=arm-unknown ;;
176
178
sh3el) machine=shl-unknown ;;
177
179
sh3eb) machine=sh-unknown ;;
178
180
sh5el) machine=sh5le-unknown ;;
181
+ earmv* )
182
+ arch=` echo ${UNAME_MACHINE_ARCH} | sed -e ' s,^e\(armv[0-9]\).*$,\1,' `
183
+ endian=` echo ${UNAME_MACHINE_ARCH} | sed -ne ' s,^.*\(eb\)$,\1,p' `
184
+ machine=${arch}${endian} -unknown
185
+ ;;
179
186
* ) machine=${UNAME_MACHINE_ARCH} -unknown ;;
180
187
esac
181
188
# The Operating System including object format, if it has switched
182
189
# to ELF recently, or will in the future.
183
190
case " ${UNAME_MACHINE_ARCH} " in
184
- arm* |i386|m68k|ns32k|sh3* |sparc|vax)
191
+ arm* |earm * | i386|m68k|ns32k|sh3* |sparc|vax)
185
192
eval $set_cc_for_build
186
193
if echo __ELF__ | $CC_FOR_BUILD -E - 2> /dev/null \
187
194
| grep -q __ELF__
@@ -197,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
197
204
os=netbsd
198
205
;;
199
206
esac
207
+ # Determine ABI tags.
208
+ case " ${UNAME_MACHINE_ARCH} " in
209
+ earm* )
210
+ expr=' s/^earmv[0-9]/-eabi/;s/eb$//'
211
+ abi=` echo ${UNAME_MACHINE_ARCH} | sed -e " $expr " `
212
+ ;;
213
+ esac
200
214
# The OS release
201
215
# Debian GNU/NetBSD machines have a different userland, and
202
216
# thus, need a distinct triplet. However, they do not need
@@ -213,7 +227,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
213
227
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
214
228
# contains redundant information, the shorter form:
215
229
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
216
- echo " ${machine} -${os}${release} "
230
+ echo " ${machine} -${os}${release}${abi} "
217
231
exit ;;
218
232
* :Bitrig:* :* )
219
233
UNAME_MACHINE_ARCH=` arch | sed ' s/Bitrig.//' `
933
947
crisv32:Linux:* :* )
934
948
echo ${UNAME_MACHINE} -axis-linux-${LIBC}
935
949
exit ;;
950
+ e2k:Linux:* :* )
951
+ echo ${UNAME_MACHINE} -unknown-linux-${LIBC}
952
+ exit ;;
936
953
frv:Linux:* :* )
937
954
echo ${UNAME_MACHINE} -unknown-linux-${LIBC}
938
955
exit ;;
0 commit comments