From patchwork Thu Mar 24 12:37:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lulu Cheng X-Patchwork-Id: 52306 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7FE8F388E80D for ; Thu, 24 Mar 2022 12:39:22 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 10EC93898538 for ; Thu, 24 Mar 2022 12:38:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 10EC93898538 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 5.5.5 (unknown [10.2.5.5]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxGs04Zjxi3xsPAA--.24342S3; Thu, 24 Mar 2022 20:38:42 +0800 (CST) From: chenglulu To: gcc-patches@gcc.gnu.org Subject: [PATCH v10 01/12] LoongArch Port: Regenerate configure Date: Thu, 24 Mar 2022 20:37:23 +0800 Message-Id: <20220324123734.1632625-2-chenglulu@loongson.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220324123734.1632625-1-chenglulu@loongson.cn> References: <20220324123734.1632625-1-chenglulu@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf9AxGs04Zjxi3xsPAA--.24342S3 X-Coremail-Antispam: 1UD129KBjvJXoWxCFW8WrWxury7Cr4Dtw47Jwb_yoW5GFyUpr sru3W5Gr4rtFW3XF42v3y8Wr4UtFn7Cw4fuF42vF18Gw12k34DZr1vkwnxXF1jg39ruF1F qFWrCF1j9FZ0gwUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUBF14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_Jr4l82xGYIkIc2 x26xkF7I0E14v26r1Y6r1xM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0 Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UM2 8EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AI xVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20x vE14v26r1Y6r17McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xv r2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkIecxEwVCm-wCF04k20xvY0x 0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E 7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcV C0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF 04k26cxKx2IYs7xG6r4j6FyUMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7 CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUL6p9UUUUU= X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 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, chenglulu , joseph@codesourcery.com Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" * config/picflag.m4: Default add build option '-fpic' for LoongArch. * configure: Add LoongArch tuples. * configure.ac: Like wise. --- config/picflag.m4 | 3 +++ configure | 10 +++++++++- configure.ac | 10 +++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/config/picflag.m4 b/config/picflag.m4 index 8b106f9af88..0aefcf619bf 100644 --- a/config/picflag.m4 +++ b/config/picflag.m4 @@ -44,6 +44,9 @@ case "${$2}" in # sets the default TLS model and affects inlining. $1=-fPIC ;; + loongarch*-*-*) + $1=-fpic + ;; mips-sgi-irix6*) # PIC is the default. ;; diff --git a/configure b/configure index f7e0fa46c9c..4f45340abb6 100755 --- a/configure +++ b/configure @@ -3060,7 +3060,7 @@ case "${ENABLE_GOLD}" in # Check for target supported by gold. case "${target}" in i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \ - | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*) + | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*) configdirs="$configdirs gold" if test x${ENABLE_GOLD} = xdefault; then default_ld=gold @@ -3646,6 +3646,9 @@ case "${target}" in i[3456789]86-*-*) libgloss_dir=i386 ;; + loongarch*-*-*) + libgloss_dir=loongarch + ;; m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) libgloss_dir=m68hc11 ;; @@ -4030,6 +4033,11 @@ case "${target}" in wasm32-*-*) noconfigdirs="$noconfigdirs ld" ;; + loongarch*-*-linux*) + ;; + loongarch*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; esac # If we aren't building newlib, then don't build libgloss, since libgloss diff --git a/configure.ac b/configure.ac index 434b1a267a4..3f0271ca71f 100644 --- a/configure.ac +++ b/configure.ac @@ -353,7 +353,7 @@ case "${ENABLE_GOLD}" in # Check for target supported by gold. case "${target}" in i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \ - | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*) + | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*) configdirs="$configdirs gold" if test x${ENABLE_GOLD} = xdefault; then default_ld=gold @@ -899,6 +899,9 @@ case "${target}" in i[[3456789]]86-*-*) libgloss_dir=i386 ;; + loongarch*-*-*) + libgloss_dir=loongarch + ;; m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) libgloss_dir=m68hc11 ;; @@ -1283,6 +1286,11 @@ case "${target}" in wasm32-*-*) noconfigdirs="$noconfigdirs ld" ;; + loongarch*-*-linux*) + ;; + loongarch*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; esac # If we aren't building newlib, then don't build libgloss, since libgloss