gcc/ada/
* opt.ads (Generate_Asm): New flag.
* osint-c.adb (Set_Output_Object_File_Name): Accept any
extension when generating assembly.
* adabkend.adb (Scan_Compiler_Args): Recognize -S.
end case;
end if;
+ elsif Switch_Chars (First .. Last) = "S" then
+ Generate_Asm := True;
+
-- Ignore all other back-end switches
elsif Is_Back_End_Switch (Switch_Chars) then
-- the name is of the form .xxx, then to name.xxx where name is the source
-- file name with extension stripped.
+ Generate_Asm : Boolean := False;
+ -- GNAT
+ -- True if generating assembly instead of an object file, via the -S switch
+
Generate_C_Code : Boolean := False;
-- GNAT, GNATBIND
-- If True, the Cprint circuitry to generate C code output is activated.
or else
(Name (NL - EL + Name'First .. Name'Last) /= Ext
and then Name (NL - 2 + Name'First .. Name'Last) /= ".o"
+ and then not Generate_Asm
and then
(not Generate_C_Code
or else Name (NL - 2 + Name'First .. Name'Last) /= ".c"))