From patchwork Sat Feb 12 03:11:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenghua Xu X-Patchwork-Id: 51067 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 24FC63857C4F for ; Sat, 12 Feb 2022 03:13:05 +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 D9DA03857C66 for ; Sat, 12 Feb 2022 03:12:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D9DA03857C66 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 AQAAf9DxCMpvJQdiDb4AAA--.1257S3; Sat, 12 Feb 2022 11:12:17 +0800 (CST) From: xuchenghua@loongson.cn To: gcc-patches@gcc.gnu.org Subject: [PATCH v7 01/12] LoongArch Port: Regenerate configure Date: Sat, 12 Feb 2022 11:11:31 +0800 Message-Id: <20220212031142.1165933-2-xuchenghua@loongson.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220212031142.1165933-1-xuchenghua@loongson.cn> References: <20220212031142.1165933-1-xuchenghua@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf9DxCMpvJQdiDb4AAA--.1257S3 X-Coremail-Antispam: 1UD129KBjvJXoWxCFW8WrWxur43Zr13JFW7twb_yoW5XFWrpF sru3W5KF4rtFW3XFsFv3y8Wr4jyFn2ka1fuF42vF18J342k34DZr1vywnxXr1j939ruF4F qFWrCF1j9FZ8KrJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIj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CC_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: chenglulu@loongson.cn, xuchenghua@loongson.cn, joseph@codesourcery.com Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: chenglulu 2022-02-12 Chenghua Xu Lulu Cheng * 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 9c2d7df1bb2..87548f0da96 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 68cc5cc31fe..55362afeeae 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