On Wed, Feb 26, 2025 at 07:55:28AM -0500, David Malcolm wrote: > BTW, Qing Zhao's patch kit > "[PATCH v4 0/3][RFC]Provide more contexts for -Warray-bounds and - > Wstringop-* warning messages" > https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673474.html
I'm not sure we want that, that is just one of the many possibilities of showing up some reasoning why a misdesigned late warning has been emitted. > adds a usage of simple_diagnostic_path to OBJS via a new gcc/move- > history-rich-location.o in this patch: > https://gcc.gnu.org/pipermail/gcc-patches/2024-November/667615.html So what about at least for now something like the patch below, or perhaps export some extra substitutions for ENABLE_PLUGIN and CHECKING_P from configure and conditionalize this on plugins enabled and CHECKING_P disabled. This certainly fixes all the plugin.exp tests for --enable-checking=release. 2025-02-26 Jakub Jelinek <ja...@redhat.com> PR testsuite/116143 * Makefile.in (EXTRA_BACKEND_OBJS): New variable. (BACKEND): Use it before libbackend.a. --- gcc/Makefile.in.jj 2025-02-12 22:23:07.136772228 +0100 +++ gcc/Makefile.in 2025-02-26 14:51:50.372704489 +0100 @@ -1904,8 +1904,12 @@ ifeq (@enable_libgdiagnostics@,yes) ALL_HOST_OBJS += $(libgdiagnostics_OBJS) $(SARIF_REPLAY_OBJS) endif -BACKEND = libbackend.a main.o libcommon-target.a libcommon.a \ - $(CPPLIB) $(LIBDECNUMBER) +# libbackend.a objs that might not be in some cases linked into the compiler, +# yet they are supposed to be part of the plugin ABI. See PR116143. +EXTRA_BACKEND_OBJS = simple-diagnostic-path.o lazy-diagnostic-path.o + +BACKEND = $(EXTRA_BACKEND_OBJS) libbackend.a main.o libcommon-target.a \ + libcommon.a $(CPPLIB) $(LIBDECNUMBER) # This is defined to "yes" if Tree checking is enabled, which roughly means # front-end checking. Jakub