From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 888DE3858D38; Fri, 8 Sep 2023 09:52:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 888DE3858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [10.20.4.107]) by gateway (Coremail) with SMTP id _____8AxDOv17vpk7hUiAA--.62380S3; Fri, 08 Sep 2023 17:52:53 +0800 (CST) Received: from [10.20.4.107] (unknown [10.20.4.107]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxXSPy7vpkrDhyAA--.57951S3; Fri, 08 Sep 2023 17:52:50 +0800 (CST) Subject: Re: [pushed][PATCH v2] LoongArch: Adjust C++ multilib header layout. To: Yang Yujie , gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, richard.sandiford@arm.com, xuchenghua@loongson.cn, libstdc++@gcc.gnu.org References: <20230907065010.36145-1-yangyujie@loongson.cn> From: chenglulu Message-ID: <0ff7509e-6524-2864-298f-762880a3df2b@loongson.cn> Date: Fri, 8 Sep 2023 17:52:50 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20230907065010.36145-1-yangyujie@loongson.cn> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf8BxXSPy7vpkrDhyAA--.57951S3 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBj93XoW7Zr1UGw4DGFy3Gr1ftFykXrc_yoW8AFyfpr y7ZFn8tr48tF97GayDJayrWr4DAFsrGF17XFn2gF1xurn8Zry09a4kK39IgFyfWwsrAayU uF1rWa1jgF4DX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SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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