Hello!

I'm trying to get a native Ada compiler working on ARM, but have ran
into a few (primarily Makefile) problems.  

Before the problem, a little background: I successfully built a cross
compiler to build Ada programs from my laptop (x86_64) to the target
system (Debian ARMEL).  My process was pretty hackish involving a
minimal install of Debian to a SD card that my embedded system
(BeagleBoard) can boot from.  I then copied the entire filesystem to a
local directory on my laptop.  Building the cross compiler became
trivial when using --with-sysroot and --with-build-sysroot pointing to
the copied filesystem.

Now the problem: When attempting to build the native toolchain the
Makefiles continually refer to my local toolchain instead of the cross
compiler.  Clearly, this fails to build the system and frequently it
errors out with problems such as alignment warnings and invalid object
format.

To resolve some of the issue I modified "gcc/ada/Make-lang.in" by
changing all instances of "$(GNATMAKE) -q x*" to "gnatmake -q x*" to
properly build the bootstrapping toolchain.  It seems that at this time
in the Makefile GNATMAKE and the rest of the chain are the cross
compiler, when they need to be the local toolchain.  Later, and yet
unresolved, the native ARM toolchain built with the Makefile under
"gnattools/" attempts to use my local toolchain's include and libraries
to construct it.

This seems to be a problem that should be resolvable by getting the
variables straightened out.  Unfortunately, I don't know which variables
are wrong and what they are set to.  Grep isn't really helping me
either.

-Jake

An example of the problem.  Shortly thereafter it fails with one of the
alignment warnings.

Local toolchain: /home/jso/x86_64
Cross toolchain: /home/jso/arm

gnatmake -c
-I/home/jso/x86_64/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/adalib/../adainclude \
-I/home/jso/x86_64/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/adalib/ \
-I. -I/home/jso/dl/gcc-4.3.2/gcc/ada gnatmake 
--GCC="arm-unknown-linux-gnueabi-gcc-g \
-O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes       
-gnatpg -gnata"

arm-unknown-linux-gnueabi-gcc -c -I./
-I/home/jso/x86_64/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/adalib/../adainclude \
-I/home/jso/x86_64/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/adalib/ \
-I. -I/home/jso/dl/gcc-4.3.2/gcc/ada -g -O2 -W -Wall -Wwrite-strings \
-Wstrict-prototypes -Wmissing-prototypes -gnatpg -gnata -I- \
/home/jso/dl/gcc-4.3.2/gcc/ada/ali.adb




Reply via email to