1
0
forked from pool/kernel-source
kernel-source/arch-symbols

26 lines
540 B
Bash

#!/bin/sh
# With --list, list all known architectures, otherwise print the generic
# name for this architecture (or the one specified on command line).
if [ "$1" = "--list" ]; then
# List all known architectures
echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc
exit 0
fi
if [ -n "$1" ]; then
ARCH="$1"
else
ARCH="`arch`"
fi
case "$ARCH" in
# from rpm --eval '%ix86'
i?86 | pentium3 | pentium4 | athlon | geode)
echo i386
;;
*)
echo "$ARCH"
;;
esac