https://gcc.gnu.org/g:4e03491b401dce0658543dd90524ddb92063836e
commit r16-9171-g4e03491b401dce0658543dd90524ddb92063836e Author: Jakub Jelinek <[email protected]> Date: Thu Jun 25 11:06:37 2026 +0200 libstdc++: Fix up bits/std.cc symlink installation > * src/c++23/Makefile.am (libstdc++.modules.json): Rewrite > without abspath make function. > (stamp-modules-bits): Likewise. > * src/c++23/Makefile.in: Rebuilt. This change broke various module tests (and got backported even to 15 :( ). I'm using objdir as a subdirectory of the gcc tree, so ../configure ... > @@ -57,7 +57,9 @@ std.compat.cc: std.compat.cc.in std-clib.cc.in > # Also put the interface units in the build-includes bits directory. > stamp-modules-bits: $(includebits_DATA) > @-mkdir -p $(top_builddir)/include/bits > - -cd $(top_builddir)/include/bits && $(LN_S) $(abspath $?) . 2>/dev/null > + -for f in $(includebits_DATA); do \ > + $(LN_S) $(abs_srcdir)/$$f $(top_builddir)/include/bits; \ > + done 2>/dev/null > @$(STAMP) $@ > > all-local: stamp-module-manifest stamp-modules-bits Before this change, the /home/jakub/src/gcc/obj38/x86_64-pc-linux-gnu/libstdc++-v3/include/bits std.cc symlink used to point to /home/jakub/src/gcc/obj38/x86_64-pc-linux-gnu/libstdc++-v3/src/c++23/std.cc Now it points to /home/jakub/src/gcc/obj40/x86_64-pc-linux-g~-v3/../../../libstdc++-v3/src/c++23/std.cc which doesn't exist, the source directory only has std.cc.in file from which the std.cc file is generated in the build directory. The following patch fixes it by using abs_builddir instead of abs_srcdir. Fixes up -FAIL: g++.dg/modules/compile-std1.C -std=c++29 (test for excess errors) -FAIL: g++.dg/modules/compile-std1.C -std=c++29 module-cmi std (gcm.cache/std.gcm) -FAIL: g++.dg/modules/compile-std1.C -std=c++29 module-cmi std.compat (gcm.cache/std.compat.gcm) -FAIL: g++.dg/plugin/std-module-exports-c++20.C -fplugin=./std_module_exports_plugin.so (test for excess errors) -FAIL: g++.dg/plugin/std-module-exports-c++23.C -fplugin=./std_module_exports_plugin.so (test for excess errors) -FAIL: g++.dg/plugin/std-module-exports-c++26.C -fplugin=./std_module_exports_plugin.so (test for excess errors) 2026-06-25 Jakub Jelinek <[email protected]> * src/c++23/Makefile.am (stamp-modules-bits): Use abs_builddir instead of abs_srcdir. * src/c++23/Makefile.in: Regenerate. Reviewed-by: Jonathan Wakely <[email protected]> (cherry picked from commit 9274edef95ab1b74b82f4a9cf14baa9004e03c0d) Diff: --- libstdc++-v3/src/c++23/Makefile.am | 2 +- libstdc++-v3/src/c++23/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/src/c++23/Makefile.am b/libstdc++-v3/src/c++23/Makefile.am index a1acf3eb5b4a..92691c502a94 100644 --- a/libstdc++-v3/src/c++23/Makefile.am +++ b/libstdc++-v3/src/c++23/Makefile.am @@ -58,7 +58,7 @@ std.compat.cc: std.compat.cc.in std-clib.cc.in stamp-modules-bits: $(includebits_DATA) @-mkdir -p $(top_builddir)/include/bits -for f in $(includebits_DATA); do \ - $(LN_S) $(abs_srcdir)/$$f $(top_builddir)/include/bits; \ + $(LN_S) $(abs_builddir)/$$f $(top_builddir)/include/bits; \ done 2>/dev/null @$(STAMP) $@ diff --git a/libstdc++-v3/src/c++23/Makefile.in b/libstdc++-v3/src/c++23/Makefile.in index c1407d250b1d..0ce93f812d25 100644 --- a/libstdc++-v3/src/c++23/Makefile.in +++ b/libstdc++-v3/src/c++23/Makefile.in @@ -866,7 +866,7 @@ std.compat.cc: std.compat.cc.in std-clib.cc.in stamp-modules-bits: $(includebits_DATA) @-mkdir -p $(top_builddir)/include/bits -for f in $(includebits_DATA); do \ - $(LN_S) $(abs_srcdir)/$$f $(top_builddir)/include/bits; \ + $(LN_S) $(abs_builddir)/$$f $(top_builddir)/include/bits; \ done 2>/dev/null @$(STAMP) $@
