public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: chenglulu <chenglulu@loongson.cn>
To: gcc-patches@gcc.gnu.org
Cc: xuchenghua@loongson.cn, yangyujie@loongson.cn, chenglulu@loongson.cn
Subject: [PATCH v4 01/12] LoongArch Port: Regenerate configure
Date: Fri, 24 Dec 2021 17:28:06 +0800	[thread overview]
Message-ID: <20211224092817.728490-2-chenglulu@loongson.cn> (raw)
In-Reply-To: <20211224092817.728490-1-chenglulu@loongson.cn>

        * 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
-- 
2.27.0


  reply	other threads:[~2021-12-24  9:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24  9:28 [PATCH v4 00/12] Add LoongArch support chenglulu
2021-12-24  9:28 ` chenglulu [this message]
2021-12-24  9:28 ` [PATCH v4 02/12] LoongArch Port: gcc build chenglulu
2021-12-24  9:28 ` [PATCH v4 03/12] LoongArch Port: Regenerate gcc/configure chenglulu
2021-12-24  9:28 ` [PATCH v4 04/12] LoongArch Port: Machine Decsription files chenglulu
2022-01-06 17:54   ` Xi Ruoyao
2022-01-07 11:36     ` 程璐璐
2021-12-24  9:28 ` [PATCH v4 05/12] LoongArch Port: Machine description C files and .h files chenglulu
2021-12-24  9:28 ` [PATCH v4 06/12] LoongArch Port: Builtin functions chenglulu
2021-12-24  9:28 ` [PATCH v4 07/12] LoongArch Port: Builtin macros chenglulu
2021-12-24  9:28 ` [PATCH v4 08/12] LoongArch Port: libgcc chenglulu
2021-12-24  9:28 ` [PATCH v4 09/12] LoongArch Port: Regenerate libgcc/configure chenglulu
2021-12-24  9:28 ` [PATCH v4 10/12] LoongArch Port: libgomp chenglulu
2021-12-24  9:28 ` [PATCH v4 11/12] LoongArch Port: gcc/testsuite chenglulu
2021-12-24  9:28 ` [PATCH v4 12/12] LoongArch Port: Add doc chenglulu
2022-01-05 14:13 ` [PATCH v4 00/12] Add LoongArch support Paul Hua

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211224092817.728490-2-chenglulu@loongson.cn \
    --to=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=xuchenghua@loongson.cn \
    --cc=yangyujie@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).