[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Cross-compiling for big-endian arm


I've received patches for Nettle's arm assembly, in order to support
big-endian arm systems. I'm looking for a way to test this support.

This arch variation is somewhat obscure, and maybe unlikely to be a
debian arch any time soon. However, I think the toolchain and user-level qemu
should *almost* supports it.

I've installed gcc-arm-linux-gnueabihf (on a debian x86_64 machine), and
I've attempted to configure nettle as 

~/hack/nettle/configure --enable-fat --host=arm-linux-gnueabihf CXX=/bin/false CC='arm-linux-gnueabihf-gcc -mbig-endian'

(--host is somewhat inaccurate, but it was the easest way to get the
right tools. The -mbig-endian option to the compiler is the most
interesting part).

This fails in the following way (from config.log):

configure:3144: checking whether the C compiler works
configure:3166: arm-linux-gnueabihf-gcc -mbig-endian    conftest.c  >&5
/usr/lib/gcc-cross/arm-linux-gnueabihf/6/libgcc_s.so.1: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status

I would expect that I need both libgcc and libc, compiled for big-endian
arm. Are there any debian packages that could help me? Or do I need to
compile libc and gcc from source (with the appropriate bootstrap tricks,
which I'm not really familiar with)? I prefer to not install binary
packages from unofficial sources.

All advice appreciated.

I would also like to add that I now have both mips and (plain
little-endian) arm cross compilers installed from the debian packages,
and together with qemu, it works brilliantly. 


Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.

Reply to: