public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] RTEMS: Add -ftls-model=local-exec to multilibs
Date: Thu, 21 Jul 2022 07:35:43 +0200	[thread overview]
Message-ID: <20220721053543.15853-1-sebastian.huber@embedded-brains.de> (raw)

Use the local-exec TLS model for all multilibs of all RTEMS targets with proper
TLS support.

gcc/ChangeLog:

	* config/arm/t-rtems (MULTILIB_EXTRA_OPTS): Define to use
	-ftls-model=local-exec.
	* config/i386/t-rtems (MULTILIB_EXTRA_OPTS): Likewise.
	* config/m68k/t-rtems (MULTILIB_EXTRA_OPTS): Likewise.
	* config/microblaze/t-rtems (MULTILIB_EXTRA_OPTS): Likewise.
	* config/nios2/t-rtems (MULTILIB_EXTRA_OPTS): Likewise.
	* config/riscv/t-rtems (MULTILIB_EXTRA_OPTS): Likewise.
	* config/rs6000/t-rtems (MULTILIB_EXTRA_OPTS): Likewise.
	* config/sparc/t-rtems (MULTILIB_EXTRA_OPTS): Likewise.
---
 gcc/config/arm/t-rtems        | 1 +
 gcc/config/i386/t-rtems       | 1 +
 gcc/config/m68k/t-rtems       | 1 +
 gcc/config/microblaze/t-rtems | 1 +
 gcc/config/nios2/t-rtems      | 1 +
 gcc/config/riscv/t-rtems      | 2 ++
 gcc/config/rs6000/t-rtems     | 1 +
 gcc/config/sparc/t-rtems      | 2 ++
 8 files changed, 10 insertions(+)

diff --git a/gcc/config/arm/t-rtems b/gcc/config/arm/t-rtems
index b2fcf572bca..aaf11355b11 100644
--- a/gcc/config/arm/t-rtems
+++ b/gcc/config/arm/t-rtems
@@ -8,6 +8,7 @@ MULTILIB_EXCEPTIONS	=
 MULTILIB_REUSE		=
 MULTILIB_MATCHES	=
 MULTILIB_REQUIRED	=
+MULTILIB_EXTRA_OPTS	= ftls-model=local-exec
 
 # Enumeration of multilibs
 
diff --git a/gcc/config/i386/t-rtems b/gcc/config/i386/t-rtems
index 692c99484b3..83b95a6e53d 100644
--- a/gcc/config/i386/t-rtems
+++ b/gcc/config/i386/t-rtems
@@ -24,3 +24,4 @@ MULTILIB_MATCHES += march?pentium=march?k6 march?pentiumpro=march?athlon
 MULTILIB_EXCEPTIONS = \
 march=pentium/*msoft-float* \
 march=pentiumpro/*msoft-float*
+MULTILIB_EXTRA_OPTS = ftls-model=local-exec
diff --git a/gcc/config/m68k/t-rtems b/gcc/config/m68k/t-rtems
index 0997afebc94..53a585e3018 100644
--- a/gcc/config/m68k/t-rtems
+++ b/gcc/config/m68k/t-rtems
@@ -7,3 +7,4 @@ M68K_MLIB_CPU += && (match(MLIB, "^68") \
 		     || MLIB == "5329" \
 		     || MLIB == "5407" \
 		     || MLIB == "5475")
+MULTILIB_EXTRA_OPTS = ftls-model=local-exec
diff --git a/gcc/config/microblaze/t-rtems b/gcc/config/microblaze/t-rtems
index d0c38261aaa..c9c9716ab62 100644
--- a/gcc/config/microblaze/t-rtems
+++ b/gcc/config/microblaze/t-rtems
@@ -1 +1,2 @@
 # Custom multilibs for RTEMS
+MULTILIB_EXTRA_OPTS = ftls-model=local-exec
diff --git a/gcc/config/nios2/t-rtems b/gcc/config/nios2/t-rtems
index beda8328bd2..3c9fbc69c83 100644
--- a/gcc/config/nios2/t-rtems
+++ b/gcc/config/nios2/t-rtems
@@ -8,6 +8,7 @@ MULTILIB_EXCEPTIONS	=
 MULTILIB_REUSE		=
 MULTILIB_MATCHES	=
 MULTILIB_REQUIRED	=
+MULTILIB_EXTRA_OPTS	= ftls-model=local-exec
 
 # Enumeration of multilibs
 
diff --git a/gcc/config/riscv/t-rtems b/gcc/config/riscv/t-rtems
index 41f5927fc87..bb49e559ec5 100644
--- a/gcc/config/riscv/t-rtems
+++ b/gcc/config/riscv/t-rtems
@@ -1,3 +1,5 @@
+MULTILIB_EXTRA_OPTS	= ftls-model=local-exec
+
 MULTILIB_OPTIONS	=
 MULTILIB_DIRNAMES	=
 
diff --git a/gcc/config/rs6000/t-rtems b/gcc/config/rs6000/t-rtems
index 4f8c147be3e..ba7177bf0f5 100644
--- a/gcc/config/rs6000/t-rtems
+++ b/gcc/config/rs6000/t-rtems
@@ -23,6 +23,7 @@ MULTILIB_DIRNAMES =
 MULTILIB_MATCHES =
 MULTILIB_EXCEPTIONS =
 MULTILIB_REQUIRED =
+MULTILIB_EXTRA_OPTS = ftls-model=local-exec
 
 MULTILIB_OPTIONS += mcpu=403/mcpu=505/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400/mcpu=8540/mcpu=e6500
 MULTILIB_DIRNAMES += m403 m505 m603e m604 m860 m7400 m8540 me6500
diff --git a/gcc/config/sparc/t-rtems b/gcc/config/sparc/t-rtems
index c58836c1e96..1917eda322e 100644
--- a/gcc/config/sparc/t-rtems
+++ b/gcc/config/sparc/t-rtems
@@ -17,6 +17,8 @@
 # <http://www.gnu.org/licenses/>.
 #
 
+MULTILIB_EXTRA_OPTS = ftls-model=local-exec
+
 MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3/mcpu=leon3v7/mcpu=leon \
 		   mfix-ut699/mfix-at697f/mfix-gr712rc
 MULTILIB_DIRNAMES = soft v8 leon3 leon3v7 leon ut699 at697f gr712rc
-- 
2.35.3


                 reply	other threads:[~2022-07-21  5:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220721053543.15853-1-sebastian.huber@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=gcc-patches@gcc.gnu.org \
    /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).