public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Cross-compiling for powerpc
@ 2001-01-26 12:41 Sébastien Côté
  2001-01-30 14:03 ` Sébastien Côté
  0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Côté @ 2001-01-26 12:41 UTC (permalink / raw)
  To: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

Hi!

I'm trying to build a cross-compiler for powerpc but I'm not really sure
which target I should select.

According to binutils/ld/configure.tgt, powerpc-elf and powerpc-eabi are
the same (what does eiba mean??).  But what's the difference with
powerpc-linux-gnu???

My target is a powerpc running linux, but it's an embedded system so
should I select eiba or linux?

If I have to select powerpc-linux, I get another problem since my target
is running in little-endian and there's no powerpcle-linux-gnu.

Could anyone point me in the right direction?

Thanks,

Sébastien Côté

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

* Re: Cross-compiling for powerpc
  2001-01-26 12:41 Cross-compiling for powerpc Sébastien Côté
@ 2001-01-30 14:03 ` Sébastien Côté
  2001-01-30 14:23   ` Alexandre Oliva
  0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Côté @ 2001-01-30 14:03 UTC (permalink / raw)
  To: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

Hi again,

I built my cross-compiler for powerpcle-elf... I installed binutils, gcc
and newlib following the instructions on the CrossGCC FAQ.  Everything
seemed to install correctly.  I can compile a simple program like this:

int main()
{
  while(1);
}


However, if I try to include any function from the library (newlib) with
the following line:
/cross/bin/powerpcle-elf-gcc test.c -o test

I get the following errors:
/tmp/ccNzgwZB.o: In function `main':
/tmp/ccNzgwZB.o(.text+0x38): undefined reference to `memcpy'
/tmp/ccNzgwZB.o(.text+0x44): undefined reference to `strlen'
/tmp/ccNzgwZB.o(.text+0x54): undefined reference to `malloc'
collect2: ld returned 1 exit status

So I tought I should add "-lc" to the end of the gcc command since it
didn't seem to libc.  I got the following:
/cross/powerpcle-elf/lib/libc.a(sbrkr.o): In function `_sbrk_r':
/home/scote1/build-newlib/powerpcle-elf/newlib/libc/reent/../../../../../newlib-1.9.0/newlib/libc/reent/sbrkr.c:61:
undefined reference to `sbrk'
collect2: ld returned 1 exit status


Does anybody know what the problem might be??  Why is it using libs in
the sources directory in the first place???  I have really no idea what
might be wrong!

Thanks!

Sébastien Côté

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

* Re: Cross-compiling for powerpc
  2001-01-30 14:03 ` Sébastien Côté
@ 2001-01-30 14:23   ` Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2001-01-30 14:23 UTC (permalink / raw)
  To: Sébastien
	Côté
  Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

On Jan 30, 2001, Sébastien Côté <scote1@Matrox.COM> wrote:

> /cross/powerpcle-elf/lib/libc.a(sbrkr.o): In function `_sbrk_r':
> /home/scote1/build-newlib/powerpcle-elf/newlib/libc/reent/../../../../../newlib-1.9.0/newlib/libc/reent/sbrkr.c:61:
> undefined reference to `sbrk'

Looks like some problem in newlib.  Maybe you should ask in the
mailing list devoted to newlib?

> Does anybody know what the problem might be??  Why is it using libs in
> the sources directory in the first place???

It is not.  It's just that the debugging information in the binary
library contains the complete pathnames of the sources.  So that, in
case you decide to debug it, it will ``just work'' unless you remove
the source tree.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

end of thread, other threads:[~2001-01-30 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-26 12:41 Cross-compiling for powerpc Sébastien Côté
2001-01-30 14:03 ` Sébastien Côté
2001-01-30 14:23   ` Alexandre Oliva

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 read-only IMAP folder(s) and NNTP newsgroup(s).