Gentoo Archives: gentoo-embedded

From: David Thomas <davelists2@×××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: [gentoo-embedded] problems crosscompiling libX11
Date: Fri, 09 Dec 2005 08:20:39
Message-Id: 20051209081928.GA11683@peoplemerge.com
1 I've been having problems with libX11. First it tries to build a binary
2 with the crosscompiler then execute it:
3
4 /bin/sh: ../src/util/makekeys: cannot execute binary file
5
6 I wrote a patch that fixes this... See below.
7
8 I'm still having a problem with libtool. The last step of the build process
9 it does the following:
10 /bin/sh ../libtool --mode=link armv5l-softfloat-linux-uclibc-gcc ... -L /newroot/usr/lib ...
11 ...(much more)... -lXau -lXdmcp -ldl
12
13 This calls the crosscompiler replacing -lXau and -lXdmcp with /usr/lib/libXau.so and
14 /usr/lib/libXdmcp.so INSTEAD of the crosscompiled ones in /newroot/usr/lib
15
16 Same thing even if I hardcode values in ../libtool for sys_lib_search_path_spec.
17 I also tried setting an LDPATH in /etc/env.d/05crosscompiler.
18
19 Am I missing something in /etc/ld.so.conf environment?
20
21 Thanks!
22 Dave Thomas
23
24 Here are the fixes:
25 Added to ebuild (is this right? comments? it seems to work):
26 src_unpack()
27 {
28 x-modular_unpack_source
29 x-modular_patch_source
30 cd ${S}
31 epatch /path/to/patchfile
32 x-modular_reconf_source
33 }
34
35 patchfile:
36 --- src/util/Makefile.am
37 +++ src/util/Makefile.am
38 @@ -4,7 +4,8 @@
39
40 makekeys_CFLAGS=$(X11_CFLAGS) $(BIGREQS_CFLAGS)
41
42 -#override CC = gcc
43 +#do not override CC, this is needed when using a crosscompiler since this executable is to be run on $build not $host
44 +CC = gcc
45 LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
46
47 EXTRA_DIST = mkks.sh
48 --- src/util/Makefile.in
49 +++ src/util/Makefile.in
50 @@ -189,8 +189,9 @@
51
52 makekeys_CFLAGS = $(X11_CFLAGS) $(BIGREQS_CFLAGS)
53
54 -#override CC = gcc
55 +#no, do not override CC, this is needed when using a crosscompiler since this executable is to be run on $build not $host
56 +CC = gcc
57 LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
58
59 __END__
60
61
62
63 --
64 gentoo-embedded@g.o mailing list