cross-compiling to mipsel
Dirk Stoecker
gcrypt at dstoecker.de
Thu Feb 23 18:08:12 CET 2006
On Sun, 19 Feb 2006, Daniel Eiband wrote:
> 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"
I had an equal problem. The --with-gpg-error-prefix seems not to work as
expected. I used following method after looking in the configure file
(assuming libgpg-error is a subdirectory in current dir):
export GPG_ERROR_CONFIG=`pwd`/libgpg-error/src/gpg-error-config
export CPPFLAGS=-I`pwd`
export LDFLAGS=-L`pwd`
ln -sf libgpg-error/src/.libs/libgpg-error.a .
ln -sf libgpg-error/src/gpg-error.h .
In current dir (`pwd`) now are the links to the .a file and the .h file of
gpg-error, thats why the include paths point to this.
./configure --with-gpg-error-prefix=dummy ...
...
export -n GPG_ERROR_CONFIG
export -n CPPFLAGS
export -n LDFLAGS
I hope I stripped the relevant parts from my script, so you can follow
the idea.
Ciao
--
http://www.dstoecker.de/ (PGP key available)
More information about the Gcrypt-devel
mailing list