From 5c1c8a03a695dd26ef22b969e5d2d93f68ce8b36 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 18 Feb 2004 12:52:55 +0100 Subject: [multiple changes] 2004-02-18 Emmanuel Briot * ali.ads, ali.adb (First_Sdep_Entry): No longer a constant, so that Scan_ALI can be used for multiple ALI files without reinitializing between calls. 2004-02-18 Robert Dewar * debug.adb: Minor reformatting. 2004-02-18 Richard Kenner * decl.c (gnat_to_gnu_entity, case object): Set DECL_POINTER_ALIAS_SET to zero if there is an address clause. 2004-02-18 Thomas Quinot * exp_util.adb (Side_Effect_Free): Any literal is side effects free. 2004-02-18 Gary Dismukes * layout.adb (Layout_Component_List): Revise generation of call to discriminant-checking function to pass selections of all of the type's discriminants rather than just the variant-controlling discriminant. 2004-02-18 Olivier Hainque * 5gmastop.adb (Pop_Frame): Do not call exc_unwind, which is bound to fail in the current setup and triggers spurious system error messages. Pretend it occurred and failed instead. 2004-02-18 Vincent Celier * bld.adb: Mark FLDFLAGS as saved (Process_Declarative_Items): Add Linker'Linker_Options to FLDFLAGS when it is not the root project. Put each directory to be extended between double quotes to prevent it to be expanded on Windows. (Recursive_Process): Reset CFLAGS/CXXFLAGS to nothing before processing the project file. Set them back to their initial values if they have not been set in the project file. * gprcmd.adb: (Gprdebug, Debug): New global variables (Display_Command): New procedure (Usage): Document new command "linkopts" Call Display_Command when env var GPRDEBUG has the value "TRUE" Implement new command "linkopts" Remove quotes that may be around arguments for "extend" Always call Normalize_Pathname with arguments formatted for the platform * Makefile.generic: Link C/C++ mains with $(FLDFLAGS) Change @echo to @$(display) in target clean to be able to clean silently * Makefile.prolog: Save FLDFLAGS and give it an initial empty value * prj-part.adb (Project_Path_Name_Of): Do not put final result in canonical case. * prj-part.adb (Parse_Single_Project): Always call with From_Extended = Extending_All when current project is an extending all project. * vms_conv.adb (Output_File_Expected): New Boolean global variable, set to True only for LINK command, after Unix switch -o. (Process_Arguments): Set Output_File_Expected to True for LINK command after Unix switch -o. When Output_File_Expected is True, never add an extension to a file name. * 5vml-tgt.adb (Build_Dynamic_Library): Do not append "/OPTIONS" to the option file name, only to the --for-linker= switch. (Option_File_Name): If option file name do not end with ".opt", append "/OPTIONS". 2004-02-18 GNAT Script * Make-lang.in: Makefile automatically updated From-SVN: r78024 --- gcc/ada/5vml-tgt.adb | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'gcc/ada/5vml-tgt.adb') diff --git a/gcc/ada/5vml-tgt.adb b/gcc/ada/5vml-tgt.adb index 8354437..f747922 100644 --- a/gcc/ada/5vml-tgt.adb +++ b/gcc/ada/5vml-tgt.adb @@ -209,7 +209,9 @@ package body MLib.Tgt is if Symbol_Data.Symbol_File = No_Name then return "symvec.opt"; else - return Get_Name_String (Symbol_Data.Symbol_File); + Get_Name_String (Symbol_Data.Symbol_File); + To_Lower (Name_Buffer (1 .. Name_Len)); + return Name_Buffer (1 .. Name_Len); end if; end Option_File_Name; @@ -244,8 +246,7 @@ package body MLib.Tgt is Opt_File_Name : constant String := Option_File_Name; Version : constant String := Version_String; - For_Linker_Opt : constant String_Access := - new String'("--for-linker=" & Opt_File_Name); + For_Linker_Opt : String_Access; -- Start of processing for Build_Dynamic_Library @@ -258,6 +259,19 @@ package body MLib.Tgt is Link_With_Shared_Libgcc := No_Shared_Libgcc_Switch'Access; end if; + -- If option file name does not ends with ".opt", append "/OPTIONS" + -- to its specification for the VMS linker. + + if Opt_File_Name'Length > 4 + and then + Opt_File_Name (Opt_File_Name'Last - 3 .. Opt_File_Name'Last) = ".opt" + then + For_Linker_Opt := new String'("--for-linker=" & Opt_File_Name); + else + For_Linker_Opt := + new String'("--for-linker=" & Opt_File_Name & "/OPTIONS"); + end if; + VMS_Options (VMS_Options'First + 1) := For_Linker_Opt; for J in Inter'Range loop -- cgit v1.1