This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: X Libraries/linking
- From: Peter Bergner <bergner at brule dot borg dot umn dot edu>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com, Stuart Monteith <MONTEITH at uk dot ibm dot com>, Alan Modra <amodra at bigpond dot net dot au>
- Date: Tue, 25 Jun 2002 10:55:38 -0500
- Subject: Re: X Libraries/linking
- References: <OFA5489468.48C15A5C-ON86256BE2.00722B22@rchland.ibm.com> <20020625022013.GD22093@bubble.sa.bigpond.net.au> <20020625083634.D18907@lucon.org>
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.
Peter