https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64492
Bug ID: 64492
Summary: Disabling libada prevents building gnattools-cross
Product: gcc
Version: 4.9.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: simon at pushface dot org
Created attachment 34375
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34375&action=edit
Patch to add --enable-cross-gnattools
This is related to PR19959.
--disable-libada is necessary for targets (such as arm-eabi) where the RTS
isn’t distributed as part of GCC. Of course, you still need the cross gnattools
(such as arm-eabi-gnatls).
Unfortunately you can’t build the cross gnattools, because --disable-libada
adds gnattools to the list of unconfigured directories, which means that the
directory gcc/ada/tools is never created, let alone populated.
gcc/ada/gcc-interface/Makefile.in touches stamp-tools, but that’s all.
You can’t say "make -C gcc gnattools-cross", because that’s in gnattools/. You
can’t say “make -C gcc cross-gnattools”, because the gcc/ada/tools directory
doesn’t exist.
Why does gcc/ada/gcc-interface/Makefile.in touch ../stamp-tools?
Where does the target cross-gnattools come into the picture?
I attach a patch to the top-level configure.ac which adds a new switch
--enable-cross-gnattools.
If you configure with --disable-libada, gnattools is removed from the list of
configured directories unless
* you give --enable-cross-gnattools
* and you are building a cross compiler
* and the target vendor is “none” or “unknown”.
With this patch, the normal configure/make runs through and builds the cross
gnattools without further ado. Tested on 4.9.1, --target=arm-eabi. The patch
applies to the gcc-5-20141228 snapshot with a 17-line offset.