Improve 64-bit compiler and platform checks.
Ensure core dumps are enabled during testing.
This commit is contained in:
parent
fb30b5c295
commit
25bb54e3bc
2 changed files with 18 additions and 7 deletions
|
@ -266,7 +266,7 @@ $(PROG): $(OBJS)
|
||||||
$(LINK) -o $@ $(OBJS) $(LDLIBS)
|
$(LINK) -o $@ $(OBJS) $(LDLIBS)
|
||||||
|
|
||||||
test: all
|
test: all
|
||||||
(cd test; sh ./run_test.sh) 2>&1 | tee test.log
|
(cd test; ulimit -c unlimited; sh ./run_test.sh) 2>&1 | tee test.log
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(PROG) $(OBJS) $(BAKFILES)
|
$(RM) $(PROG) $(OBJS) $(BAKFILES)
|
||||||
|
|
23
config
23
config
|
@ -82,16 +82,27 @@ fi
|
||||||
gcc -v 2>&1 | grep lto > /dev/null
|
gcc -v 2>&1 | grep lto > /dev/null
|
||||||
[ $? -eq 0 ] && lto_flag="-flto"
|
[ $? -eq 0 ] && lto_flag="-flto"
|
||||||
|
|
||||||
# Check bitness of system
|
# Check bitness of system/toolchain
|
||||||
bitness=`./tst`
|
bitness=`./tst`
|
||||||
rm -f tst tst.c
|
|
||||||
if [ $bitness -lt 8 ]
|
if [ $bitness -lt 8 ]
|
||||||
then
|
then
|
||||||
echo "ERROR:"
|
# Hmmm maybe default compilation is 32-bit. Re-try with m64 flag.
|
||||||
echo "Only 64-bit platforms are supported."
|
gcc -m64 tst.c -o tst
|
||||||
echo ""
|
if [ $? -ne 0 ]
|
||||||
exit 1
|
then
|
||||||
|
rm -f tst tst.c
|
||||||
|
echo "ERROR:"
|
||||||
|
echo "Only 64-bit platforms are supported."
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If m64 compilation succeeds we assume platform to be 64-bit capable but
|
||||||
|
# explicit flag is reqd.
|
||||||
|
# Instead of setting another variable lets cheat by plugging m64 into lto_flag!
|
||||||
|
lto_flag="${lto_flag} -m64"
|
||||||
fi
|
fi
|
||||||
|
rm -f tst tst.c
|
||||||
|
|
||||||
while [ "${arg1}" != "" ]
|
while [ "${arg1}" != "" ]
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in a new issue