This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Adjust ACATS testing
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 30 Apr 2016 19:21:55 +0200
- Subject: Re: [Ada] Adjust ACATS testing
- Authentication-results: sourceware.org; auth=none
- References: <2553718 dot eROHObzzXL at polaris> <CAMe9rOp8K7=UwHuNyKSiaZfoy0zRxcE+NXmcqXcwvLJ3jZpzWA at mail dot gmail dot com>
> Does this fix
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14435
Surprisingly yes according to 'strace' because of this change:
target_gnatchop () {
- gnatchop --GCC="$GCC_DRIVER" $*
+ $BASE/gnatchop --GCC="$BASE/xgcc" $*
}
and the following trick implemented in gnatchop:
-- Add the directory where gnatchop is invoked in front of the path, if
-- gnatchop is invoked with directory information.
declare
Command : constant String := Command_Name;
begin
for Index in reverse Command'Range loop
if Command (Index) = Directory_Separator then
declare
Absolute_Dir : constant String :=
Normalize_Pathname
(Command (Command'First .. Index));
PATH : constant String :=
Absolute_Dir
& Path_Separator
& Getenv ("PATH").all;
begin
Setenv ("PATH", PATH);
end;
exit;
end if;
end loop;
end;
so $BASE ends up added to the PATH by gnatchop and therefore $BASE/gnat1 ends
up being invoked by $BASE/xgcc through the PATH...
--
Eric Botcazou