It is not possible to specify "-largs" as a switch in package linker of the main project file, to link with an external library libargs. This patch corrects this. Now any option found in the switches of packages Compiler, Binder or Linker is taken as is into account.
Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Vincent Celier <cel...@adacore.com> * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler, Binder or Linker of the main project file.
Index: make.adb =================================================================== --- make.adb (revision 178228) +++ make.adb (working copy) @@ -7373,15 +7373,15 @@ end if; - -- Then check if we are dealing with -cargs/-bargs/-largs/-margs + -- Then check if we are dealing with -cargs/-bargs/-largs/-margs. These + -- options are taken as is when found in package Compiler, Binder or + -- Linker of the main project file. - elsif Argv = "-bargs" - or else - Argv = "-cargs" - or else - Argv = "-largs" - or else - Argv = "-margs" + elsif (And_Save or else Program_Args = None) + and then (Argv = "-bargs" or else + Argv = "-cargs" or else + Argv = "-largs" or else + Argv = "-margs") then case Argv (2) is when 'c' => Program_Args := Compiler;