gnu/gcc/4e03491b401dce0658543dd90524ddb92063836e 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 <jakub@redhat.com>
* 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 <jwakely@redhat.com>
(cherry picked from commit 9274edef95ab1b74b82f4a9cf14baa9004e03c0d)
2 files changed