From patchwork Thu Sep 7 06:50:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yujie X-Patchwork-Id: 1830709 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rh8yx1sjNz1ygc for ; Thu, 7 Sep 2023 16:51:04 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 17A853857732 for ; Thu, 7 Sep 2023 06:51:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id E9E893858D35; Thu, 7 Sep 2023 06:50:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E9E893858D35 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 [192.168.100.1]) by gateway (Coremail) with SMTP id _____8AxJui_cvlkkiUhAA--.7160S3; Thu, 07 Sep 2023 14:50:40 +0800 (CST) Received: from localhost.localdomain (unknown [192.168.100.1]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx7c6+cvlkti1wAA--.31271S2; Thu, 07 Sep 2023 14:50:38 +0800 (CST) From: Yang Yujie To: gcc-patches@gcc.gnu.org Subject: [PATCH v2] LoongArch: Adjust C++ multilib header layout. Date: Thu, 7 Sep 2023 14:50:10 +0800 Message-ID: <20230907065010.36145-1-yangyujie@loongson.cn> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Bx7c6+cvlkti1wAA--.31271S2 X-CM-SenderInfo: 51dqw5pxmlvqxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBj93XoW7ZrW3Ary3Jw13CF4UWrWkZrc_yoW8WFWDpr y7ZFn8tr48tFn3G39rJayrWr4DAFs7GF17XFn2gF1xurs8Zry0vaykK39FgFy7Ww47Aay5 ur1rWa1jgF1DX3gCm3ZEXasCq-sJn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkFb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv 67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s02 6x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0x vE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE 42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6x kF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j5WrAUUUUU= X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard.sandiford@arm.com, xuchenghua@loongson.cn, libstdc++@gcc.gnu.org, chenglulu@loongson.cn Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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