linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* cross-compier with gcc
@ 2001-01-17 19:06 Hua Ji
  2001-01-17 20:11 ` Jamie Guinan
  0 siblings, 1 reply; 4+ messages in thread
From: Hua Ji @ 2001-01-17 19:06 UTC (permalink / raw)
  To: linuxppc-embedded


Hi, guys,

Good morning!

Help needed!

I made a cross compiler on my solaris machine for powerpc-elf target.
Everything looks fine when I did the make.

When I used my powerpc-elf-gcc to compile and link my helloworld.c, I got
some error described below. Basically,
my helloworld.c is:
--------
#include <stdio.h>
void main()
{
	printf("Hello World!\n");
}
--------

The command line used for compile and link is: powerpc-elf-gcc -v -o
helloworld helloworld.c

The error is: Can't link printf codes from library!!

---------
GNU assembler version 2.9.1 (powerpc-elf), using BFD version 2.9.1

/export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
collect2 -V -Qy -dn -Bstatic
-L/export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.
2 -L/export/home4/hji/compilers/powerpc-elf-1-17/powerpc-elf/lib
/var/tmp/ccAEuQ8q.o
/export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
libgcc.a
/export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
libgcc.a
/export/home4/hji/compilers/powerpc-elf-1-17/powerpc-elf/bin/ld: warning:
cannot find entry symbol _start; defaulting to 01800074
/var/tmp/ccAEuQ8q.o: In function `ppctest':
/var/tmp/ccAEuQ8q.o(.text+0x20): undefined reference to `printf'
GNU ld version 2.9.1 (with BFD 2.9.1)
  Supported emulations:
   elf32ppc
--------------------

Thanks, guys.

Hua

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

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

* Re: cross-compier with gcc
  2001-01-17 19:06 cross-compier with gcc Hua Ji
@ 2001-01-17 20:11 ` Jamie Guinan
  2001-01-17 20:18   ` Grant Erickson
  0 siblings, 1 reply; 4+ messages in thread
From: Jamie Guinan @ 2001-01-17 20:11 UTC (permalink / raw)
  To: Hua Ji; +Cc: linuxppc-embedded


You need to configure for "powerpc-linux", and build a glibc.

  http://members.nbci.com/greyhams/linux/PowerPC-Embedded-HOWTO-5.html
  http://members.home.net/mmporter/linux/cross/

-Jamie

On Wed, 17 Jan 2001, Hua Ji wrote:

> Hi, guys,
>
> Good morning!
>
> Help needed!
>
> I made a cross compiler on my solaris machine for powerpc-elf target.
> Everything looks fine when I did the make.
>
> When I used my powerpc-elf-gcc to compile and link my helloworld.c, I got
> some error described below. Basically,
> my helloworld.c is:
> --------
> #include <stdio.h>
> void main()
> {
> 	printf("Hello World!\n");
> }
> --------
>
> The command line used for compile and link is: powerpc-elf-gcc -v -o
> helloworld helloworld.c
>
> The error is: Can't link printf codes from library!!
>
> ---------
> GNU assembler version 2.9.1 (powerpc-elf), using BFD version 2.9.1
>
> /export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
> collect2 -V -Qy -dn -Bstatic
> -L/export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.
> 2 -L/export/home4/hji/compilers/powerpc-elf-1-17/powerpc-elf/lib
> /var/tmp/ccAEuQ8q.o
> /export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
> libgcc.a
> /export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
> libgcc.a
> /export/home4/hji/compilers/powerpc-elf-1-17/powerpc-elf/bin/ld: warning:
> cannot find entry symbol _start; defaulting to 01800074
> /var/tmp/ccAEuQ8q.o: In function `ppctest':
> /var/tmp/ccAEuQ8q.o(.text+0x20): undefined reference to `printf'
> GNU ld version 2.9.1 (with BFD 2.9.1)
>   Supported emulations:
>    elf32ppc
> --------------------
>
> Thanks, guys.
>
> Hua
>
>
>

--
================================================================
Jamie Guinan                         Blue Button Solutions, Inc.
guinan@bluebutton.com                  http://www.bluebutton.com
================================================================


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

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

* Re: cross-compier with gcc
  2001-01-17 20:11 ` Jamie Guinan
@ 2001-01-17 20:18   ` Grant Erickson
  2001-01-17 20:22     ` Jamie Guinan
  0 siblings, 1 reply; 4+ messages in thread
From: Grant Erickson @ 2001-01-17 20:18 UTC (permalink / raw)
  To: Hua Ji; +Cc: Jamie Guinan, linuxppc-embedded


On Wed, 17 Jan 2001, Jamie Guinan wrote:
> You need to configure for "powerpc-linux", and build a glibc.
>
>   http://members.nbci.com/greyhams/linux/PowerPC-Embedded-HOWTO-5.html
>   http://members.home.net/mmporter/linux/cross/

And don't forget:

    http://www.borg.umn.edu/~grant/Linux/cross.html

Grant


> On Wed, 17 Jan 2001, Hua Ji wrote:
>
> > Hi, guys,
> >
> > Good morning!
> >
> > Help needed!
> >
> > I made a cross compiler on my solaris machine for powerpc-elf target.
> > Everything looks fine when I did the make.
> >
> > When I used my powerpc-elf-gcc to compile and link my helloworld.c, I got
> > some error described below. Basically,
> > my helloworld.c is:
> > --------
> > #include <stdio.h>
> > void main()
> > {
> > 	printf("Hello World!\n");
> > }
> > --------
> >
> > The command line used for compile and link is: powerpc-elf-gcc -v -o
> > helloworld helloworld.c
> >
> > The error is: Can't link printf codes from library!!
> >
> > ---------
> > GNU assembler version 2.9.1 (powerpc-elf), using BFD version 2.9.1
> >
> > /export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
> > collect2 -V -Qy -dn -Bstatic
> > -L/export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.
> > 2 -L/export/home4/hji/compilers/powerpc-elf-1-17/powerpc-elf/lib
> > /var/tmp/ccAEuQ8q.o
> > /export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
> > libgcc.a
> > /export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
> > libgcc.a
> > /export/home4/hji/compilers/powerpc-elf-1-17/powerpc-elf/bin/ld: warning:
> > cannot find entry symbol _start; defaulting to 01800074
> > /var/tmp/ccAEuQ8q.o: In function `ppctest':
> > /var/tmp/ccAEuQ8q.o(.text+0x20): undefined reference to `printf'
> > GNU ld version 2.9.1 (with BFD 2.9.1)
> >   Supported emulations:
> >    elf32ppc
> > --------------------
> >
> > Thanks, guys.
> >
> > Hua
> >
> >
> >
>
> --
> ================================================================
> Jamie Guinan                         Blue Button Solutions, Inc.
> guinan@bluebutton.com                  http://www.bluebutton.com
> ================================================================
>
>
>
>

--
 Grant Erickson                       University of Minnesota Alumni
  o mail:erick205@umn.edu                                 1996 BSEE
  o http://www.umn.edu/~erick205                          1998 MSEE


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

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

* Re: cross-compier with gcc
  2001-01-17 20:18   ` Grant Erickson
@ 2001-01-17 20:22     ` Jamie Guinan
  0 siblings, 0 replies; 4+ messages in thread
From: Jamie Guinan @ 2001-01-17 20:22 UTC (permalink / raw)
  To: Grant Erickson; +Cc: linuxppc-embedded


On Wed, 17 Jan 2001, Grant Erickson wrote:

> On Wed, 17 Jan 2001, Jamie Guinan wrote:
> > You need to configure for "powerpc-linux", and build a glibc.
> >
> >   http://members.nbci.com/greyhams/linux/PowerPC-Embedded-HOWTO-5.html
> >   http://members.home.net/mmporter/linux/cross/
>
> And don't forget:
>
>     http://www.borg.umn.edu/~grant/Linux/cross.html
>
> Grant

Doh! I just linked the first one on the page, sorry I left yours
out.  :)

-Jamie

--
================================================================
Jamie Guinan                         Blue Button Solutions, Inc.
guinan@bluebutton.com                  http://www.bluebutton.com
================================================================


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

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

end of thread, other threads:[~2001-01-17 20:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-17 19:06 cross-compier with gcc Hua Ji
2001-01-17 20:11 ` Jamie Guinan
2001-01-17 20:18   ` Grant Erickson
2001-01-17 20:22     ` Jamie Guinan

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).