]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[committed] Fix compilation of testglue wrapper after c23 changes
authorJeff Law <jlaw@ventanamicro.com>
Sat, 16 Nov 2024 15:24:20 +0000 (08:24 -0700)
committerJeff Law <jlaw@ventanamicro.com>
Sat, 16 Nov 2024 15:24:20 +0000 (08:24 -0700)
testglue.c (which is used for exit/abort wrappers in the testsuite) isn't c23
compatible.   The testing harness tries to build testglue.c and use it, but
doesn't report a failure if the build fails, instead it's just not used.  As a
result we get all kinds of failures on targets which depend on testglue to
report back simulator status -- like tens of thousands of execution failures.

This patch just adds -std=gnu17 to the command line to build testglue.c.

There's other fallout from the c23 change..  My tester is chewing through
things right now...

Installing on the trunk.

testsuite
* lib/wrapper.exp (${tool}_maybe_build_wrapper): Pass -std=gnu17 flag
to build testglue wrapper.

gcc/testsuite/lib/wrapper.exp

index 667002bb571a302a49b86066c8f732934c1a264c..8363181621d7e11299e1cc522160e32ad3d5460a 100644 (file)
@@ -36,7 +36,7 @@ proc ${tool}_maybe_build_wrapper { filename args } {
        # passed to turn off all warnings.
        unset_currtarget_info wrap_compile_flags
        set_currtarget_info wrap_compile_flags \
-           "$saved_wrap_compile_flags -w $flags"
+           "$saved_wrap_compile_flags -std=gnu17 -w $flags"
        set result [build_wrapper $filename]
        unset_currtarget_info wrap_compile_flags
        set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags"