diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-04-11 15:05:15 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-04-11 15:05:15 +0200 |
commit | da1c23dd6f53ba955f2b0aefc00ff66bbbcfb11f (patch) | |
tree | 586696a09f1e8fd2562fd8e4f69f74541094b414 /gcc/ada/gnatlink.adb | |
parent | f6f4d8d407733c8f274b4cb5a998cf1a9548d3bf (diff) | |
download | gcc-da1c23dd6f53ba955f2b0aefc00ff66bbbcfb11f.zip gcc-da1c23dd6f53ba955f2b0aefc00ff66bbbcfb11f.tar.gz gcc-da1c23dd6f53ba955f2b0aefc00ff66bbbcfb11f.tar.bz2 |
[multiple changes]
2013-04-11 Doug Rupp <rupp@adacore.com>
* gnatlink.adb: Fold program basename to lower case on VMS for
consistency.
2013-04-11 Matthew Heaney <heaney@adacore.com>
* a-rbtgbo.adb (Generic_Equal): Initialize Result variable before
entering loop.
2013-04-11 Arnaud Charlet <charlet@adacore.com>
* xgnatugn.adb: Remove dead code (handling of @ifset/@ifclear).
2013-04-11 Arnaud Charlet <charlet@adacore.com>
* gnat_ugn.texi: Remove some use of ifset in menus. Not strictly
needed, and seems to confuse some versions of makeinfo.
2013-04-11 Javier Miranda <miranda@adacore.com>
* einfo.adb (Is_Thunk): Remove assertion.
(Set_Is_Thunk): Add assertion.
* einfo.ads (Is_Thunk): Complete documentation.
* exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Code cleanup.
* exp_ch3.ad[sb] (Is_Variable_Size_Array): Moved to sem_util
(Is_Variable_Size_Record): Moved to sem_util
* exp_ch6.adb (Expand_Call): Code cleanup.
(Expand_N_Extended_Return_Statement): Code cleanup.
(Expand_Simple_Function_Return): Code cleanup.
* exp_disp.adb Remove dependency on exp_ch3
(Expand_Interface_Thunk): Add minimum decoration needed to set
attribute Is_Thunk.
* sem_ch3.ad[sb] (Is_Constant_Bound): moved to sem_util
* sem_util.ad[sb] (Is_Constant_Bound): Moved from
sem_ch3 (Is_Variable_Size_Array): Moved from exp_ch3
(Is_Variable_Size_Record): Moved from exp_ch3
From-SVN: r197787
Diffstat (limited to 'gcc/ada/gnatlink.adb')
-rw-r--r-- | gcc/ada/gnatlink.adb | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb index 87ad072..503c2f7 100644 --- a/gcc/ada/gnatlink.adb +++ b/gcc/ada/gnatlink.adb @@ -153,6 +153,8 @@ procedure Gnatlink is Binder_Ali_File : String_Access; Binder_Obj_File : String_Access; + Base_Command_Name : String_Access; + Tname : Temp_File_Name; Tname_FD : File_Descriptor := Invalid_FD; -- Temporary file used by linker to pass list of object files on @@ -226,6 +228,12 @@ procedure Gnatlink is procedure Process_Binder_File (Name : String); -- Reads the binder file and extracts linker arguments + function To_Lower (A : Character) return Character; + -- Fold a character to lower case; + + procedure To_Lower (A : in out String); + -- Fold a string to lower case; + procedure Usage; -- Display usage @@ -314,7 +322,7 @@ procedure Gnatlink is procedure Error_Msg (Message : String) is begin - Write_Str (Base_Name (Command_Name)); + Write_Str (Base_Command_Name.all); Write_Str (": "); Write_Str (Message); Write_Eol; @@ -1406,6 +1414,31 @@ procedure Gnatlink is Status := fclose (Fd); end Process_Binder_File; + -------------- + -- To_Lower -- + -------------- + + function To_Lower (A : Character) return Character is + A_Val : constant Natural := Character'Pos (A); + + begin + if A in 'A' .. 'Z' + or else A_Val in 16#C0# .. 16#D6# + or else A_Val in 16#D8# .. 16#DE# + then + return Character'Val (A_Val + 16#20#); + else + return A; + end if; + end To_Lower; + + procedure To_Lower (A : in out String) is + begin + for J in A'Range loop + A (J) := To_Lower (A (J)); + end loop; + end To_Lower; + ----------- -- Usage -- ----------- @@ -1413,7 +1446,7 @@ procedure Gnatlink is procedure Usage is begin Write_Str ("Usage: "); - Write_Str (Base_Name (Command_Name)); + Write_Str (Base_Command_Name.all); Write_Str (" switches mainprog.ali [non-Ada-objects] [linker-options]"); Write_Eol; Write_Eol; @@ -1501,6 +1534,15 @@ begin end; end if; + Base_Command_Name := new String'(Base_Name (Command_Name)); + + -- Fold to lower case "GNATLINK" on VMS to be consistent with output + -- from other GNAT utilities. + + if Hostparm.OpenVMS then + To_Lower (Base_Command_Name.all); + end if; + Process_Args; if Argument_Count = 0 @@ -1737,7 +1779,7 @@ begin -- Assume this is a cross tool if the executable name is not gnatlink - if Base_Name (Command_Name) = "gnatlink" + if Base_Command_Name.all = "gnatlink" and then Output_File_Name.all = "test" then Error_Msg ("warning: executable name """ & Output_File_Name.all |