diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-23 13:28:41 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-23 13:28:41 +0000 |
commit | 0c7a5982c0ec7851a2d799bbc30165d50ffe8a20 (patch) | |
tree | 2c314468ab7a60edc3c5b5e1ba6248845c2e8390 /gcc | |
parent | aa6851a9262b3bb410bd3fb98040618371762588 (diff) | |
download | gcc-0c7a5982c0ec7851a2d799bbc30165d50ffe8a20.tar.gz |
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=
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135804 138bc75d-0d04-0410-961f-82ee72b054a4
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 4d9abacfa5f..a14afdeeb8c 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 3a1ef9b4dd7..256504bf6eb 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 |