On Sun, May 10, 2026 at 10:25 AM Rainer Orth
<[email protected]> wrote:
>
> Several of the testsuite's effective targets are supposed to match the
> result of configure tests.  However, they often try to redo the tests,
> which leads to code duplication and inconsistencies.
>
> Instead, this patch provides a framework to automatically generate
> check_effective_target_<effective-target> procs that match an
> auto-host.h macro and loads the result into targets.support.exp.
>
> While this patch was prompted by the overly complex implementations of
> the o_flag_in_section and R_flag_in_section effective targets, those two
> are riddled with so many other problems that fixing them would dwarf
> the core of this patch.
>
> Instead, this uses the recently added HAVE_LD_AT_FILE check as a trivial
> example.  Just as HAVE_LD_AT_FILE was used to replace the current
> HAVE_GNU_LD, this patch creates a new ld_at_file effective target,
> replacing one use of the gld effective target.
>
> Bootstrapped without regressions on i386-pc-solaris2.11 (as/ld and
> gas/gld) and x86_64-pc-linux-gnu.
>
> Ok for trunk?

This will break running the testsuite with an already installed compiler.
Right now we don't need to have anything special in site.exp for running that.
I do like the idea of automatic generating these but it does break a
very important usage that some folks do already.

Thanks,
Andrew

>
>
> As follow-ups, I mean to use this framework to either introduce new
> effective targets, like solaris_as, solaris_ld or reimplement existing
> ones.
>
>         Rainer
>
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2026-01-13  Rainer Orth  <[email protected]>
>
>         gcc:
>         * Makefile.in (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, Other
>         attributes): Document ld_at_file.
>
>         testsuite:
>         * lib/gen-et-static.awk: 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.
>

Reply via email to