forked from I2P_Developers/i2p.i2p
Build: Fix Debian build on ARM (ticket #1801)
- Fix other jbigi/jcpuid build script errors and typos - Nonzero exit code missing on some jbigi/jcpuid build script failures - Refresh patch
This commit is contained in:
@@ -4,26 +4,26 @@
|
||||
# When executed in OSX: Produces a libjbigi.jnilib
|
||||
[ -z "$CC" ] && CC="gcc"
|
||||
|
||||
UNAME="$(uname -m)"
|
||||
if [ -z $BITS ]; then
|
||||
UNAME="$(uname -a)"
|
||||
if test "${UNAME#*x86_64}" != "x86_&4"; then
|
||||
if test "${UNAME#*x86_64}" != "$UNAME"; then
|
||||
BITS=64
|
||||
elif test "${UNAME#*i386}" != "i386"; then
|
||||
elif test "${UNAME#*i386}" != "$UNAME"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*i686}" != "i686"; then
|
||||
elif test "${UNAME#*i686}" != "$UNAME"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*armv6}" != "armv6"; then
|
||||
elif test "${UNAME#*armv6}" != "$UNAME"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*armv7}" != "armv7"; then
|
||||
elif test "${UNAME#*armv7}" != "$UNAME"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*aarch32}" != "aarch32"; then
|
||||
elif test "${UNAME#*aarch32}" != "$UNAME"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*aarch64}" != "aarch64"; then
|
||||
elif test "${UNAME#*aarch64}" != "$UNAME"; then
|
||||
BITS=64
|
||||
else
|
||||
|
||||
echo "Unable to detect default setting for BITS variable"
|
||||
exit
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf "BITS variable not set, $BITS bit system detected\n" >&2
|
||||
@@ -85,8 +85,8 @@ else
|
||||
STATICLIBS=".libs/libgmp.a"
|
||||
fi
|
||||
|
||||
[ $BITS -eq 32 ] && COMPILEFLAGS="-m32 $COMPILEFLAGS" && LINKFLAGS="-m32 $LINKFLAGS"
|
||||
[ $BITS -eq 64 ] && COMPILEFLAGS="-m64 $COMPILEFLAGS" && LINKFLAGS="-m64 $LINKFLAGS"
|
||||
[ $BITS -eq 32 -a "${UNAME#*86}" != "$UNAME" ] && COMPILEFLAGS="-m32 $COMPILEFLAGS" && LINKFLAGS="-m32 $LINKFLAGS"
|
||||
[ $BITS -eq 64 -a "${UNAME#*86}" != "$UNAME" ] && COMPILEFLAGS="-m64 $COMPILEFLAGS" && LINKFLAGS="-m64 $LINKFLAGS"
|
||||
|
||||
echo "Compiling C code..."
|
||||
echo "Compile: \"$CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c\""
|
||||
|
||||
@@ -19,30 +19,30 @@ case $TARGET in
|
||||
echo "Building `uname -s |tr [A-Z] [a-z]` .sos";;
|
||||
*)
|
||||
echo "Unsupported build environment"
|
||||
exit;;
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
|
||||
if [ -z $BITS ]; then
|
||||
UNAME="$(uname -a)"
|
||||
if test "${UNAME#*x86_64}" != "x86_&4"; then
|
||||
UNAME="$(uname -m)"
|
||||
if test "${UNAME#*x86_64}" != "$UNAME"; then
|
||||
BITS=64
|
||||
elif test "${UNAME#*i386}" != "i386"; then
|
||||
elif test "${UNAME#*i386}" != "$UNAME"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*i686}" != "i686"; then
|
||||
elif test "${UNAME#*i686}" != "$UNAME"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*armv6}" != "armv6"; then
|
||||
elif test "${UNAME#*armv6}" != "$UNAME"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*armv7}" != "armv7"; then
|
||||
elif test "${UNAME#*armv7}" != "$UNAME"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*aarch32}" != "aarch32"; then
|
||||
elif test "${UNAME#*aarch32}" != "$UNAME"; then
|
||||
BITS=32
|
||||
elif test "${UNAME#*aarch64}" != "aarch64"; then
|
||||
elif test "${UNAME#*aarch64}" != "$UNAME"; then
|
||||
BITS=64
|
||||
else
|
||||
|
||||
echo "Unable to detect default setting for BITS variable"
|
||||
exit
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf "BITS variable not set, $BITS bit system detected\n" >&2
|
||||
|
||||
Reference in New Issue
Block a user