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

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linker broken in GCC


At 04:54 PM 12/19/2003, Pee Seeumpornroj wrote:
Dear all,

I'm trying to build a GCC/GNAT cross compiler from host=i686-linux-pc to target=powerpc-unknown-elf. I have managed to build the cross compiler with gcc-3.4 (head version), binutils, and newlibs (also the development version from CVS tree). However, I run into problems linking an Ada file to create an executable. It looks like the linker (gnatlink) doesn't know what target it should link to (for embedded application). Bill Gatliff mentioned that -myellowknife can be given to gcc as its target. However, I tried that and it still doesn't work. Here is what I did:

. . . many undefined references


b~hello_world.o(.text+0x218): In function `main':
: undefined reference to `__gnat_finalize'
./hello_world.o(.text+0x28): In function `_ada_hello_world':
: undefined reference to `ada__text_io__put__4'
GNU ld version 2.14.90 20031129
Supported emulations:
elf32ppc
elf32ppclinux
elf32ppcsim
collect2: ld returned 1 exit status
powerpc-elf-gnatlink: cannot call /home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/bin/powerpc-elf-gcc

Did you compile the GNAT runtime library? Those undefined references all looked like they were runtime library routines. The GNAT source should include the runtime source. I am also not sure that would solve your problem completely, since the runtime source depends on operating system calls that might not exist on your target (which looks like it does not have an operating system).



Roger Racine Draper Laboratory, MS 31 555 Technology Sq. Cambridge, MA 02139, USA 617-258-2489 617-258-3939 Fax


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


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