Frage

I am trying to cross-compile zlib for an ARM processor using crosstool-ng, and its resulting compiler arm-linux-gnueabihf-gcc. I set the CC variable to use the cross compiler, as well as AR and RANLIB, then I run them with ./configure as follows:

CC=arm-linux-gnueabihf-gcc AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib LDSHARED="arm-linux-gnueabihf-gcc -shared -Wl,-soname,libz.so.1" ./configure --shared --prefix=/usr

The problem is that it spits out a Makefile without the AR variable I had set, instead it has AR set to libtool, which is for my native Mac machine. Here is what the Makefile has set:

AR=libtool
ARFLAGS=-o
RANLIB=ranlib

I can manually edit the Makefile and change AR=arm-linux-gnueabihf-ar and ARFLAGS=rcs which fixes the build. But that is a hack to me. Here is the configure script:

http://pastebin.com/trmJbPKb

Does anyone see anything wrong with how I run the configure command?

War es hilfreich?

Lösung

Try it with CHOST=arm-linux-gnueabihf instead of setting CC, AR, etc. That will prefix the commands with that string.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top