public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Help needed
@ 2001-01-17 11:16 Hua Ji
  2001-01-18  3:11 ` Kai Ruottu
  2001-04-01  0:00 ` Hua Ji
  0 siblings, 2 replies; 14+ messages in thread
From: Hua Ji @ 2001-01-17 11:16 UTC (permalink / raw)
  To: 'crossgcc@sources.redhat.com'

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/



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Re: Help needed
  2001-01-17 11:16 Help needed Hua Ji
@ 2001-01-18  3:11 ` Kai Ruottu
  2001-04-01  0:00   ` Kai Ruottu
  2001-04-01  0:00 ` Hua Ji
  1 sibling, 1 reply; 14+ messages in thread
From: Kai Ruottu @ 2001-01-18  3:11 UTC (permalink / raw)
  To: Hua Ji; +Cc: 'crossgcc@sources.redhat.com'

Hua Ji wrote:
> 
> 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.
> 
> The command line used for compile and link is:
> powerpc-elf-gcc -v -o helloworld helloworld.c

 And your real target is what ?

 You must have some defined target for an executable, like an opsys (powerpc-linux),
a target board with a glue library, startup and linker script, or something else.

 The 'powerpc-elf' doesn't define any real target, just the ELF object format...

 Please open your fine GCC manual and read the following about the four supported
PowerPC 'target boards' in the Cygnus newlib :

-------------------------- clip -----------------------------
IBM RS/6000 and PowerPC Options

These -m options are defined for the IBM RS/6000 and PowerPC: 

<snip>

-msim
  On embedded PowerPC systems, assume that the startup module is called sim-crt0.o
  and that the standard C libraries are libsim.a and libc.a.  This is the default
  for powerpc-*-eabisim configurations.

-mmvme
  On embedded PowerPC systems, assume that the startup module is called crt0.o and
  the standard C libraries are libmvme.a and libc.a.

-mads
  On embedded PowerPC systems, assume that the startup module is called crt0.o and
  the standard C libraries are libads.a and libc.a.

-myellowknife
  On embedded PowerPC systems, assume that the startup module is called crt0.o and
  the standard C libraries are libyk.a and libc.a.
-------------------------- clip -----------------------------

 For 'Hello World' the '-msim' could be suitable. Then you can run the executable
with the 'powerpc-elf-run' stand-alone-simulator coming with GDB (the 'psim', made
by Andrew Cagney...), and get your "Hello World" visible...

 Neither does the PowerPC EABI have any defined "Embedded-ABI" with a known opsys-
like system call layer, it is only a modified ELF format...

Cheers, Kai



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Re: Help needed
  2001-01-18  3:11 ` Kai Ruottu
@ 2001-04-01  0:00   ` Kai Ruottu
  0 siblings, 0 replies; 14+ messages in thread
From: Kai Ruottu @ 2001-04-01  0:00 UTC (permalink / raw)
  To: Hua Ji; +Cc: 'crossgcc@sources.redhat.com'

Hua Ji wrote:
> 
> 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.
> 
> The command line used for compile and link is:
> powerpc-elf-gcc -v -o helloworld helloworld.c

 And your real target is what ?

 You must have some defined target for an executable, like an opsys (powerpc-linux),
a target board with a glue library, startup and linker script, or something else.

 The 'powerpc-elf' doesn't define any real target, just the ELF object format...

 Please open your fine GCC manual and read the following about the four supported
PowerPC 'target boards' in the Cygnus newlib :

-------------------------- clip -----------------------------
IBM RS/6000 and PowerPC Options

These -m options are defined for the IBM RS/6000 and PowerPC: 

<snip>

-msim
  On embedded PowerPC systems, assume that the startup module is called sim-crt0.o
  and that the standard C libraries are libsim.a and libc.a.  This is the default
  for powerpc-*-eabisim configurations.

-mmvme
  On embedded PowerPC systems, assume that the startup module is called crt0.o and
  the standard C libraries are libmvme.a and libc.a.

-mads
  On embedded PowerPC systems, assume that the startup module is called crt0.o and
  the standard C libraries are libads.a and libc.a.

-myellowknife
  On embedded PowerPC systems, assume that the startup module is called crt0.o and
  the standard C libraries are libyk.a and libc.a.
-------------------------- clip -----------------------------

 For 'Hello World' the '-msim' could be suitable. Then you can run the executable
with the 'powerpc-elf-run' stand-alone-simulator coming with GDB (the 'psim', made
by Andrew Cagney...), and get your "Hello World" visible...

 Neither does the PowerPC EABI have any defined "Embedded-ABI" with a known opsys-
like system call layer, it is only a modified ELF format...

Cheers, Kai



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Help needed
  2001-01-17 11:16 Help needed Hua Ji
  2001-01-18  3:11 ` Kai Ruottu
@ 2001-04-01  0:00 ` Hua Ji
  1 sibling, 0 replies; 14+ messages in thread
From: Hua Ji @ 2001-04-01  0:00 UTC (permalink / raw)
  To: 'crossgcc@sources.redhat.com'

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/



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Re: Help Needed.
  2002-06-14  5:43     ` Yves Rutschle
@ 2002-06-14  6:03       ` William A. Gatliff
  0 siblings, 0 replies; 14+ messages in thread
From: William A. Gatliff @ 2002-06-14  6:03 UTC (permalink / raw)
  To: Yves Rutschle; +Cc: crossgcc

Yves:

On Fri, Jun 14, 2002 at 01:39:13PM +0100, Yves Rutschle wrote:
> On Fri, Jun 14, 2002 at 07:35:25AM -0500, William A. Gatliff wrote:
> > > >                 I am trying to build gcc3.1 cross compiler for motorola
> > > > 68302 under LINUX(redhat 7.2).  I have built binutils-2.11 and
> > > > newlib-1.9.0 as follows.
> > > 
> > > I think you want to use glibc for Linux target.
> > 
> > Actually, no.  You do want the m68k-elf target, since the '302 won't
> > run Linux.
> 
> Ah. So I did parse the question the wrong way around. Then
> the original writer _really_ needs to make the compiler
> before newlib!

Indeed.

> > > You might know already about that, but there is a lot of
> > > introductory info at
> > > http://crossgcc.billgatliff.com/index.html.
> > 
> > There's also the crossgcc Wiki, at http://billgatliff.com, which is
> > like an interactive version of http://crossgcc.billgatliff.com.
> 
> Yes, it's actually referenced from the FAQ as well. Looks
> like the author of the FAQ is consistent in his directing
> people to the Wiki :-)

That's because the author is consistent in his inability to keep a
static document updated...  :^)


b.g.
-- 
Bill Gatliff
bgat@billgatliff.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Re: Help Needed.
  2002-06-14  5:35   ` William A. Gatliff
@ 2002-06-14  5:43     ` Yves Rutschle
  2002-06-14  6:03       ` William A. Gatliff
  0 siblings, 1 reply; 14+ messages in thread
From: Yves Rutschle @ 2002-06-14  5:43 UTC (permalink / raw)
  To: William A. Gatliff; +Cc: crossgcc

On Fri, Jun 14, 2002 at 07:35:25AM -0500, William A. Gatliff wrote:
> > >                 I am trying to build gcc3.1 cross compiler for motorola
> > > 68302 under LINUX(redhat 7.2).  I have built binutils-2.11 and
> > > newlib-1.9.0 as follows.
> > 
> > I think you want to use glibc for Linux target.
> 
> Actually, no.  You do want the m68k-elf target, since the '302 won't
> run Linux.

Ah. So I did parse the question the wrong way around. Then
the original writer _really_ needs to make the compiler
before newlib!
 
> > You might know already about that, but there is a lot of
> > introductory info at
> > http://crossgcc.billgatliff.com/index.html.
> 
> There's also the crossgcc Wiki, at http://billgatliff.com, which is
> like an interactive version of http://crossgcc.billgatliff.com.

Yes, it's actually referenced from the FAQ as well. Looks
like the author of the FAQ is consistent in his directing
people to the Wiki :-)

/Y


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Re: Help Needed.
  2002-06-14  2:35 ` Yves Rutschle
@ 2002-06-14  5:35   ` William A. Gatliff
  2002-06-14  5:43     ` Yves Rutschle
  0 siblings, 1 reply; 14+ messages in thread
From: William A. Gatliff @ 2002-06-14  5:35 UTC (permalink / raw)
  To: Yves Rutschle; +Cc: crossgcc

Guys:


On Fri, Jun 14, 2002 at 10:29:22AM +0100, Yves Rutschle wrote:
> On Thu, Jun 13, 2002 at 10:32:55PM -0500, rejip wrote:
> > Hi All,
> >                 I am trying to build gcc3.1 cross compiler for motorola
> > 68302 under LINUX(redhat 7.2).  I have built binutils-2.11 and
> > newlib-1.9.0 as follows.
> 
> I think you want to use glibc for Linux target.

Actually, no.  You do want the m68k-elf target, since the '302 won't
run Linux.

> You might know already about that, but there is a lot of
> introductory info at
> http://crossgcc.billgatliff.com/index.html.

There's also the crossgcc Wiki, at http://billgatliff.com, which is
like an interactive version of http://crossgcc.billgatliff.com.

HTH,


b.g.
-- 
Bill Gatliff
bgat@billgatliff.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Re: Help Needed.
  2002-06-13 10:02 Help Needed rejip
@ 2002-06-14  2:35 ` Yves Rutschle
  2002-06-14  5:35   ` William A. Gatliff
  0 siblings, 1 reply; 14+ messages in thread
From: Yves Rutschle @ 2002-06-14  2:35 UTC (permalink / raw)
  To: rejip; +Cc: gcc-mail

On Thu, Jun 13, 2002 at 10:32:55PM -0500, rejip wrote:
> Hi All,
>                 I am trying to build gcc3.1 cross compiler for motorola
> 68302 under LINUX(redhat 7.2).  I have built binutils-2.11 and
> newlib-1.9.0 as follows.

I think you want to use glibc for Linux target.

> bash$ tar xzf binutils-2.11.tar.gz
> bash$ cd build-binutils
> bash$ ../binutils-2.11/configure --prefix=/usr/local/m68k-elf
> --target=m68k-elf
> bash$ make
> bash$ make install

I think you want to use --target=m68k-linux. Unless you
meant "build a linux-hosted gcc cross compiler for
motorola", in which case ignore my former comment.

> bash$ cd ..
> bash$ tar xzf newlib-1.9.0.tar.gz
> bash$ cd build-newlib
> bash$ ../newlib-1.9.0/configure  --prefix=/usr/local/m68k-elf
> --target=m68k-elf
> bash$ make
> bash$ make install
> 
> 
> 
> bash$ cd ..
> bash$ tar xzf gcc-3.1.tar.gz
> bash$ cd build-gcc
> bash$ ../gcc-3.1/configure --prefix=/usr/local/m68k-elf
> --target=m68k-elf \
>             --with-gnu-as --with-gnu-as --with-gnu-ld
> --enable-languages=c

Hmmm, what compiler do you suppose is used to build newlib?
You compile your library _before_ building the compiler,
which does not quite sound sane to me :-)

You might know already about that, but there is a lot of
introductory info at
http://crossgcc.billgatliff.com/index.html.

Cheers,
/Y


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Help Needed.
@ 2002-06-13 10:02 rejip
  2002-06-14  2:35 ` Yves Rutschle
  0 siblings, 1 reply; 14+ messages in thread
From: rejip @ 2002-06-13 10:02 UTC (permalink / raw)
  To: gcc-mail, rejip

Hi All,
                I am trying to build gcc3.1 cross compiler for motorola
68302 under LINUX(redhat 7.2).  I have built binutils-2.11 and
newlib-1.9.0 as follows.

bash$ tar xzf binutils-2.11.tar.gz
bash$ cd build-binutils
bash$ ../binutils-2.11/configure --prefix=/usr/local/m68k-elf
--target=m68k-elf
bash$ make
bash$ make install


bash$ cd ..
bash$ tar xzf newlib-1.9.0.tar.gz
bash$ cd build-newlib
bash$ ../newlib-1.9.0/configure  --prefix=/usr/local/m68k-elf
--target=m68k-elf
bash$ make
bash$ make install



bash$ cd ..
bash$ tar xzf gcc-3.1.tar.gz
bash$ cd build-gcc
bash$ ../gcc-3.1/configure --prefix=/usr/local/m68k-elf
--target=m68k-elf \
            --with-gnu-as --with-gnu-as --with-gnu-ld
--enable-languages=c

But when trying to build gcc-3.1(as given above) then  I am getting the
following error.

xgcc: ../../../../gcc-3.1/libstdc++-v3/libsupc++/eh_alloc.cc: C++
compiler not installed on this system
make[2]: *** [eh_alloc.lo] Error 1
make[2]: Leaving directory `build-gcc/m68k-elf/libstdc++-v3/libsupc++'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `build-gcc/m68k-elf/libstdc++-v3'
make: *** [install-target-libstdc++-v3] Error 2

What could have been the possible problem. Any help will be highly
appreciated.

thanks in advance,

reji p rajesh
Research Engineer,
Centre for Development Of Telematics(C-DOT)
Bangalore, India


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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

* Help needed
@ 2001-05-10  2:50 Prasad RSV
  0 siblings, 0 replies; 14+ messages in thread
From: Prasad RSV @ 2001-05-10  2:50 UTC (permalink / raw)
  To: crossgcc

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

 
 

Hello,
 
  I am working with ARM assembly language under symbian 
6.0(crystal).  Please help me in the following case :
 
   I converted some of my C++ functions in my application into 
ARM assembly code using inline assembly for optimization purpose. I did this 
optimization under ARM Developer Suite 1.1. Now I tried to bulid the project for 
ARM target under symbian with " abld build armi urel" command. It is giving some 
compile time errors. As we know , internally it will use "gcc" compiler to 
compile our project files. I think some changes are needed to make it 
compile under "gcc" on symbian. All the errors I' m getting   are with 
inline ARM assembly code.Some of the errors are  with :
   1. accessing global and local variables
   2. accessing registers r12,r13 etc.
 
 Let me know what are the changes I need to incorporate in my code to 
make it compile under gcc.
Thanks in advance.,
 
regards,
rsv

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

* RE: Help needed
  2001-01-18  9:39 Hua Ji
  2001-01-19  3:13 ` Kai Ruottu
@ 2001-04-01  0:00 ` Hua Ji
  1 sibling, 0 replies; 14+ messages in thread
From: Hua Ji @ 2001-04-01  0:00 UTC (permalink / raw)
  To: 'karuottu@freenet.hut.fi', Hua Ji
  Cc: 'crossgcc@sources.redhat.com'

Thanks a lot. Please read in side.

>And your real target is what ?

Hua: I have no Operating System target. What I need to do is to write codes
for the raw ppc 405GP board from IBM.
 
-msim 
-mmvme
-mads
-myellowknife
For 'Hello World' the '-msim' could be suitable. Then you can run the
executable
with the 'powerpc-elf-run' stand-alone-simulator coming with GDB (the
'psim', made
by Andrew Cagney...), and get your "Hello World" visible...

Hua: Thanks a lot. I tried with -msim. All done perfectly, after libc.a and
__start symbol being linked from sim-crt0.o! This is exactly what I got
stuck yesterday--the linker can't go **automatically** link my libc.a and
__start codes. I guess the story behind my case is:
When I did the cross compiler, I didn't(or couldnot?) specify Operating
System target, but only specify a powerp elf target, so the gcc and the
corresponding linker(ld) can't know how to look for which libc and __start
symbols(or codes)? Am I right? Please continuly educate me. Thanks in
advance.

Hua

 

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Re: Help needed
  2001-01-19  3:13 ` Kai Ruottu
@ 2001-04-01  0:00   ` Kai Ruottu
  0 siblings, 0 replies; 14+ messages in thread
From: Kai Ruottu @ 2001-04-01  0:00 UTC (permalink / raw)
  To: Hua Ji; +Cc: 'crossgcc@sources.redhat.com'

Hua Ji wrote:
> 
> Hua: Thanks a lot. I tried with -msim. All done perfectly, after libc.a and
> __start symbol being linked from sim-crt0.o! This is exactly what I got
> stuck yesterday--the linker can't go **automatically** link my libc.a and
> __start codes. I guess the story behind my case is:
> When I did the cross compiler, I didn't(or couldnot?) specify Operating
> System target, but only specify a powerp elf target, so the gcc and the
> corresponding linker(ld) can't know how to look for which libc and __start
> symbols(or codes)? Am I right? Please continuly educate me. Thanks in
> advance.

 Yes, this is the case, the 'powerpc*-elf' and 'powerpc*-eabi' targets don't
have a default system for which to produce executables. So the '-m<board>'
must be used. This could be taken as a bug, adding the extra '-mads' or '-msim'
or something into the CFLAGS_FOR_TARGET for 'powerpc*-elf' and 'powerpc*-eabi'
targets during configure cannot be hard, just as there are those '-Os' additions
for some targets.

 One reason to the current situation could be that the user is tried to
educate with this way. But why the Motorola and MIPS chips are those lacking
the default while ARM, SH, H8/300, MN10200, MN10300, M32R etc. have a default
system I cannot explain... Perhaps they are thought to be more clever, while
the ARM, SH, etc. users must have everything working 'out of the box' ;-)

Cheers, Kai


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Re: Help needed
  2001-01-18  9:39 Hua Ji
@ 2001-01-19  3:13 ` Kai Ruottu
  2001-04-01  0:00   ` Kai Ruottu
  2001-04-01  0:00 ` Hua Ji
  1 sibling, 1 reply; 14+ messages in thread
From: Kai Ruottu @ 2001-01-19  3:13 UTC (permalink / raw)
  To: Hua Ji; +Cc: 'crossgcc@sources.redhat.com'

Hua Ji wrote:
> 
> Hua: Thanks a lot. I tried with -msim. All done perfectly, after libc.a and
> __start symbol being linked from sim-crt0.o! This is exactly what I got
> stuck yesterday--the linker can't go **automatically** link my libc.a and
> __start codes. I guess the story behind my case is:
> When I did the cross compiler, I didn't(or couldnot?) specify Operating
> System target, but only specify a powerp elf target, so the gcc and the
> corresponding linker(ld) can't know how to look for which libc and __start
> symbols(or codes)? Am I right? Please continuly educate me. Thanks in
> advance.

 Yes, this is the case, the 'powerpc*-elf' and 'powerpc*-eabi' targets don't
have a default system for which to produce executables. So the '-m<board>'
must be used. This could be taken as a bug, adding the extra '-mads' or '-msim'
or something into the CFLAGS_FOR_TARGET for 'powerpc*-elf' and 'powerpc*-eabi'
targets during configure cannot be hard, just as there are those '-Os' additions
for some targets.

 One reason to the current situation could be that the user is tried to
educate with this way. But why the Motorola and MIPS chips are those lacking
the default while ARM, SH, H8/300, MN10200, MN10300, M32R etc. have a default
system I cannot explain... Perhaps they are thought to be more clever, while
the ARM, SH, etc. users must have everything working 'out of the box' ;-)

Cheers, Kai


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* RE: Help needed
@ 2001-01-18  9:39 Hua Ji
  2001-01-19  3:13 ` Kai Ruottu
  2001-04-01  0:00 ` Hua Ji
  0 siblings, 2 replies; 14+ messages in thread
From: Hua Ji @ 2001-01-18  9:39 UTC (permalink / raw)
  To: 'karuottu@freenet.hut.fi', Hua Ji
  Cc: 'crossgcc@sources.redhat.com'

Thanks a lot. Please read in side.

>And your real target is what ?

Hua: I have no Operating System target. What I need to do is to write codes
for the raw ppc 405GP board from IBM.
 
-msim 
-mmvme
-mads
-myellowknife
For 'Hello World' the '-msim' could be suitable. Then you can run the
executable
with the 'powerpc-elf-run' stand-alone-simulator coming with GDB (the
'psim', made
by Andrew Cagney...), and get your "Hello World" visible...

Hua: Thanks a lot. I tried with -msim. All done perfectly, after libc.a and
__start symbol being linked from sim-crt0.o! This is exactly what I got
stuck yesterday--the linker can't go **automatically** link my libc.a and
__start codes. I guess the story behind my case is:
When I did the cross compiler, I didn't(or couldnot?) specify Operating
System target, but only specify a powerp elf target, so the gcc and the
corresponding linker(ld) can't know how to look for which libc and __start
symbols(or codes)? Am I right? Please continuly educate me. Thanks in
advance.

Hua

 

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~2002-06-14 13:03 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-17 11:16 Help needed Hua Ji
2001-01-18  3:11 ` Kai Ruottu
2001-04-01  0:00   ` Kai Ruottu
2001-04-01  0:00 ` Hua Ji
2001-01-18  9:39 Hua Ji
2001-01-19  3:13 ` Kai Ruottu
2001-04-01  0:00   ` Kai Ruottu
2001-04-01  0:00 ` Hua Ji
2001-05-10  2:50 Prasad RSV
2002-06-13 10:02 Help Needed rejip
2002-06-14  2:35 ` Yves Rutschle
2002-06-14  5:35   ` William A. Gatliff
2002-06-14  5:43     ` Yves Rutschle
2002-06-14  6:03       ` William A. Gatliff

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