This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Linking gnatmake
- From: Tom Hawkins <tomahawkins at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 3 May 2010 10:16:09 -0500
- Subject: Linking gnatmake
I am getting closer to having a bare metal PowerPC cross compiler. My
issue now is linking gnatmake. The linker throws a bunch of undefined
references from osint.adb (such as
__gnat_is_writable_file_attr). See log below. Most of these symbols
are defined in gcc/ada/adaint.c, but when I add adaint.o to the list
of files to link, even more undefined references arise.
Also, many of the challenges I've had to this point have been around
the use of <derint.h> and sockets, neither of which are needed on my
target platform. Is there any way to configure GNAT not to build all
this OS related stuff? Or would this break the cross compiler, as
some of it is written in Ada?
For reference, here's the script I'm working from:
http://tomahawkins.org/powerpc-eabi-install
Finally is this the best forum for these questions? Or is there a
GNAT specific forum I should be using?
Again, thanks for the help.
-Tom
gcc -c -I./ -I/usr/lib/gcc/i486-linux-gnu/4.4.3/adalib/../adainclude -
I/usr/lib/gcc/i486-linux-gnu/4.4.3/adalib/ -I. -I/home/e0082888/build-
powerpc-eabi/gcc-4.5.0/gcc/ada -g -O2 -W -Wall -Wwrite-strings -
Wstrict-prototypes -Wmissing-prototypes -gnatpg -gnata -I- /home/
e0082888/build-powerpc-eabi/gcc-4.5.0/gcc/ada/prj-strt.adb
gnatbind -I/usr/lib/gcc/i486-linux-gnu/4.4.3/adalib/../adainclude -I/
usr/lib/gcc/i486-linux-gnu/4.4.3/adalib/ -I. -I/home/e0082888/build-
powerpc-eabi/gcc-4.5.0/gcc/ada -static -x gnatmake
gnatlink -v gnatmake -o ../../gnatmake \
--GCC="gcc -static-libgcc -I/usr/lib/gcc/i486-linux-gnu/4.4.3/
adalib/../adainclude -I/usr/lib/gcc/i486-linux-gnu/4.4.3/adalib/ -I. -
I/home/e0082888/build-powerpc-eabi/gcc-4.5.0/gcc/ada" ../../
prefix.o ../../version.o targext.o link.o ../../../libiberty/
libiberty.a
GNATLINK 4.4.3
Copyright (C) 1995-2008, Free Software Foundation, Inc.
gcc -c -gnatA -gnatWb -gnatiw -static-libgcc -I/usr/lib/gcc/i486-linux-
gnu/4.4.3/adalib/../adainclude -I/usr/lib/gcc/i486-linux-gnu/4.4.3/
adalib/ -I. -I/home/e0082888/build-powerpc-eabi/gcc-4.5.0/gcc/ada -
gnatws /home/e0082888/build-powerpc-eabi/build-gcc/gcc/ada/tools/
b~gnatmake.adb
/usr/bin/gcc b~gnatmake.o ../../prefix.o ../../version.o targext.o
link.o ./alloc.o ./debug.o ./gnatvsn.o ./gnatmake.o ./rident.o ./
sfn_scan.o ./types.o ./hostparm.o ./krunch.o ./csets.o ./output.o ./
stylesw.o ./tree_io.o ./stand.o ./opt.o ./table.o ./stringt.o ./
binderr.o ./fname.o ./fname-sf.o ./fmap.o ./ali.o ./switch.o ./
sdefault.o ./sinput-c.o ./snames.o ./targparm.o ./osint.o ./butil.o ./
tempdir.o ./uintp.o ./err_vars.o ./erroutc.o ./urealp.o ./scans.o ./
mlib-utl.o ./mlib-fil.o ./mlib-tgt-specific.o ./prj-attr-pm.o ./prj-
com.o ./prj-attr.o ./mlib-tgt.o ./mlib.o ./prj-env.o ./prj-ext.o ./prj-
pp.o ./prj-util.o ./makeutl.o ./atree.o ./sinfo.o ./einfo.o ./
uname.o ./lib.o ./styleg.o ./nlists.o ./mlib-prj.o ./switch-m.o ./
usage.o ./makeusg.o ./widechar.o ./sinput.o ./fname-uf.o ./namet.o ./
osint-m.o ./scng.o ./casing.o ./ali-util.o ./errutil.o ./make.o ./prj-
err.o ./sinput-p.o ./prj-strt.o ./prj-proc.o ./prj-part.o ./prj-
pars.o ./prj-dect.o ./prj-conf.o ./prj-tree.o ./prj-nmsc.o ./prj.o -
o ../../gnatmake ../../../libiberty/libiberty.a -L./ -L/usr/lib/gcc/
i486-linux-gnu/4.4.3/adalib/../adainclude/ -L/usr/lib/gcc/i486-linux-
gnu/4.4.3/adalib/ -L./ -L/home/e0082888/build-powerpc-eabi/gcc-4.5.0/
gcc/ada/ -L/usr/lib/gcc/i486-linux-gnu/4.4.3/adalib/ /usr/lib/gcc/i486-
linux-gnu/4.4.3/adalib/libgnat.a -static-libgcc -static-libgcc -I/usr/
lib/gcc/i486-linux-gnu/4.4.3/adalib/../adainclude -I/usr/lib/gcc/i486-
linux-gnu/4.4.3/adalib/ -I. -I/home/e0082888/build-powerpc-eabi/
gcc-4.5.0/gcc/ada
./osint.o: In function `osint__is_writable_file':
/home/e0082888/build-powerpc-eabi/gcc-4.5.0/gcc/ada/osint.adb:1767:
undefined reference to `__gnat_is_writable_file_attr'
./osint.o: In function `osint__is_symbolic_link':
/home/e0082888/build-powerpc-eabi/gcc-4.5.0/gcc/ada/osint.adb:1754:
undefined reference to `__gnat_is_symbolic_link_attr'
./osint.o: In function `osint__is_regular_file':
/home/e0082888/build-powerpc-eabi/gcc-4.5.0/gcc/ada/osint.adb:1741:
undefined reference to `__gnat_is_regular_file_attr'
/home/e0082888/build-powerpc-eabi/gcc-4.5.0/gcc/ada/osint.adb:1741:
undefined reference to `__gnat_is_regular_file_attr'