This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATH][Ada] Fix multilib handling of gnat.dg when RUNTESTFLAGS is used
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: laurent at guerby dot net
- Cc: gcc-patches at gcc dot gnu dot org, Janis Johnson <janis187 at us dot ibm dot com>, Arnaud Charlet <charlet at adacore dot com>
- Date: Sun, 19 Apr 2009 13:42:44 +0200
- Subject: Re: [PATH][Ada] Fix multilib handling of gnat.dg when RUNTESTFLAGS is used
- References: <1236247879.11347.1296.camel@localhost> <200904181555.09180.ebotcazou@adacore.com> <1240138501.17487.77.camel@localhost>
> Indeed, as documented gnatlink --GCC= deactivates reading of compiler
> flags from main program .ali file so the needed flags are not passed to
> the gcc gnatlink calls.
Bummer.
> One solution is to add a new flag to be able to use --GCC= and still
> read flags from .ali files, here is a minimalist patch adding a --XCC=
> option: could you try it in your configuration and report?
Just using --LINK works. Patch attached.
--
Eric Botcazou
Index: lib/gnat.exp
===================================================================
--- lib/gnat.exp (revision 146303)
+++ lib/gnat.exp (working copy)
@@ -255,7 +255,7 @@ proc prune_gnat_output { text } {
proc local_find_gnatmake {} {
global tool_root_dir
-
+
if ![is_remote host] {
set file [lookfor_file $tool_root_dir gnatmake]
if { $file == "" } {
@@ -263,7 +263,7 @@ proc local_find_gnatmake {} {
}
if { $file != "" } {
set root [file dirname $file]
- set CC "$file --GCC=$root/xgcc --GNATBIND=$root/gnatbind --GNATLINK=$root/gnatlink -cargs -B$root -largs -B$root -margs -B$root";
+ set CC "$file --GCC=$root/xgcc --GNATBIND=$root/gnatbind --GNATLINK=$root/gnatlink -cargs -B$root -largs --LINK=$root/xgcc -B$root -margs";
} else {
set CC [transform gnatmake]
}