#652 armv6l/armhf: ariarm.c does not get generated

build problems
open
Bruno Haible
clisp (525)
5
2012-08-22
2012-08-22
No

System: Raspberry Pi

% uname -a
Linux tinkerbell 3.1.9+ #272 PREEMPT Tue Aug 7 22:51:44 BST 2012 armv6l GNU/Linux
% cat /proc/cpuinfo
#Processor : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : swp half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : BCM2708
Revision : 0002
Serial : 00000000b096e6b2

The second error I encountered is a missing ariarm.c:
gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard -I/home/cptsalek/local/clisp/src/gllib -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -O2 -falign-functions=4 -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -c lisparit.c
In file included from lisparit.d:28:0:
arilev1.d:270:26: fatal error: ariarm.c: No such file or directory
compilation terminated.
make: *** [lisparit.o] Error 1

This one can be traced back to a set of definitions and their handling in makemake.

After running configure, makemake contains the following definition:
host='armv6l-unknown-linux-gnueabi' # something like 'sparc-sun-sunos4'
host_cpu='armv6l' # something like 'sparc'
host_cpu_c_abi='armel' # ditto

In the following block cpu is set to $host_cpu_c_abi, thus containing armel as well:
# Main cpu dependencies:
cpu=$host_cpu_c_abi
if test -z "$cpu"; then
echo "$0: WARNING: host_cpu_c_abi is void; using host_cpu=${host_cpu}" >&2
case "$host_cpu" in
hppa*) cpu=hppa ;;
arm*) cpu=arm ;;
mips64*) cpu=mips64 ;;
* ) cpu=${host_cpu}
esac
fi

But later on, where ARI_ASMD and ARI_ASMS are defined, there is no matching case for "armel", the only case for ARM cpus is the following:
if [ "$cpu" = arm ] ; then
ARI_ASMD=$ARI_ASMD' ariarm'
ARI_ASMS=$ARI_ASMS' ariarm'
fi

This probably goes undetected, makemake finishes, but no ariarm.c has been created.

As a workaround I forced host_cpu_c_abi to be ignored for arm by encapsulating cpu=$host_cpu_c_abi in a case statement.

Discussion