* GCC 4.4.1 linux to mingw32 cross compiler gnat
@ 2009-08-14 13:24 Pieter
2009-08-14 13:41 ` Lucretia9
0 siblings, 1 reply; 2+ messages in thread
From: Pieter @ 2009-08-14 13:24 UTC (permalink / raw)
Hello All,
I'm struggling in getting my GCC 4.4.1 x86_64-pc-linux-gnu to i686-pc-
mingw32 cross-compiler to work with Ada;
First, I successfully installed and bootstrapped binutils, mingw-
runtime and w32api and put those in my PATH
I've compiled pristine FSF gcc sources with --enable-threads --enable-
languages=c,c++,fortran,java,ada --enable-libada --enable-libgcj --
enable-libgomp --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu
--target=i686-pc-mingw32 --prefix=/usr/local/cross-tools/i686-pc-
mingw32
After installing, i tired test.adb:
with Ada.Text_IO;
use Ada.Text_IO;
Procedure test is
Begin
Put_Line("Hello world");
End test;
i686-pc-mingw32-gnatmake gives me:
i686-pc-mingw32-gcc -c test.adb
i686-pc-mingw32-gnatmake: "test.ali" incompatible ALI file, please
recompile
i686-pc-mingw32-gnatmake: "test.adb" compilation error
test.ali looks like this (first few lines)
V "GNAT Lib v4.4"
M P W=b
P SS
R
nnnnnnnnnnnnnnnnnnnnnnvnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
U test%b test.adb 00d000d0 NE OO SU IL
KM
W ada%s ada.ads ada.ali
W ada.text_io%s a-textio.adb a-textio.ali
D ada.ads 20070406091342 9c7dd3ea
D a-except.ads 20090409232307 b54b55de
For comparison, the contents of the installed text_io.ali in the i686-
pc-mingw32 dirs is
i
V "GNAT Lib v4.4"
A -gnatwa
A -O2
A -W
A -Wall
A -g
A -gnatp
A -gnatg
A -mtune=generic
P SS
R
nnnnnnnnnnnnnnnnnnnnnnvnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnvnnnnnnnnnnnnnnnnnn
U text_io%s text_io.ads 82bd3c91 NE OL
W ada%s ada.ads ada.ali
W ada.text_io%s a-textio.adb a-textio.ali
D ada.ads 20070406091342 9c7dd3ea
D a-except.ads 20090409232307 b54b55de
D a-finali.ads 20090409232307 9eaace
I'll admit that, foolishly, I have compiled this cross-gcc 4.4.1 using
native gcc 4.3.1 (not 4.4.1) while the official manual recommends
compiling native same version first.
Would that be the reason for this incompatbility ? (although from the
ali it looks like both have the 4.4 version so it doesn't look like a
wrongly-picked compiler to me)
I'm asking because I think I've read somewhere (possibly here) that
someone got this exact setup (gcc 4.4.1 targeting mingw32 to work for
ada)
Anyone tried this and has an idea?
Thanks,
Pieter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: GCC 4.4.1 linux to mingw32 cross compiler gnat
2009-08-14 13:24 GCC 4.4.1 linux to mingw32 cross compiler gnat Pieter
@ 2009-08-14 13:41 ` Lucretia9
0 siblings, 0 replies; 2+ messages in thread
From: Lucretia9 @ 2009-08-14 13:41 UTC (permalink / raw)
1) Make sure you're using the same version compiler as the one you're
trying to compile, e.g. Linux compiler needs to be of 4.4.x as well.
2) Compile binutils, then gcc --enable-languages=c,c++ first
3) Compile the runtime libs (win32api, etc)
4) Compile gcc --enable-languages=c,c++,ada,etc.
Luke.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-14 13:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-14 13:24 GCC 4.4.1 linux to mingw32 cross compiler gnat Pieter
2009-08-14 13:41 ` Lucretia9
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox