https://gcc.gnu.org/g:431fec6c5ddaaa1e5921ca427b58e1d47d276ffa

commit r16-9164-g431fec6c5ddaaa1e5921ca427b58e1d47d276ffa
Author: Alexandre Oliva <[email protected]>
Date:   Wed Jun 24 11:20:08 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 5b2812abd228..a1acf3eb5b4a 100644
--- a/libstdc++-v3/src/c++23/Makefile.am
+++ b/libstdc++-v3/src/c++23/Makefile.am
@@ -37,8 +37,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.
@@ -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
diff --git a/libstdc++-v3/src/c++23/Makefile.in 
b/libstdc++-v3/src/c++23/Makefile.in
index 75da9c008ab6..c1407d250b1d 100644
--- a/libstdc++-v3/src/c++23/Makefile.in
+++ b/libstdc++-v3/src/c++23/Makefile.in
@@ -845,8 +845,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.
@@ -865,7 +865,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