This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][Ada] Add option to gnatlink to fix gnat.dg on some platforms
On Thu, 2009-05-07 at 14:10 +0200, Arnaud Charlet wrote:
> > > Wouldn't it be possible to e.g. use --GCC="... -mips32" or whatever
> > > option is needed here?
> >
> > Unless we want to duplicate all the switch processing done by gnatlink I
> > don't see any other way.
> >
> > > If this does not work, it might be a better approach to enhance --GCC
> > > rather than introducing --XCC IMO, in particular for a need internal to
> > > the GCC tree, and not useful to end users.
> >
> > What is your proposal here?
>
> The generate --GCC="... -mips32" when needed.
My answer is that it means recoding a new gnatlink so not a solution :).
> > What we want if a way to turn off the following behaviour:
> >
> > "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."
>
> Actually that's not what we want: what we want is to have --GCC be
> smarter and recognize that the compiler specified is "gcc" or "another
> non GCC compiler", which would also solve this issue.
Ok if this was the idea behind the --GCC behaviour I believe it's easy
to extend the current gnatlink --GCC check to accept "xgcc" as well
as what it accepts now:
gcc/ada/gnatlink.adb:
if Program_Args.all (1).all /= Gcc.all then
Gcc := new String'(Program_Args.all (1).all);
Standard_Gcc := False;
end if;
I will submit a new patch shortly, thanks for your help on this issue.
Laurent