[gcc r14-3803] LoongArch: Adjust C++ multilib header layout.

LuluCheng chenglulu@gcc.gnu.org
Fri Sep 8 09:51:41 GMT 2023


https://gcc.gnu.org/g:62a550e7ec9a524f67344bc12634bff2a2054d72

commit r14-3803-g62a550e7ec9a524f67344bc12634bff2a2054d72
Author: Yang Yujie <yangyujie@loongson.cn>
Date:   Thu Sep 7 14:50:10 2023 +0800

    LoongArch: Adjust C++ multilib header layout.
    
    For LoongArch, the toplevel library build is always aliased to
    one of the multilib variants.  This patch installs it with the
    actual MULTISUBDIR (instead of ".") so that the headers can be
    reached by the compiler.
    
    This patch is an update of
    https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629435.html
    
    libstdc++-v3/ChangeLog:
    
            * configure.host: Register t-loongarch in tmake_file.
            * config/cpu/loongarch/t-loongarch: New file.  Manually refresh
            MULTISUBDIR with $(shell $(CXX) --print-multi-directory).

Diff:
---
 libstdc++-v3/config/cpu/loongarch/t-loongarch | 1 +
 libstdc++-v3/configure.host                   | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/config/cpu/loongarch/t-loongarch b/libstdc++-v3/config/cpu/loongarch/t-loongarch
new file mode 100644
index 000000000000..adfc8ebb93e9
--- /dev/null
+++ b/libstdc++-v3/config/cpu/loongarch/t-loongarch
@@ -0,0 +1 @@
+AM_MAKEFLAGS += " MULTISUBDIR=/$(shell $(CXX) --print-multi-directory)"
diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
index 9e7c7f02dfd1..9dc42ad3edb5 100644
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -315,7 +315,10 @@ esac
 # Set any OS-dependent and CPU-dependent bits.
 # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
 case "${host}" in
-  *-*-linux* | *-*-uclinux*)
+ loongarch*)
+    tmake_file="cpu/loongarch/t-loongarch"
+    ;;
+ *-*-linux* | *-*-uclinux*)
     case "${host_cpu}" in
       i[567]86)
         abi_baseline_pair=i486-linux-gnu


More information about the Libstdc++-cvs mailing list