This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Compiling Ada - confused about nmake.{adb,ads}
- To: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Subject: Compiling Ada - confused about nmake.{adb,ads}
- From: "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>
- Date: Wed, 10 Oct 2001 13:38:46 -0000
Partial success compiling Ada on a i686-pc-linux-gnu host (Red Hat 7.1),
bootstrapping with gnat-3.13p-7 rpm from www.gnuada.org.
The build fails with
mkdir -p bldtools
cp -p /home/billingd/src/gcc/gcc/ada/sinfo.ads
/home/billingd/src/gcc/gcc/ada/nmake.adt
/home/billingd/src/gcc/gcc/ada/xnmake.adb bldtools
(cd bldtools; gnatmake -q xnmake ; ./xnmake -s ../nmake.ads )
mkdir -p bldtools
cp -p /home/billingd/src/gcc/gcc/ada/sinfo.ads
/home/billingd/src/gcc/gcc/ada/nmake.adt
/home/billingd/src/gcc/gcc/ada/xnmake.adb bldtools
(cd bldtools; gnatmake -q xnmake ; ./xnmake -b ../nmake.adb )
gnatgcc -c -g -W -Wall -gnatpg -gnata -I- -I.
-I/home/billingd/src/gcc/gcc/ada /home/billingd/src/gcc/gcc/ada/checks.adb
checks.adb:38:06: file "nmake.ads" does not contain expected unit
checks.adb:38:06: expected unit "Nmake (spec)"
checks.adb:38:06: found unit "Nmake (body)"
compilation abandoned
Sure enough, in directory $(objdir)/gcc/ada the file nmake.adb contains the
specification while nmake.ads contains the body. Swapping these two files
allows the bootstrap to continue.
The makefile rules are:
nmake.adb : sinfo.ads nmake.adt xnmake.adb
-$(MKDIR) bldtools
$(CP) $^ bldtools
(cd bldtools; gnatmake -q xnmake ; ./xnmake -b ../nmake.adb )
nmake.ads : sinfo.ads nmake.adt xnmake.adb
-$(MKDIR) bldtools
$(CP) $^ bldtools
(cd bldtools; gnatmake -q xnmake ; ./xnmake -s ../nmake.ads )
Somewhat counter-intuitively, on my system
"xnmake -s filename" generates the body
"xnmake -b filename" generates the specification
In addition, I now have three copies of these files, in:
- $(srcdir)/gcc/ada
- $(objdir)/gcc/ada
- $(objdir)/gcc/ada/bldtools