public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Chenghua Xu <xuchenghua@loongson.cn>
To: gcc-patches@gcc.gnu.org
Cc: paul.hua.gm@gmail.com, xuchenghua@loongson.cn, chenglulu@loongson.cn
Subject: [PATCH v1 7/7] LoongArch Port: Regenerate configure
Date: Sat,  6 Nov 2021 16:40:56 +0800	[thread overview]
Message-ID: <20211106084056.2506166-8-xuchenghua@loongson.cn> (raw)
In-Reply-To: <20211106084056.2506166-1-xuchenghua@loongson.cn>

From: chenglulu <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         | 12 +++++++++++-
 configure.ac      | 10 +++++++++-
 3 files changed, 23 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 58979d6e3b1..fcdb8b3d1b9 100755
--- a/configure
+++ b/configure
@@ -3052,7 +3052,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
@@ -3638,6 +3638,9 @@ case "${target}" in
   i[3456789]86-*-*)
     libgloss_dir=i386
     ;;
+  loongarch*-*-*)
+    libgloss_dir=loongarch
+    ;;
   m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
     libgloss_dir=m68hc11
     ;;
@@ -4022,6 +4025,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
@@ -10083,6 +10091,8 @@ done
 
 
 
+
+
 # Generate default definitions for YACC, M4, LEX and other programs that run
 # on the build machine.  These are used if the Makefile can't locate these
 # programs in objdir.
diff --git a/configure.ac b/configure.ac
index 550e6993b59..8d1cf5eaf27 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


  parent reply	other threads:[~2021-11-06  8:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-06  8:40 [PATCH v1 0/7] Add LoongArch support Chenghua Xu
2021-11-06  8:40 ` [PATCH v1 2/7] LoongArch Port: Regenerate gcc/configure Chenghua Xu
2021-11-06  8:40 ` [PATCH v1 3/7] LoongArch Port: libgcc Chenghua Xu
2021-11-06  9:46   ` Xi Ruoyao
2021-11-06  8:40 ` [PATCH v1 4/7] LoongArch Port: Regenerate libgcc/configure Chenghua Xu
2021-11-06  8:40 ` [PATCH v1 5/7] LoongArch Port: libgomp Chenghua Xu
2021-11-06  9:58   ` Xi Ruoyao
2021-11-06  8:40 ` [PATCH v1 6/7] LoongArch Port: gcc/testsuite Chenghua Xu
2021-11-06  9:51   ` Xi Ruoyao
2021-11-06  8:40 ` Chenghua Xu [this message]
2021-11-06  9:18 ` [PATCH v1 0/7] Add LoongArch support Xi Ruoyao
     [not found] ` <20211106084056.2506166-2-xuchenghua@loongson.cn>
2021-11-08  2:30   ` [PATCH v1 1/7] LoongArch Port: gcc Chenghua Xu
2021-11-08 16:40     ` Xi Ruoyao
2021-11-08 23:14     ` Joseph Myers
2021-11-09 13:53       ` Xi Ruoyao
2021-11-09 15:52         ` Xi Ruoyao
2021-11-09 18:31           ` Xi Ruoyao

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=20211106084056.2506166-8-xuchenghua@loongson.cn \
    --to=xuchenghua@loongson.cn \
    --cc=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=paul.hua.gm@gmail.com \
    /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).