[Ada] multilib patch take three
Laurent GUERBY
laurent@guerby.net
Fri Jul 25 07:09:00 GMT 2008
The attached patch implements Arnaud suggestion of changing the arch
to select the appropriate source (done and tested for x86_64-linux only
for now) and doesn't touch anymore system-*.ads.
This patch also doesn't touch gcc and gnattools so you have to use
as Arnaud suggested the already existing --RTS gnatmake flag
as follows if you want to use a multilib, ie:
export FLAGS="-m32 -g"
export ADAFLAGS="$FLAGS --RTS=$(gcc $FLAGS -print-multi-directory)"
gnatmake $ADAFLAGS main.adb
The above is not needed if you use the native lib: things
continue to work as usual in this case.
Paolo also found out why libada/Makefile.in FLAGS_TO_PASS mechanism did
not work: it was a name conflict with a variable of the same name
elsewhere in the build machinery, changing it to LIBADA_FLAGS_TO_PASS
was enough to make it work and in the process simplify a few targets.
Joel did test (a previous iteration of) this patch on many RTEMS
multilibed targets and it worked (RTEMS system.ads already use Standard
attributes to be portable so no issue there).
All in all with this patch:
1/ Ada multilib build is enabled unless --disable-multilib is used in
configure: this means that the Ada build has more opportunity to fail
because of code generation bugs or libada source selection issue, but in
this later case it will be a only few lines in gcc/ada/Makefile.in to
fix it once reported.
2/ once built is installed no visible change for users, to use
multilib you have to follow directions above.
The patch is missing some cleanup, comments, doc update and ChangeLog.
With those added and after the big tuple and gcc-interface changes are
in is this ok to resubmit and commit? If not what are the blocking
issues?
Thanks in advance,
Laurent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ada-multilib-patch-v8
Type: text/x-patch
Size: 64518 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20080725/3ba3dd67/attachment.bin>
More information about the Gcc
mailing list