+2011-03-28 Tristan Gingold <gingold@adacore.com>
+
+ PR ada/44431
+ * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replaces
+ ada/b_gnat1.c. Use ada output of gnatbind.
+ (ada/b_gnatb.adb): Ditto.
+ (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
+ (ada.mostlyclean, ada.stage1)
+ (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
+ (ada.stagefeedback): Adjust.
+
+ * gcc-interface/Makefile.in (b_gnatl.adb): Replaces b_gnatl.c
+ Use ada output of gnatbind.
+ (b_gnatm.adb): Ditto.
+ (b_gnatl.o, b_gnatm.o): New rules.
+
2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
# We just have to delete files specific to us.
ada.mostlyclean:
- -$(RM) ada/*$(objext) ada/*.ali ada/b_*.c
+ -$(RM) ada/*$(objext) ada/*.ali ada/b_gnat*.ads ada/b_gnat*.adb
-$(RM) ada/*$(coverageexts)
-$(RM) ada/sdefault.adb ada/stamp-sdefault ada/stamp-snames
-$(RMDIR) ada/tools
# The main makefile has already created stage?/ada
ada.stage1: stage1-start
- -$(MV) ada/*$(objext) ada/*.ali ada/b_*.c stage1/ada
+ -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage1/ada
-$(MV) ada/stamp-* stage1/ada
ada.stage2: stage2-start
- -$(MV) ada/*$(objext) ada/*.ali ada/b_*.c stage2/ada
+ -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage2/ada
-$(MV) ada/stamp-* stage2/ada
ada.stage3: stage3-start
- -$(MV) ada/*$(objext) ada/*.ali ada/b_*.c stage3/ada
+ -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage3/ada
-$(MV) ada/stamp-* stage3/ada
ada.stage4: stage4-start
- -$(MV) ada/*$(objext) ada/*.ali ada/b_*.c stage4/ada
+ -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stage4/ada
-$(MV) ada/stamp-* stage4/ada
ada.stageprofile: stageprofile-start
- -$(MV) ada/*$(objext) ada/*.ali ada/b_*.c stageprofile/ada
+ -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stageprofile/ada
-$(MV) ada/stamp-* stageprofile/ada
ada.stagefeedback: stagefeedback-start
- -$(MV) ada/*$(objext) ada/*.ali ada/b_*.c stagefeedback/ada
+ -$(MV) ada/*$(objext) ada/*.ali ada/b_gnat*.ad* stagefeedback/ada
-$(MV) ada/stamp-* stagefeedback/ada
lang_checks += check-gnat
# Note that dependencies on obstack.h are not written
# because that file is not part of GCC.
-# Dependencies on gvarargs.h are not written
-# because all that file does, when not compiling with GCC,
-# is include the system varargs.h.
# Ada language specific files.
-ada/b_gnat1.c : $(GNAT1_ADA_OBJS)
- $(GNATBIND) -C $(ADA_INCLUDES) -o ada/b_gnat1.c -n ada/gnat1drv.ali
-ada/b_gnat1.o : ada/b_gnat1.c
-
-ada/b_gnatb.c : $(GNATBIND_OBJS) ada/gnatbind.o ada/interfac.o
- $(GNATBIND) -C $(ADA_INCLUDES) -o ada/b_gnatb.c ada/gnatbind.ali
-ada/b_gnatb.o : ada/b_gnatb.c
+ada/b_gnat1.adb : $(GNAT1_ADA_OBJS)
+ # Old gnatbind do not allow a path for -o.
+ $(GNATBIND) $(ADA_INCLUDES) -o b_gnat1.adb -n ada/gnat1drv.ali
+ $(MV) b_gnat1.adb b_gnat1.ads ada/
+
+ada/b_gnat1.o : ada/b_gnat1.adb
+ # Do not use ADAFLAGS to get rid of -gnatg which generates a lot
+ # of style messages.
+ $(CC) -c $(CFLAGS) $(ADA_CFLAGS) -gnatp -gnatws $(ADA_INCLUDES) \
+ $< $(OUTPUT_OPTION)
+
+ada/b_gnatb.adb : $(GNATBIND_OBJS) ada/gnatbind.o ada/interfac.o
+ # Old gnatbind do not allow a path for -o.
+ $(GNATBIND) $(ADA_INCLUDES) -o b_gnatb.adb ada/gnatbind.ali
+ $(MV) b_gnatb.adb b_gnatb.ads ada/
+
+ada/b_gnatb.o : ada/b_gnatb.adb
+ $(CC) -c $(CFLAGS) $(ADA_CFLAGS) -gnatp -gnatws $(ADA_INCLUDES) \
+ $< $(OUTPUT_OPTION)
include $(srcdir)/ada/Make-generated.in
# because all that file does, when not compiling with GCC,
# is include the system varargs.h.
-b_gnatl.c : $(GNATLINK_OBJS)
- $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
-b_gnatl.o : b_gnatl.c
+b_gnatl.adb : $(GNATLINK_OBJS)
+ $(GNATBIND) $(ADA_INCLUDES) -o b_gnatl.adb gnatlink.ali
-b_gnatm.c : $(GNATMAKE_OBJS)
- $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
-b_gnatm.o : b_gnatm.c
+b_gnatl.o : b_gnatl.adb
+ $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \
+ $< $(OUTPUT_OPTION)
+
+b_gnatm.adb : $(GNATMAKE_OBJS)
+ $(GNATBIND) $(ADA_INCLUDES) -o b_gnatm.adb gnatmake.ali
+
+b_gnatm.o : b_gnatm.adb
+ $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \
+ $< $(OUTPUT_OPTION)
ADA_INCLUDE_DIR = $(libsubdir)/adainclude
ADA_RTL_OBJ_DIR = $(libsubdir)/adalib