diff options
author | Vincent Celier <celier@adacore.com> | 2008-05-23 15:28:41 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-05-23 15:28:41 +0200 |
commit | d313a1b6bc336a4061de1c19e9903daa125a6561 (patch) | |
tree | 2c314468ab7a60edc3c5b5e1ba6248845c2e8390 /gcc | |
parent | d3132623b6d9ae24851bfd9c5d053722b4dafbd5 (diff) | |
download | gcc-d313a1b6bc336a4061de1c19e9903daa125a6561.zip gcc-d313a1b6bc336a4061de1c19e9903daa125a6561.tar.gz gcc-d313a1b6bc336a4061de1c19e9903daa125a6561.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 6 | ||||
-rw-r--r-- | gcc/ada/gnatlink.adb | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 4d9abac..a14afde 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -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, diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb index 3a1ef9b..256504b 100644 --- a/gcc/ada/gnatlink.adb +++ b/gcc/ada/gnatlink.adb @@ -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 |