core/buildscripts: Added ARM support to BITS detection.

Added support for armv6/armv7/aarch32/aarch64 BITS detection
to build scripts.
This commit is contained in:
dev
2016-05-07 01:34:38 +00:00
parent c2f35c0d29
commit 0f6336052a
3 changed files with 34 additions and 6 deletions

View File

@@ -5,18 +5,28 @@
[ -z "$CC" ] && CC="gcc"
if [ -z $BITS ]; then
if [[ $(uname -a) =~ "x86_64" ]]; then
UNAME="$(uname -a)"
if test "${UNAME#*x86_64}" != "x86_&4"; then
BITS=64
elif [[ $(uname -a) =~ "i386" ]]; then
elif test "${UNAME#*i386}" != "i386"; then
BITS=32
elif [[ $(uname -a) =~ "i686" ]]; then
elif test "${UNAME#*i686}" != "i686"; then
BITS=32
elif test "${UNAME#*armv6}" != "armv6"; then
BITS=32
elif test "${UNAME#*armv7}" != "armv7"; then
BITS=32
elif test "${UNAME#*aarch32}" != "aarch32"; then
BITS=32
elif test "${UNAME#*aarch64}" != "aarch64"; then
BITS=64
else
echo "Unable to detect default setting for BITS variable"
exit
fi
printf "\aBITS variable not set, defaulting to $BITS\n\a" >&2
printf "\aBITS variable not set, $BITS bit system detected\n\a" >&2
fi
# If JAVA_HOME isn't set we'll try to figure it out

View File

@@ -93,12 +93,21 @@ if [ -z $BITS ]; then
BITS=32
elif test "${UNAME#*i686}" != "i686"; then
BITS=32
elif test "${UNAME#*armv6}" != "armv6"; then
BITS=32
elif test "${UNAME#*armv7}" != "armv7"; then
BITS=32
elif test "${UNAME#*aarch32}" != "aarch32"; then
BITS=32
elif test "${UNAME#*aarch64}" != "aarch64"; then
BITS=64
else
echo "Unable to detect default setting for BITS variable"
exit
fi
printf "\aBITS variable not set, defaulting to $BITS\n\a" >&2
printf "\aBITS variable not set, $BITS bit system detected\n\a" >&2
fi

View File

@@ -31,12 +31,21 @@ if [ -z $BITS ]; then
BITS=32
elif test "${UNAME#*i686}" != "i686"; then
BITS=32
elif test "${UNAME#*armv6}" != "armv6"; then
BITS=32
elif test "${UNAME#*armv7}" != "armv7"; then
BITS=32
elif test "${UNAME#*aarch32}" != "aarch32"; then
BITS=32
elif test "${UNAME#*aarch64}" != "aarch64"; then
BITS=64
else
echo "Unable to detect default setting for BITS variable"
exit
fi
printf "\aBITS variable not set, defaulting to $BITS\n\a" >&2
printf "\aBITS variable not set, $BITS bit system detected\n\a" >&2
fi