Hi Alexandre,

> On May 25, 2026, Rainer Orth <[email protected]> wrote:
>
>>      gcc:
>>      * et-gather.awk, gen-et-static.awk: New scripts.
>>      * Makefile.in (native): Depend on testsuite/et-static.exp.
>>      (clean): Remove etlist.
>>      (distclean): Remove et-static.exp.
>>      (site.exp): Depend on testsuite/et-static.exp.
>>      (testsuite/et-static.exp): New target.
>
>>      * doc/sourcebuild.texi (Effective-Target Keywords): Document
>>      et-static.def.
>>      (Effective-Target Keywords, Other attributes): Document
>>      ld_at_file.
>
>>      testsuite:
>>      * lib/et-static.def: New file.
>>      * lib/target-supports.exp: Load et-static.exp.
>>      * gcc.misc-tests/outputs.exp: Use ld_at_file effective target
>>      instead of gld.
>>      Update comment.
>
>>      contrib:
>>      * test_installed (--with-auto-host-h): New option.
>>      (--with-objc): Likewise.
>>      (auto_host_h): Default to /dev/null.
>>      Generate et-static.def.
>
> These changes look reasonable to me, thanks!

thanks for the review.  I'll add one minor change before committing:
when not running a full build (either bootstrap or non-bootstrap) but
just cc1, gcc/libgcc.a will not be found and finding et-static.exp will
fail.  I now check for gcc/cc1 instead which is guaranteed to be present
for in-tree testing.

> I'm a little concerned about retaining the ability to preserve
> full-featured install testing without unnecessary effort for those who
> don't use test_installed specifically, or when no traces of the build
> tree have remained.

Understood: I agree that the current solution is limited and just a
first step.

> One could presumably arrange to install or otherwise preserve
> auto-host.h, but wouldn't it make more sense to install the (presumably

That occured to me, too.  Such a minor change could also easily be
backported to a couple of older releases.  I guess it would be best to
put it somewhere in $libsubdir where it won't be found by regular header
file search.

> tiny) et-static.exp, and arrange for target-supports.exp to locate it
> and load it by running the compiler under test with
> -print-file-name=et-static.exp or somesuch, so that it is found both in
> the build tree and install tree testing?

Unfortunately, that won't work in general.  There are two related
issues:

* When testing an older release, there won't be a version of
  et-static.exp to install at all, although it could be generated from
  the old auto-host.h.

* In a similar vein, when new effective targets are added after the
  build et-static.exp was built from, they will be missing completely,
  breaking testing.  However, when generating it at test time even from
  an older auto-host.h, fallback definitions will be present. even when
  the corresponding macro definitions are missing from auto-host.h

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to