Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > GCC 4.4.1 linux to mingw32 cross compiler gnat
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 19th November 18:03
pieter
External User
 
Posts: 1
Default GCC 4.4.1 linux to mingw32 cross compiler gnat



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
nnnnnnnnnnnnnnnnnnnnnnvnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnn

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
nnnnnnnnnnnnnnnnnnnnnnvnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnvnnnnnnnnnnnnnnnnnn

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
  Reply With Quote


 


2 19th November 18:03
lucretia9
External User
 
Posts: 1
Default GCC 4.4.1 linux to mingw32 cross compiler gnat



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.
  Reply With Quote
Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Development, Ada, Apple script, Assembler, Awk, Beos, Basic, C, C++, C#, C# .net, .net, .net frameworks, Asp .net, Clarion, Clipper, Clos, Clu, Cobol, Coldfusion, Delphi, Dylan, Eiffel, Forth, Fortran, Haskell, Hermes, Icon, Idl, Java, Java script, Jscript .net, Jcl, Linoleum, Lisp, Lotus, Limbo, Logo, Ml, Mumps, Oberon, Postscript, Pop, Pl1, Prolog, Python, Ruby, Pascal, Perl, Php, Rebol, Rexx, Sed, Sather, Scheme, Smalltalk, Tcl, Vhdl, Vrml, Visual basic, Visual basic .net, Yorick, Mysql, Omnis, Postgresql, Xbase, Access, Oracle, Adabas, Berkeley, Btrieve, Filemaker, Gupta, Db2, Informix, Ingres, Mssql server, Object, Olap, Paradox, Rdb, Revelation, Sybase, Theory, Dbase, Html, Java script, Css, Flash, Photoshop, Corel script, Xml, Tech, Beos, Gem, Hp48, Hpux, Linux, Mac, Ms-dos, Os2, Palm, Solaris, Ti99, Windows, Xenix, Aos, Chorus, Geos, Inferno, Lantastic, Lynx, Mach, Minix, Netware, Os9, Parix, Plan9, Psos, Qnx, Xinu, Sco, Unix, Aix, Aux, 386bsd, Bsdi, Freebsd, Netbsd, Openbsd, Ultrix, Amd, Intel, Aptiva, Buz, Deals, Homebuilt, Overclocking, Programming, Extra forums


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666