I had to solve one rts source issue though:
gcc/ada/system-linux-x86_64.ads and x86.ads do hardcode the number of
bits for a word (64 and 32 respectively), I changed them both to be
completely the same and use GNAT defined Standard'Word_Size attribute.
- Word_Size : constant := 64;
- Memory_Size : constant := 2 ** 64;
+ Word_Size : constant := Standard'Word_Size;
+ Memory_Size : constant := 2 ** Word_Size;
The same change will have to be done on other 32/64 bits Ada targets. I
don't know if this change has adverse effect on GNAT build in some
situations.
I think this is worthwhile on its own, before the build patch goes in.
The patch is not complete yet of course but I'd appreciate feedback on
wether or not I'm on the right track for 4.4 inclusion.
It looks good to me, though I'll defer to Arnaud and other adacore people.
One nit:
+GNATLIBMULTI := $(subst /,,$(MULTISUBDIR))
Please substitute / with _ instead, to avoid unlikely but possible clashes.
[EMAIL PROTECTED]:~/tmp$ gnatmake -f -g
-aO/home/guerby/build-mlib7/gcc/ada/rts32 -m32 p
I guess this fixing this requires duplicating in gnatmake and gnatbind
the logic in gcc.c that uses the info produced by genmultilib. Search
gcc.c for
multilib_raw
multilib_matches_raw
multilib_extra
multilib_exclusions_raw
multilib_options
set_multilib_dir
Maybe it makes sense to make a separate .c module for this, so that both
the driver and gnat{make,bind} can use it.
I'm not sure how much churn is there in gcc/ada/Makefile.in. If there
is little, it probably makes more sense to work on a branch. If there
is much, it probably makes more sense to commit the partially working
patch. Again, I'll defer to AdaCore people on this.
Paolo