Commit d313a1b6 by Vincent Celier Committed by Arnaud Charlet

gnatlink.adb (Process_Args): Do not disable scanning of ALI file for back end switches when...

2008-05-23  Vincent Celier  <celier@adacore.com>

	* gnatlink.adb (Process_Args): Do not disable scanning of ALI file for
	back end switches when executable specified with --GCC= is same as
	default, even if there are additional options.

	* gnat_ugn.texi:
	Document when the back end switches from the ALI file are taken into
	account when gnatlink is invoked with --GCC=

From-SVN: r135804
parent d3132623
......@@ -8597,7 +8597,11 @@ use @code{foo -x -y} as your compiler. Note that switch @option{-c} is always
inserted after your command name. Thus in the above example the compiler
command that will be used by @command{gnatlink} will be @code{foo -c -x -y}.
A limitation of this syntax is that the name and path name of the executable
itself must not include any embedded spaces. If several
itself must not include any embedded spaces. If the compiler executable is
different from the default one (gcc or <prefix>-gcc), then the back-end
switches in the ALI file are not used to compile the binder generated source.
For example, this is the case with @option{--GCC="foo -x -y"}. But the back end
switches will be used for @option{--GCC="gcc -gnatv"}. If several
@option{--GCC=compiler_name} are used, only the last @var{compiler_name}
is taken into account. However, all the additional switches are also taken
into account. Thus,
......@@ -521,8 +521,10 @@ procedure Gnatlink is
(Arg (7 .. Arg'Last));
begin
Gcc := new String'(Program_Args.all (1).all);
Standard_Gcc := False;
if Program_Args.all (1).all /= Gcc.all then
Gcc := new String'(Program_Args.all (1).all);
Standard_Gcc := False;
end if;
-- Set appropriate flags for switches passed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment