Merge pull request #140 from jogu/rasppi3-fix

Fix for gcc crashing during configure / unable to build on raspberry pi 3
This commit is contained in:
Mr-Dave
2016-08-21 16:14:23 -06:00
committed by GitHub

View File

@@ -845,7 +845,18 @@ if test "${OPTIMIZECPU}" = "yes"; then
# Try to autodetect cpu type
CPU_NAME="unknown"
CPU_TYPE="unknown"
if test -e "/proc/cpuinfo" ; then
if test -e "/proc/device-tree/model"; then
# explicit test for RPI3 as /proc/cpuinfo reports armv7 even though
# it is armv8
RPI3=`grep "Raspberry Pi 3 Model" /proc/device-tree/model`
if test "x${RPI3}" != "x"; then
CPU_NAME="Raspberry Pi 3"
CPU_TYPE="Raspberry Pi 3"
CPU_OPTIONS="-mcpu=cortex-a53 -mfpu=neon-fp-armv8"
fi
fi
if test "x${CPU_TYPE}" = "xunknown" && test -e "/proc/cpuinfo" ; then
intel[[30]]="-march=i386"
intel[[32]]="-march=i386"
intel[[34]]="-march=i386"
@@ -1045,11 +1056,11 @@ rm -f $TMPO
rm -f $TMPC
if test "x${TMP}" = "x1" ; then
if test "x${TMP}" = "x0" ; then
echo "CPU optimization: $CPU_OPTIONS"
else
CPU_OPTIONS=""
echo "No CPU optimizations will be added"
else
echo "CPU optimization: $CPU_OPTIONS"
fi
else