linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* LIB_PATH for cross compiling
@ 2001-05-16  5:41 ` Michael Habermann
  2001-05-16  6:08   ` Murray Jensen
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Habermann @ 2001-05-16  5:41 UTC (permalink / raw)
  To: linuxppc-embedded


Hi!

I cross compile from i386 to ppc. If I compile a simple C program, the
linker searchs the libc.so.6 in the /lib path instead of the
/usr/local/powerpc-linux/lib. If I specify the path explicit, it works.

I've tried to make changes in binutils/ld/Makefile and
binutils/ld/genscripts, but found no solution.

How can I change the search path of the linker so that I can simply replace
gcc with powerpc-linux-gcc for simple programs?

I know the question has been asked several times before, but I've not found
an answer in the mailing list that I can use.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LIB_PATH for cross compiling
  2001-05-16  5:41 ` LIB_PATH for cross compiling Michael Habermann
@ 2001-05-16  6:08   ` Murray Jensen
  2001-05-16  7:33     ` Michael Habermann
  0 siblings, 1 reply; 3+ messages in thread
From: Murray Jensen @ 2001-05-16  6:08 UTC (permalink / raw)
  To: linuxppc-embedded


On Wed, 16 May 2001 13:41:23 +0800, Michael Habermann <MHabermann@gmx.de> writes:
>I cross compile from i386 to ppc. If I compile a simple C program, the
>linker searchs the libc.so.6 in the /lib path instead of the
>/usr/local/powerpc-linux/lib.

I think you need to edit the file "/usr/local/powerpc-linux/lib/libc.so".
You will find it is a text file that looks like this:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

change "/lib" and "/usr/lib" to be "/usr/local/powerpc-linux/lib" in the above
file (do it automatically with a script as part of the installation of glibc).
Cheers!
								Murray...
--
Murray Jensen, CSIRO Manufacturing Sci & Tech,         Phone: +61 3 9662 7763
Locked Bag No. 9, Preston, Vic, 3072, Australia.         Fax: +61 3 9662 7853
Internet: Murray.Jensen@cmst.csiro.au  (old address was mjj@mlb.dmt.csiro.au)


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LIB_PATH for cross compiling
  2001-05-16  6:08   ` Murray Jensen
@ 2001-05-16  7:33     ` Michael Habermann
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Habermann @ 2001-05-16  7:33 UTC (permalink / raw)
  To: Murray Jensen, linuxppc-embedded


At 04:08 PM 5/16/2001 +1000, Murray Jensen wrote:


>I think you need to edit the file "/usr/local/powerpc-linux/lib/libc.so".

Thank you, thank you! This solved the problem.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-16  7:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <MHabermann@gmx.de>
2001-05-16  5:41 ` LIB_PATH for cross compiling Michael Habermann
2001-05-16  6:08   ` Murray Jensen
2001-05-16  7:33     ` Michael Habermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).