This patch ensures that gnatmake no longer crashes when there are -m switches after -cargs and after -margs on the command line.
Tested on x86_64-pc-linux-gnu, committed on trunk 2012-03-19 Vincent Celier <cel...@adacore.com> * make.adb (Scan_Make_Arg): Make sure all significant -m switches on the command line are counted.
Index: make.adb =================================================================== --- make.adb (revision 185520) +++ make.adb (working copy) @@ -7423,6 +7423,16 @@ Add_Switch (Argv, Program_Args, And_Save => And_Save); + -- Make sure that all significant switches -m on the command line + -- are counted. + + if Argv'Length > 2 + and then Argv (1 .. 2) = "-m" + and then Argv /= "-mieee" + then + N_M_Switch := N_M_Switch + 1; + end if; + -- Handle non-default compiler, binder, linker, and handle --RTS switch elsif Argv'Length > 2 and then Argv (1 .. 2) = "--" then