https://gcc.gnu.org/g:5594fe352e6acf4391bda94ce69fdeb27ba0f4a0

commit r15-11315-g5594fe352e6acf4391bda94ce69fdeb27ba0f4a0
Author: Alexandre Oliva <[email protected]>
Date:   Wed Jun 24 11:33:14 2026 -0300

    work around ppc-vx6 make limitations
    
    libstdc++-v3 in gcc-15 gained uses of a make function that was added
    in GNU make 3.81, but ppc-vx6 is GNU make 3.80, so calling the
    function returns an empty string, and the build fails.
    
    gcc/doc/install.texi states GCC requires make 3.80 to build, so
    rewrite those bits to avoid the new function.
    
    Install locations don't need abspath because they're already supposed
    to be absolute, since installation can't work with relative paths and
    DESTDIR is supposed to be prependable.
    
    $? may gain the srcdir VPATH, which would complicate dropping abspath,
    so iterate over the two filenames.
    
    
    for  libstdc++-v3/ChangeLog
    
            * src/c++23/Makefile.am (libstdc++.modules.json): Rewrite
            without abspath make function.
            (stamp-modules-bits): Likewise.
            * src/c++23/Makefile.in: Rebuilt.
    (cherry picked from commit b0812255e4212f14d07e2d9077d70ba491666e66)

Diff:
---
 libstdc++-v3/src/c++23/Makefile.am | 8 +++++---
 libstdc++-v3/src/c++23/Makefile.in | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/libstdc++-v3/src/c++23/Makefile.am 
b/libstdc++-v3/src/c++23/Makefile.am
index b506a7be7590..bd7c9f65907e 100644
--- a/libstdc++-v3/src/c++23/Makefile.am
+++ b/libstdc++-v3/src/c++23/Makefile.am
@@ -34,8 +34,8 @@ includebits_DATA = std.cc std.compat.cc
 # The manifest to be installed uses the relative path between install dirs.
 libstdc++.modules.json: libstdc++.modules.json.in
        relpath=$$($(toplevel_srcdir)/contrib/relpath.sh \
-                  $(abspath $(toolexeclibdir)) \
-                  $(abspath $(includebitsdir))) && \
+                   $(toolexeclibdir) \
+                   $(includebitsdir)) && \
        sed "s,@MODPATH@,$$relpath," $< > $@
 
 # The uninstalled manifest uses the relative path to builddir.
@@ -54,7 +54,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
diff --git a/libstdc++-v3/src/c++23/Makefile.in 
b/libstdc++-v3/src/c++23/Makefile.in
index 715c14c6b815..bd603fd1adfd 100644
--- a/libstdc++-v3/src/c++23/Makefile.in
+++ b/libstdc++-v3/src/c++23/Makefile.in
@@ -827,8 +827,8 @@ uninstall-am: uninstall-includebitsDATA 
uninstall-toolexeclibDATA
 # The manifest to be installed uses the relative path between install dirs.
 libstdc++.modules.json: libstdc++.modules.json.in
        relpath=$$($(toplevel_srcdir)/contrib/relpath.sh \
-                  $(abspath $(toolexeclibdir)) \
-                  $(abspath $(includebitsdir))) && \
+                   $(toolexeclibdir) \
+                   $(includebitsdir)) && \
        sed "s,@MODPATH@,$$relpath," $< > $@
 
 # The uninstalled manifest uses the relative path to builddir.
@@ -847,7 +847,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

Reply via email to