X Libraries/linking
H. J. Lu
hjl@lucon.org
Tue Jun 25 09:10:00 GMT 2002
On Tue, Jun 25, 2002 at 10:55:38AM -0500, Peter Bergner wrote:
> On Tue, Jun 25, 2002 at 08:36:34AM -0700, H. J. Lu wrote:
> : On Tue, Jun 25, 2002 at 11:50:13AM +0930, Alan Modra wrote:
> : > On Mon, Jun 24, 2002 at 03:59:46PM -0500, Peter Bergner wrote:
> : > > Is it possible to "act" like a native toolchain?
> : >
> : > Sure. This enables the /etc/ld.so.conf, LD_RUN_PATH and
> : > LD_LIBRARY_PATH search for powerpc-linux to powerpc64-linux
> : > (and vice-versa) cross linkers.
> : >
> : > * emulparams/elf64ppc.sh (NATIVE_CROSS): Define.
> : > * emulparams/elf32ppc.sh (NATIVE_CROSS): Define.
> : > * emultempl/elf32.em (gld${EMULATION_NAME}_search_needed): Behave
> : > as for a native linker if NATIVE_CROSS.
> : > (gld${EMULATION_NAME}_after_open): Likewise.
> : >
> :
> : May I ask why you want to do that? I didn't see the original email. It
> : sounds like you may want to enable the powerpc64-linux target when
> : configuring for powerpc-linux.
>
> On the PPC64 Linux kernel, our binutils & gcc are compiled with
> --host=powerpc-linux --target=powerpc64-linux, so our so called
> "native" toolchain is really a cross toolchain.
>
> The problem that Stuart hit was he was trying to link against libXt.so
> and libX11.so. His link command specifed the directory where those
> libs live (-L/...), but it wasn't able to find the other X11 libs those
> particular libs need (eg, libXmu.so,...). This seems to be due to ld
> not reading /etc/ld.so.conf because it's a cross linker.
>
> Since our cross toolchain is acting as our native toolchain, I asked Alan
> whether we can make ours "act" as if it really was a native toolcahin.
>
There may be a different way to deal with it. Let me think about it.
H.J.
More information about the Binutils
mailing list