]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
LoongArch: Adjust C++ multilib header layout.
authorYang Yujie <yangyujie@loongson.cn>
Thu, 7 Sep 2023 06:50:10 +0000 (14:50 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Fri, 8 Sep 2023 09:51:06 +0000 (17:51 +0800)
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).

libstdc++-v3/config/cpu/loongarch/t-loongarch [new file with mode: 0644]
libstdc++-v3/configure.host

diff --git a/libstdc++-v3/config/cpu/loongarch/t-loongarch b/libstdc++-v3/config/cpu/loongarch/t-loongarch
new file mode 100644 (file)
index 0000000..adfc8eb
--- /dev/null
@@ -0,0 +1 @@
+AM_MAKEFLAGS += " MULTISUBDIR=/$(shell $(CXX) --print-multi-directory)"
index 9e7c7f02dfd1cce8ec663b3bd337a2ed4d736aad..9dc42ad3edb59b45adc706fb47b30b48fa2480c5 100644 (file)
@@ -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