I’ve been using ellcc on a Xilinx Zynq ARM system running Petalinux, and am very pleased with it. I have sometimes ran into issues building packages. For example, I wanted to build libpcap-1.7.4 from http://www.tcpdump.org/
Everything goes great until it tries to link:
/mnt/ellcc/bin/ecc -shared -Wl,-soname,libpcap.so.$MAJOR_VER \
-o libpcap.so.$VER pcap-linux.o pcap-usb-linux.o pcap-can-linux.o pcap-netfilter-linux.o fad-getad.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o sf-pcap.o sf-pcap-ng.o pcap-common.o bpf_image.o bpf_dump.o scanner.o grammar.o bpf_filter.o version.o
/mnt/ellcc/bin/../libecc/lib/arm-linux-engeabi/Scrt1.o: In function `_start’:
/home/rich/ellcc-release/libecc/musl-build/arm-linux-engeabi/musl/Scrt1.s:26: undefined reference to `main’
ecc: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:372: recipe for target ‘libpcap.so’ failed
make: *** [libpcap.so] Error 1
I’ve seen this occur with another package (I forget now which one). But if I link the files on another system with a gcc cross-compiler, it links fine. Any ideas what might be happening here? A Clang issue? Googling around, I’ve seen similar problems to this, but no obvious solution.
Thanks!
Robert