cross-compiling to mipsel
Daniel Eiband
eiband at in.tum.de
Fri Feb 24 10:59:39 CET 2006
Am Freitag, 24. Februar 2006 09:09 schrieb Dirk Stoecker:
> On Thu, 23 Feb 2006, Daniel Eiband wrote:
> > Am Donnerstag 23 Februar 2006 18:08 schrieben Sie:
> > > 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 ...
> >
> > --with-gpg-error-prefix is the prefix where you installed gpg-error. It
> > seams
>
> It probably should be, but it is not. Read the autogenerated ./configure
> file to understand why I use the environment variable and set
> --with-gpg-error-prefix to dummy. It took me some time to understand, why
> --with-gpg-error-prefix did not work as expected and how to work around.
I think it works as expected. You are lucky that you only have one header in
this case. Otherwise these symlinks would be really annoying.
> > like you didn't install it at all. Besides, this is not my problem.
>
> Excactly. I did not INSTALL it, but compiled a local copy of gpg-error.
> This is usually what you need for cross compiling also (at least in static
> mode). In dynamic mode you need to do some path magic to get it to work on
> you destination system as well.
That's why I compile it with the prefix /usr and install it with the prefix
$(STAGING_DIR)/usr. Why working around and fixing some behaviour
which ./configure is not supposed to do? make install does it for you, just
use another prefix while installing.
Back to my original problem:
If i insert "|| true" here in the libtool
done
if test "$found" != yes || true; then
# deplib doesn't seem to be a libtool library
it works just fine, because then -lgpg-error is not substituted
by /usr/lib/gpg-error.so.
There is another patch from the OpenWRT buildroot necessary to compile the
tests:
diff -ruN libgcrypt-1.2.1-orig/tests/Makefile.am
libgcrypt-1.2.1-1/tests/Makefile.am
--- libgcrypt-1.2.1-orig/tests/Makefile.am 2004-03-03 09:08:05.000000000 +0100
+++ libgcrypt-1.2.1-1/tests/Makefile.am 2005-03-15 21:36:49.000000000 +0100
@@ -21,7 +21,7 @@
TESTS = prime register ac basic tsexp keygen pubkey benchmark
INCLUDES = -I$(top_srcdir)/src
-LDADD = ../src/libgcrypt.la
+LDADD = ../src/libgcrypt.la @LTLIBOBJS@ @GPG_ERROR_LIBS@
EXTRA_PROGRAMS = testapi
noinst_PROGRAMS = $(TESTS)
diff -ruN libgcrypt-1.2.1-orig/tests/Makefile.in
libgcrypt-1.2.1-1/tests/Makefile.in
--- libgcrypt-1.2.1-orig/tests/Makefile.in 2005-01-05 14:53:23.000000000 +0100
+++ libgcrypt-1.2.1-1/tests/Makefile.in 2005-03-15 21:37:12.000000000 +0100
@@ -258,7 +258,7 @@
target_vendor = @target_vendor@
TESTS = prime register ac basic tsexp keygen pubkey benchmark
INCLUDES = -I$(top_srcdir)/src
-LDADD = ../src/libgcrypt.la
+LDADD = ../src/libgcrypt.la @LTLIBOBJS@ @GPG_ERROR_LIBS@
AM_CFLAGS = @GPG_ERROR_CFLAGS@
all: all-am
Regards,
Daniel
More information about the Gcrypt-devel
mailing list