On Sat, Apr 30, 2016 at 10:21 AM, Eric Botcazou <ebotca...@adacore.com> wrote:
>> 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...

Can you close PR 14435 now?

Thanks.

-- 
H.J.

Reply via email to