public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stefan Liebler <stli@linux.ibm.com>
To: libc-alpha@sourceware.org
Cc: Stefan Liebler <stli@linux.ibm.com>
Subject: [PATCH] S390: Always enable static PIE if build with lld.
Date: Mon, 19 Feb 2024 16:49:31 +0100	[thread overview]
Message-ID: <20240219154931.653686-1-stli@linux.ibm.com> (raw)

LLVM ld.lld now	also supports s390x and avoids unnecessary TPOFF
relocations for position independent executables.  Both recent
commits were also cherry-picked to LLVM 18.

This patch just enables static PIE if build with lld.
---
 sysdeps/s390/s390-64/configure    | 10 ++++++++--
 sysdeps/s390/s390-64/configure.ac | 10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/sysdeps/s390/s390-64/configure b/sysdeps/s390/s390-64/configure
index 824ae9c129..c26785f32f 100644
--- a/sysdeps/s390/s390-64/configure
+++ b/sysdeps/s390/s390-64/configure
@@ -12,8 +12,14 @@ case $($LD --version) in
     libc_cv_s390x_staticpie_req_version=no
     ;;
   "LLD"*)
-    # As of 2023-08-07, there is no lld which supports s390x.
-    libc_cv_s390x_staticpie_req_version=no
+    # The required lld patches are available with LLVM 18:
+    # - [lld] Add target support for SystemZ (s390x) #75643
+    # https://github.com/llvm/llvm-project/pull/75643
+    # 2024-02-13: https://github.com/llvm/llvm-project/commit/fe3406e349884e4ef61480dd0607f1e237102c74
+    # - [lld/ELF] Avoid unnecessary TPOFF relocations in GOT for -pie #81739
+    # https://github.com/llvm/llvm-project/pull/81739
+    # 2024-02-14: https://github.com/llvm/llvm-project/commit/6f907733e65d24edad65f763fb14402464bd578b
+    libc_cv_s390x_staticpie_req_version=yes
     ;;
   *)
     # The required binutils patches are available with bintuils 2.39
diff --git a/sysdeps/s390/s390-64/configure.ac b/sysdeps/s390/s390-64/configure.ac
index 4657de0d37..2b5bffc107 100644
--- a/sysdeps/s390/s390-64/configure.ac
+++ b/sysdeps/s390/s390-64/configure.ac
@@ -12,8 +12,14 @@ case $($LD --version) in
     libc_cv_s390x_staticpie_req_version=no
     ;;
   "LLD"*)
-    # As of 2023-08-07, there is no lld which supports s390x.
-    libc_cv_s390x_staticpie_req_version=no
+    # The required lld patches are available with LLVM 18:
+    # - [lld] Add target support for SystemZ (s390x) #75643
+    # https://github.com/llvm/llvm-project/pull/75643
+    # 2024-02-13: https://github.com/llvm/llvm-project/commit/fe3406e349884e4ef61480dd0607f1e237102c74
+    # - [lld/ELF] Avoid unnecessary TPOFF relocations in GOT for -pie #81739
+    # https://github.com/llvm/llvm-project/pull/81739
+    # 2024-02-14: https://github.com/llvm/llvm-project/commit/6f907733e65d24edad65f763fb14402464bd578b
+    libc_cv_s390x_staticpie_req_version=yes
     ;;
   *)
     # The required binutils patches are available with bintuils 2.39
-- 
2.43.0


             reply	other threads:[~2024-02-19 15:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 15:49 Stefan Liebler [this message]
2024-02-20 14:49 ` Adhemerval Zanella Netto
2024-02-21  7:51   ` Stefan Liebler
2024-02-21 15:05     ` Stefan Liebler

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=20240219154931.653686-1-stli@linux.ibm.com \
    --to=stli@linux.ibm.com \
    --cc=libc-alpha@sourceware.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).