This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problems in the libs for powerpc-eabi


Joćo Cadamuro Junior wrote:
> 
> Hi cross-gcc,
> 
> I saw this problem reported earlier in the list by other people, but I
> cannot found a solution for it... Maybe someone knows what's wrong...
> 
> I have built my tools with target=powerpc-eabi and host cygwin 1.1.2 .
> The tools were built without problems.
> 
> I have started my work using a Motorola's ADS board and the SDS monitor.
> I think this board is supported in the basic aspects by newlib 1.8.2 .
> But compiling the simple program:
> 
> int vector[100];
> int main (void)
> {
>     int i;
>     for ( i = 0; i < 100; i++ ) {
>         vector[i]=i;
>     }
>     return 0;
> }
> 
> I found only problems...
> 
> Using the starup file crt0.o, library files libg.a and libads.a and the
> linker script ads.ld supplied with newlib 1.8.2, I receive the following
> result:
> 
> powerpc-eabi-gcc -c -g -mcpu=860 -o teste.o teste.cpp
> powerpc-eabi-ld -o teste.abs teste.o
> /ppctools/powerpc-eabi/lib/nof/crt0.o \
> -L/ppctools/powerpc-eabi/lib/nof -lg -lads -T ads.ld
> teste.o: In function `main':
> /cygdrive/d/cadamuro/teste/teste.cpp:5: undefined reference to `__eabi'
> make: *** [teste.abs] Error 1
> 

Try this for C++:  
      powerpc-eabi-g++ -g -mads -mcpu=860 -o teste.abs teste.cpp

or this for C:
      powerpc-eabi-gcc -g -mads -mcpu=860 -o teste.abs teste.c

> For me this was a good, unless the fact that '__eabi' is not defined in
> the newlib libs (what's is realy true). '__eabi' is in the libgcc.a .
> But, when I tried to include libgcc.a, I had much more problems...
> 
> powerpc-eabi-ld -o teste.abs teste.o
> /ppctools/powerpc-eabi/lib/nof/crt0.o \
> -L/ppctools/powerpc-eabi/lib/nof -lg -lads \
> -L/ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof -lgcc -T ads.ld
> /ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a(eabi.o)(.got2+0x8):
> undefined reference to `__SDATA_START__'
> /ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a(eabi.o)(.got2+0xc):
> undefined reference to `__SBSS_END__'
> /ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a(eabi.o)(.got2+0x14):
> undefined reference to `__SDATA2_START__'
> /ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a(eabi.o)(.got2+0x18):
> undefined reference to `__SBSS2_END__'
> /ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a(eabi-ctors.o): In
> function `__do_global_ctors':
> /tmp/build/gcc/gcc/eabi-ctors.c(.sdata+0x0): undefined reference to
> `__init'
> /tmp/build/gcc/gcc/eabi-ctors.c(.sdata+0x4): undefined reference to
> `__fini'
> make: *** [teste.abs] Error 1
> 
> Someone has an idea about how to solve the problem???
> 
> Thanks in advance,
> 
> Cadamuro
> 
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]