This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] fix build and -margs for gnatmake
- From: Laurent Guerby <guerby at acm dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 04 Apr 2002 22:22:50 +0200
- Subject: [Ada] fix build and -margs for gnatmake
Privately approved by Geert Bosch. I'll commit the make.adb/makeusg.adb
part to 3.1 shortly.
--
Laurent Guerby <guerby@acm.org>
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/ChangeLog,v
retrieving revision 1.224
diff -c -3 -p -r1.224 ChangeLog
*** ChangeLog 2002/04/04 07:48:44 1.224
--- ChangeLog 2002/04/04 19:58:03
***************
*** 1,3 ****
--- 1,10 ----
+ 2002-04-04 Laurent Guerby <guerby@acm.org>
+
+ * make.adb: Implement -margs, remove restriction about file name placement.
+ * makeusg.adb: Documentation update.
+ * Makefile.in (TOOLS_FLAGS_TO_PASS): Add VPATH=$(fsrcdir).
+ * Makefile.in (gnattools3): Comment out, gnatmem does not build without
libaddr2line.
+
2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
* utils.c (create_subprog_decl): Use SET_DECL_ASSEMBLER_NAME.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Makefile.in,v
retrieving revision 1.26
diff -c -3 -p -r1.26 Makefile.in
*** Makefile.in 2002/03/29 16:10:04 1.26
--- Makefile.in 2002/04/04 19:58:05
*************** TOOLS_FLAGS_TO_PASS= \
*** 1593,1598 ****
--- 1593,1599 ----
"libsubdir=$(libsubdir)" \
"exeext=$(exeext)" \
"srcdir=$(fsrcdir)" \
+ "VPATH=$(fsrcdir)" \
"TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)" \
"GNATMAKE=$(GNATMAKE)" \
"GNATLINK=$(GNATLINK)" \
*************** gnattools2: ../stamp-tools
*** 1660,1668 ****
# These tools are only built for the native version.
gnattools3: ../stamp-tools
! $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
! TOOLSCASE=native \
! top_builddir=../.. ../../gnatmem$(exeext) $(EXTRA_GNATTOOLS)
../../gnatchop$(exeext):
$(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
--- 1661,1669 ----
# These tools are only built for the native version.
gnattools3: ../stamp-tools
! # $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
! # TOOLSCASE=native \
! # top_builddir=../.. ../../gnatmem$(exeext) $(EXTRA_GNATTOOLS)
../../gnatchop$(exeext):
$(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
Index: make.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/make.adb,v
retrieving revision 1.12
diff -c -3 -p -r1.12 make.adb
*** make.adb 2002/03/14 10:59:30 1.12
--- make.adb 2002/04/04 19:58:07
*************** package body Make is
*** 447,460 ****
-- Set to True after having scanned the file_name for
-- switch "-o file_name"
- File_Name_Seen : Boolean := False;
- -- Set to true after having seen at least one file name.
- -- Used in Scan_Make_Arg only, but must be a global variable.
-
type Make_Program_Type is (None, Compiler, Binder, Linker);
Program_Args : Make_Program_Type := None;
! -- Used to indicate if we are scanning gcc, gnatbind, or gnatbl
-- options within the gnatmake command line.
-- Used in Scan_Make_Arg only, but must be a global variable.
--- 447,456 ----
-- Set to True after having scanned the file_name for
-- switch "-o file_name"
type Make_Program_Type is (None, Compiler, Binder, Linker);
Program_Args : Make_Program_Type := None;
! -- Used to indicate if we are scanning gnatmake, gcc, gnatbind, or
gnatbind
-- options within the gnatmake command line.
-- Used in Scan_Make_Arg only, but must be a global variable.
*************** package body Make is
*** 4260,4275 ****
Argv = "-cargs"
or else
Argv = "-largs"
then
- if not File_Name_Seen then
- Fail ("-cargs, -bargs, -largs ",
- "must appear after unit or file name");
- end if;
-
case Argv (2) is
when 'c' => Program_Args := Compiler;
when 'b' => Program_Args := Binder;
when 'l' => Program_Args := Linker;
when others =>
raise Program_Error;
--- 4256,4269 ----
Argv = "-cargs"
or else
Argv = "-largs"
+ or else
+ Argv = "-margs"
then
case Argv (2) is
when 'c' => Program_Args := Compiler;
when 'b' => Program_Args := Binder;
when 'l' => Program_Args := Linker;
+ when 'm' => Program_Args := None;
when others =>
raise Program_Error;
*************** package body Make is
*** 4674,4680 ****
-- If not a switch it must be a file name
else
- File_Name_Seen := True;
Add_File (Argv);
end if;
end Scan_Make_Arg;
--- 4668,4673 ----
Index: makeusg.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/makeusg.adb,v
retrieving revision 1.4
diff -c -3 -p -r1.4 makeusg.adb
*** makeusg.adb 2002/03/14 10:59:30 1.4
--- makeusg.adb 2002/04/04 19:58:07
*************** begin
*** 39,49 ****
Write_Str ("Usage: ");
Osint.Write_Program_Name;
Write_Str (" opts name ");
! Write_Str ("{[-cargs opts] [-bargs opts] [-largs opts]}");
Write_Eol;
Write_Eol;
! Write_Str (" name is a file name from which you can omit the");
! Write_Str (" .adb or .ads suffix");
Write_Eol;
Write_Eol;
--- 39,49 ----
Write_Str ("Usage: ");
Osint.Write_Program_Name;
Write_Str (" opts name ");
! Write_Str ("{[-cargs opts] [-bargs opts] [-largs opts] [-margs
opts]}");
Write_Eol;
Write_Eol;
! Write_Str (" name is one or more file name from which you");
! Write_Str (" can omit the .adb or .ads suffix");
Write_Eol;
Write_Eol;
*************** begin
*** 251,256 ****
--- 251,261 ----
-- Line for -largs
Write_Str (" -largs opts opts are passed to the linker");
+ Write_Eol;
+
+ -- Line for -margs
+
+ Write_Str (" -margs opts opts are passed to gnatmake");
Write_Eol;
-- Add usage information for gcc