public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v2] LoongArch: Adjust C++ multilib header layout.
@ 2023-09-07  6:50 Yang Yujie
  2023-09-08  9:52 ` [pushed][PATCH " chenglulu
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yujie @ 2023-09-07  6:50 UTC (permalink / raw)
  To: gcc-patches
  Cc: xry111, richard.sandiford, xuchenghua, chenglulu, libstdc++, Yang Yujie

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 | 1 +
 libstdc++-v3/configure.host                   | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 libstdc++-v3/config/cpu/loongarch/t-loongarch

diff --git a/libstdc++-v3/config/cpu/loongarch/t-loongarch b/libstdc++-v3/config/cpu/loongarch/t-loongarch
new file mode 100644
index 00000000000..adfc8ebb93e
--- /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 9e7c7f02dfd..9dc42ad3edb 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
-- 
2.36.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pushed][PATCH v2] LoongArch: Adjust C++ multilib header layout.
  2023-09-07  6:50 [PATCH v2] LoongArch: Adjust C++ multilib header layout Yang Yujie
@ 2023-09-08  9:52 ` chenglulu
  0 siblings, 0 replies; 2+ messages in thread
From: chenglulu @ 2023-09-08  9:52 UTC (permalink / raw)
  To: Yang Yujie, gcc-patches; +Cc: xry111, richard.sandiford, xuchenghua, libstdc++

PUshed to r14-3803.

在 2023/9/7 下午2:50, Yang Yujie 写道:
> 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 | 1 +
>   libstdc++-v3/configure.host                   | 5 ++++-
>   2 files changed, 5 insertions(+), 1 deletion(-)
>   create mode 100644 libstdc++-v3/config/cpu/loongarch/t-loongarch
>
> diff --git a/libstdc++-v3/config/cpu/loongarch/t-loongarch b/libstdc++-v3/config/cpu/loongarch/t-loongarch
> new file mode 100644
> index 00000000000..adfc8ebb93e
> --- /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 9e7c7f02dfd..9dc42ad3edb 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-08  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-07  6:50 [PATCH v2] LoongArch: Adjust C++ multilib header layout Yang Yujie
2023-09-08  9:52 ` [pushed][PATCH " chenglulu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).