diff options
author | Olivier Hainque <hainque@adacore.com> | 2009-05-24 09:14:53 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2009-05-24 09:14:53 +0000 |
commit | 6e00e546439393178102e01e66431fa32d2205bd (patch) | |
tree | 621c8106644bb4e444801051be4bff97a4d67d53 /gcc/ada/back_end.adb | |
parent | a70d6342473292caef639fdae67ae5b78b87b006 (diff) | |
download | gcc-6e00e546439393178102e01e66431fa32d2205bd.zip gcc-6e00e546439393178102e01e66431fa32d2205bd.tar.gz gcc-6e00e546439393178102e01e66431fa32d2205bd.tar.bz2 |
switch.adb (Is_Internal_GCC_Switch, [...]): Bodies of ...
* switch.adb (Is_Internal_GCC_Switch, Switch_Last): Bodies of ...
* switch.ads (Is_Internal_GCC_Switch, Switch_Last): New functions.
Add -auxbase variants to the list of recognized internal switches.
* back_end.adb (Scan_Back_End_Switches): Use the new functions and
adjust comments.
* lib.ads: Make comment on internal GCC switches more general.
* gcc-interface/lang-specs.h (specs for Ada): Pass -auxbase variants
as for C.
From-SVN: r147830
Diffstat (limited to 'gcc/ada/back_end.adb')
-rw-r--r-- | gcc/ada/back_end.adb | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/gcc/ada/back_end.adb b/gcc/ada/back_end.adb index baf3ffd..a15d9ec 100644 --- a/gcc/ada/back_end.adb +++ b/gcc/ada/back_end.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -158,12 +158,10 @@ package body Back_End is -- entire string should consist of valid switch characters, except that -- an optional terminating NUL character is allowed. -- - -- Back end switches have already been checked and processed by GCC - -- in toplev.c, so no errors can occur and control will always return. - -- The switches must still be scanned to skip the arguments of the - -- "-o" or the (undocumented) "-dumpbase" switch, by incrementing - -- the Next_Arg variable. The "-dumpbase" switch is used to set the - -- basename for GCC dumpfiles. + -- Back end switches have already been checked and processed by GCC in + -- toplev.c, so no errors can occur and control will always return. The + -- switches must still be scanned to skip "-o" or internal GCC switches + -- with their argument. ------------- -- Len_Arg -- @@ -186,21 +184,13 @@ package body Back_End is procedure Scan_Back_End_Switches (Switch_Chars : String) is First : constant Positive := Switch_Chars'First + 1; - Last : Natural := Switch_Chars'Last; + Last : constant Natural := Switch_Last (Switch_Chars); begin - if Last >= First - and then Switch_Chars (Last) = ASCII.NUL - then - Last := Last - 1; - end if; - - -- For switches -o, -dumpbase, --param, skip following argument and - -- do not store either the switch or the following argument. + -- Skip -o or internal GCC switches together with their argument - if Switch_Chars (First .. Last) = "o" or else - Switch_Chars (First .. Last) = "dumpbase" or else - Switch_Chars (First .. Last) = "-param" + if Switch_Chars (First .. Last) = "o" + or else Is_Internal_GCC_Switch (Switch_Chars) then Next_Arg := Next_Arg + 1; |