cross-compiling to mipsel
Daniel Eiband
eiband at in.tum.de
Sun Feb 19 15:47:12 CET 2006
I hope this mailing list is suitable, because it might be that my probem
is due to a libtool bug.
I try to cross-compile libgcrypt for a mipsel host in a buildroot like
environment. It works fine, except on machines with a host version of
libgpg-error installed in /usr/lib/ (libgpg-error was configured with
--prefix=/usr, but installed into the
$(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib).
My configure looks like this:
PATH=$(TARGET_TOOLCHAIN_PATH) \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(TARGET_TOOLCHAIN_STAGING_DIR)/usr/include" \
LDFLAGS="-L$(TARGET_TOOLCHAIN_STAGING_DIR)/lib
-L$(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--sysconfdir=/etc \
--disable-nls \
--disable-largefile \
--enable-shared \
--enable-static \
--disable-rpath \
--disable-asm \
--with-gpg-error-prefix="$(TARGET_TOOLCHAIN_STAGING_DIR)/usr"
If there is libgpg-error installed on the build machine, make stops
while linking:
/bin/sh ../libtool --tag=CC --mode=link mipsel-linux-gcc -Os -W -Wall
-pipe -march=4kc -Wa,--trap -Wall
-L/var/tmp/ds-0.2/toolchain/gcc-4.0.1-uClibc-0.9.26/mipsel-linux-uclibc/lib
-L/var/tmp/ds-0.2/toolchain/gcc-4.0.1-uClibc-0.9.26/mipsel-linux-uclibc/usr/lib
-o libgcrypt.la -rpath /usr/lib -Wl,--version-script=./libgcrypt.vers
-version-info 13:1:2 libgcrypt_la-misc.lo libgcrypt_la-global.lo
libgcrypt_la-sexp.lo libgcrypt_la-stdmem.lo libgcrypt_la-secmem.lo
libgcrypt_la-missing-string.lo libgcrypt_la-module.lo
libgcrypt_la-ath.lo ../cipher/libcipher.la ../mpi/libmpi.la -lgpg-error
-lnsl -lnsl
mipsel-linux-gcc -shared .libs/libgcrypt_la-misc.o
.libs/libgcrypt_la-global.o .libs/libgcrypt_la-sexp.o
.libs/libgcrypt_la-stdmem.o .libs/libgcrypt_la-secmem.o
.libs/libgcrypt_la-missing-string.o .libs/libgcrypt_la-module.o
.libs/libgcrypt_la-ath.o -Wl,--whole-archive ../cipher/.libs/libcipher.a
../mpi/.libs/libmpi.a -Wl,--no-whole-archive
-L/var/tmp/ds-0.2/toolchain/gcc-4.0.1-uClibc-0.9.26/mipsel-linux-uclibc/lib
-L/var/tmp/ds-0.2/toolchain/gcc-4.0.1-uClibc-0.9.26/mipsel-linux-uclibc/usr/lib
/usr/lib/libgpg-error.so -lnsl -march=4kc
-Wl,--version-script=./libgcrypt.vers -Wl,-soname -Wl,libgcrypt.so.11 -o
.libs/libgcrypt.so.11.2.1
/usr/lib/libgpg-error.so: could not read symbols: File in wrong format
Of course /usr/lib/libgpg-error.so is in wrong format. Is there a way to
tell libtool not to use host libraries when cross-compiling?
Is this a common libtool issue or a particular libgcrypt problem?
Regards,
Daniel
More information about the Gcrypt-devel
mailing list