This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Cause gnatlink in gnat.dg to call correct gcc
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Arnaud Charlet <charlet at adacore dot com>, Janis Johnson <janis187 at us dot ibm dot com>, Ben Elliston <bje at au1 dot ibm dot com>
- Date: Wed, 3 Mar 2010 11:52:27 +0100
- Subject: Re: PATCH: Cause gnatlink in gnat.dg to call correct gcc
- References: <ydd3a0qpw61.fsf@CeBiTec.Uni-Bielefeld.DE>
> The obvious solution is to avoid running gcc from PATH at all, but use
> the just built gcc instead. Unfortunately, this is more intricate than
> it seems:
>
> * We need to pass all of the full gcc pathname, the corresponding -B
> option, and the correct multilib flag, if present, via the --GCC
> option. The tricky part here is to get this through the dejagnu exec
> machinery as a single option including the embedded whitespace. The
> trick (thanks to Ben Elliston!) was to quote the embedded whitespace
> to handle the levels of evaluation involved.
>
> * Since now the multilib flag is part of $GNAT_UNDER_TEST, we need to
> reinitialize that every time the target changes (e.g. when testing
> several multilibs).
>
> * gnatlink looks for system.ads itself, and the only way to point it to
> the one in the just built tree is by setting
> ADA_INCLUDE_PATH/ADA_OBJECTS_PATH, just as ada/acats/run_acats does.
Thanks for digging into this, the code is known to be a little buggy since
the introduction of multilib in Ada.
> With those changes in place in gnat.exp, I was able to successfully run
> the gnat.dg testsuite with RUNTESTFLAGS='--target_board "unix{,-m64}"'
> in the configuration described above.
+ set
CC "$file --GCC=$root/xgcc --GNATBIND=$root/gnatbind --GNATLINK=$root/gnatlink -cargs -B$root -largs --LINK=$root/xgcc -B$root
$gnatlink_gcc -margs";
Passing --LINK was a kludge I put in for 4.4. Does this still work with only
+ set
CC "$file --GCC=$root/xgcc --GNATBIND=$root/gnatbind --GNATLINK=$root/gnatlink -cargs -B$root -largs
$gnatlink_gcc -margs";
instead? If so, the patch is OK for both mainline and 4.4 branch.
--
Eric Botcazou