diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-09-06 12:38:38 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-09-06 12:38:38 +0200 |
commit | a316b3fcd05624ce0aadca3478f6a3c7b494c2d0 (patch) | |
tree | 198c275d0367c716081e97ddbab90621ade51af8 /gcc/ada/gnatbind.adb | |
parent | 9caf55e370f2346d393e141b8fb4c4e59afc32c9 (diff) | |
download | gcc-a316b3fcd05624ce0aadca3478f6a3c7b494c2d0.zip gcc-a316b3fcd05624ce0aadca3478f6a3c7b494c2d0.tar.gz gcc-a316b3fcd05624ce0aadca3478f6a3c7b494c2d0.tar.bz2 |
[multiple changes]
2017-09-06 Gary Dismukes <dismukes@adacore.com>
* exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
adjustments and a typo fix.
2017-09-06 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Call): Do not issue info
message about inlining of calls to functions in assertions,
for functions whose body has not been seen yet.
2017-09-06 Bob Duff <duff@adacore.com>
* a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
we can use modern Ada in this package.
* s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
Move Ada.Command_Line.Response_File to System.Response_File,
and make Ada.Command_Line.Response_File into a rename of
System.Response_File. This is to avoid having gnatbind depend
Ada.Command_Line, which would damage the bootstrap process now
that Ada.Command_Line contains modern Ada (the raise expression).
* gnatbind.adb: Avoid dependence on
Ada.Command_Line. Depend on System.Response_File instead
of Ada.Command_Line.Response_File. Change one call to
Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
to Ada.Command_Line.Argument_Count to use Arg_Count.
* gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
From-SVN: r251775
Diffstat (limited to 'gcc/ada/gnatbind.adb')
-rw-r--r-- | gcc/ada/gnatbind.adb | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb index 6c778bb..63e7965 100644 --- a/gcc/ada/gnatbind.adb +++ b/gcc/ada/gnatbind.adb @@ -36,7 +36,12 @@ with Debug; use Debug; with Fmap; with Namet; use Namet; with Opt; use Opt; + with Osint; use Osint; +-- Note that we use low-level routines in Osint to read command-line +-- arguments. We cannot depend on Ada.Command_Line, because it contains modern +-- Ada features that would break bootstrapping with old base compilers. + with Osint.B; use Osint.B; with Output; use Output; with Rident; use Rident; @@ -47,10 +52,9 @@ with Targparm; use Targparm; with Types; use Types; with System.Case_Util; use System.Case_Util; +with System.Response_File; with System.OS_Lib; use System.OS_Lib; -with Ada.Command_Line.Response_File; use Ada.Command_Line; - procedure Gnatbind is Total_Errors : Nat := 0; @@ -505,8 +509,6 @@ procedure Gnatbind is Next_Arg : Positive := 1; begin - -- Use low level argument routines to avoid dragging in secondary stack - while Next_Arg < Arg_Count loop declare Next_Argv : String (1 .. Len_Arg (Next_Arg)); @@ -519,7 +521,7 @@ procedure Gnatbind is if Next_Argv'Length > 1 then declare Arguments : constant Argument_List := - Response_File.Arguments_From + System.Response_File.Arguments_From (Response_File_Name => Next_Argv (2 .. Next_Argv'Last), Recursive => True, @@ -598,7 +600,13 @@ begin Scan_Bind_Args; if Verbose_Mode then - Write_Str (Command_Name); + declare + Command_Name : String (1 .. Len_Arg (0)); + begin + Fill_Arg (Command_Name'Address, 0); + Write_Str (Command_Name); + end; + Put_Bind_Args; Write_Eol; end if; @@ -669,7 +677,7 @@ begin -- Output usage information if no arguments if not More_Lib_Files then - if Argument_Count = 0 then + if Arg_Count = 0 then Bindusg.Display; else Write_Line ("try ""gnatbind --help"" for more information."); |