(GNAT)Linker broken in GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear GCC,

   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:

$powerpc-elf-gcc -c hello_world.adb
$powerpc-elf-gnatbind hello_world.ali
$powerpc-elf-gnatlink
--GCC="/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/bin/powerpc-elf-gcc
-myellowknife" -v -v hello_world.ali

Here is the error I got:

GNATLINK 3.4 20031202 (experimental) Copyright 1995-2003 Free Software Foundation,
Inc
powerpc-elf-gcc -c -gnatA -gnatWb -gnatiw -myellowknife -v -gnatws b~hello_world.adb
Reading specs from
/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4/specs
Configured with: ../gcc-3.4/configure --target=powerpc-elf
--prefix=/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler
--enable-languages=c,ada
--with-local-prefix=/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/powerpc-elf
--with-gnu-as --with-gnu-ld --nfp
Thread model: single
gcc version 3.4 20031202 (experimental)
 /home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/libexec/gcc/powerpc-elf/3.4/gnat1 -quiet -dumpbase b~hello_world.adb -gnatA -gnatWb -gnatiw -gnatws -myellowknife b~hello_world.adb -o /tmp/ccvfAtYg.s
 /home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4/../../../../powerpc-elf/bin/as -mppc -V -Qy -o b~hello_world.o /tmp/ccvfAtYg.s
GNU assembler version 2.14.90 (powerpc-elf) using BFD version 2.14.90 20031129
/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/bin/powerpc-elf-gcc
b~hello_world.o ./hello_world.o -v -o hello_world -myellowknife
Reading specs from
/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4/specs
Configured with: ../gcc-3.4/configure --target=powerpc-elf
--prefix=/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler
--enable-languages=c,ada
--with-local-prefix=/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/powerpc-elf
--with-gnu-as --with-gnu-ld --nfp
Thread model: single
gcc version 3.4 20031202 (experimental)
 /home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/libexec/gcc/powerpc-elf/3.4/collect2 --eh-frame-hdr -V -Qy -dn -Bstatic -T /home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4/../../../../powerpc-elf/lib/yellowknife.ld -o hello_world /home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4/ecrti.o /home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4/../../../../powerpc-elf/lib/crt0.o /home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4/crtbegin.o -L/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4 -L/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4/../../../../powerpc-elf/lib b~hello_world.o ./hello_world.o -lgcc --start-group -lyk -lc --end-group -lgcc /home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4/crtsavres.o /home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gc!
 c/powerpc-elf/3.4/crtend.o
/home/pee/XComp_source/CrossGNAT/script_3.4_3/XCompiler/lib/gcc/powerpc-elf/3.4/ecrtn.o
b~hello_world.o(.text+0x18): In function `adainit':
: undefined reference to `system__standard_library___elabs'
b~hello_world.o(.text+0x20): In function `adainit':
: undefined reference to `ada__exceptions___elabs'
b~hello_world.o(.text+0x28): In function `adainit':
: undefined reference to `system__exceptions___elabs'
b~hello_world.o(.text+0x2e): In function `adainit':
: undefined reference to `system__exceptions_E'
b~hello_world.o(.text+0x36): In function `adainit':
: undefined reference to `system__exceptions_E'
b~hello_world.o(.text+0x3c): In function `adainit':
: undefined reference to `system__soft_links___elabb'
b~hello_world.o(.text+0x42): In function `adainit':
: undefined reference to `system__soft_links_E'
b~hello_world.o(.text+0x4a): In function `adainit':
: undefined reference to `system__soft_links_E'
b~hello_world.o(.text+0x50): In function `adainit':
: undefined reference to `system__secondary_stack___elabb'
b~hello_world.o(.text+0x56): In function `adainit':
: undefined reference to `system__secondary_stack_E'
b~hello_world.o(.text+0x5e): In function `adainit':
: undefined reference to `system__secondary_stack_E'
b~hello_world.o(.text+0x64): In function `adainit':
: undefined reference to `system__exception_table___elabb'
b~hello_world.o(.text+0x6a): In function `adainit':
: undefined reference to `system__exception_table_E'
b~hello_world.o(.text+0x72): In function `adainit':
: undefined reference to `system__exception_table_E'
b~hello_world.o(.text+0x78): In function `adainit':
: undefined reference to `ada__io_exceptions___elabs'
b~hello_world.o(.text+0x7e): In function `adainit':
: undefined reference to `ada__io_exceptions_E'
b~hello_world.o(.text+0x86): In function `adainit':
: undefined reference to `ada__io_exceptions_E'
b~hello_world.o(.text+0x8c): In function `adainit':
: undefined reference to `ada__tags___elabs'
b~hello_world.o(.text+0x94): In function `adainit':
: undefined reference to `ada__tags___elabb'
b~hello_world.o(.text+0x9a): In function `adainit':
: undefined reference to `ada__tags_E'
b~hello_world.o(.text+0xa2): In function `adainit':
: undefined reference to `ada__tags_E'
b~hello_world.o(.text+0xa8): In function `adainit':
: undefined reference to `ada__streams___elabs'
b~hello_world.o(.text+0xae): In function `adainit':
: undefined reference to `ada__streams_E'
b~hello_world.o(.text+0xb6): In function `adainit':
: undefined reference to `ada__streams_E'
b~hello_world.o(.text+0xbc): In function `adainit':
: undefined reference to `system__finalization_root___elabs'
b~hello_world.o(.text+0xc2): In function `adainit':
: undefined reference to `system__finalization_root_E'
b~hello_world.o(.text+0xca): In function `adainit':
: undefined reference to `system__finalization_root_E'
b~hello_world.o(.text+0xce): In function `adainit':
: undefined reference to `system__standard_library_E'
b~hello_world.o(.text+0xd6): In function `adainit':
: undefined reference to `system__standard_library_E'
b~hello_world.o(.text+0xdc): In function `adainit':
: undefined reference to `ada__exceptions___elabb'
b~hello_world.o(.text+0xe2): In function `adainit':
: undefined reference to `ada__exceptions_E'
b~hello_world.o(.text+0xea): In function `adainit':
: undefined reference to `ada__exceptions_E'
b~hello_world.o(.text+0xf0): In function `adainit':
: undefined reference to `system__finalization_implementation___elabs'
b~hello_world.o(.text+0xf8): In function `adainit':
: undefined reference to `system__finalization_implementation___elabb'
b~hello_world.o(.text+0xfe): In function `adainit':
: undefined reference to `system__finalization_implementation_E'
b~hello_world.o(.text+0x106): In function `adainit':
: undefined reference to `system__finalization_implementation_E'
b~hello_world.o(.text+0x10c): In function `adainit':
: undefined reference to `ada__finalization___elabs'
b~hello_world.o(.text+0x112): In function `adainit':
: undefined reference to `ada__finalization_E'
b~hello_world.o(.text+0x11a): In function `adainit':
: undefined reference to `ada__finalization_E'
b~hello_world.o(.text+0x120): In function `adainit':
: undefined reference to `ada__finalization__list_controller___elabs'
b~hello_world.o(.text+0x126): In function `adainit':
: undefined reference to `ada__finalization__list_controller_E'
b~hello_world.o(.text+0x12e): In function `adainit':
: undefined reference to `ada__finalization__list_controller_E'
b~hello_world.o(.text+0x134): In function `adainit':
: undefined reference to `system__file_control_block___elabs'
b~hello_world.o(.text+0x13a): In function `adainit':
: undefined reference to `system__file_control_block_E'
b~hello_world.o(.text+0x142): In function `adainit':
: undefined reference to `system__file_control_block_E'
b~hello_world.o(.text+0x148): In function `adainit':
: undefined reference to `system__file_io___elabb'
b~hello_world.o(.text+0x14e): In function `adainit':
: undefined reference to `system__file_io_E'
b~hello_world.o(.text+0x156): In function `adainit':
: undefined reference to `system__file_io_E'
b~hello_world.o(.text+0x15c): In function `adainit':
: undefined reference to `ada__text_io___elabs'
b~hello_world.o(.text+0x164): In function `adainit':
: undefined reference to `ada__text_io___elabb'
b~hello_world.o(.text+0x16a): In function `adainit':
: undefined reference to `ada__text_io_E'
b~hello_world.o(.text+0x172): In function `adainit':
: undefined reference to `ada__text_io_E'
b~hello_world.o(.text+0x1a0): In function `adafinal':
: undefined reference to `system__standard_library__adafinal'
b~hello_world.o(.text+0x1fc): In function `main':
: undefined reference to `__gnat_initialize'
b~hello_world.o(.text+0x210): In function `main':
: undefined reference to `system__standard_library__adafinal'
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


   Please let me know if you know a solution to this problem.  Thank you very much.

Pee




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux