public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED] xtensa: gcc: add static PIE support
@ 2022-09-06 12:16 Max Filippov
  0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2022-09-06 12:16 UTC (permalink / raw)
  To: gcc-patches; +Cc: Max Filippov

gcc/
	* config/xtensa/linux.h (LINK_SPEC): Add static-pie.
---
 gcc/config/xtensa/linux.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h
index 540e4bf538f8..bc7bee71517d 100644
--- a/gcc/config/xtensa/linux.h
+++ b/gcc/config/xtensa/linux.h
@@ -54,9 +54,10 @@ along with GCC; see the file COPYING3.  If not see
 #define LINK_SPEC \
  "%{shared:-shared} \
   %{!shared: \
-    %{!static: \
+    %{!static:%{!static-pie: \
       %{rdynamic:-export-dynamic} \
-      -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
+      -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
+    %{static-pie:-static -pie --no-dynamic-linker -z text} \
     %{static:-static}} \
   %{mabi=windowed:--abi-windowed} \
   %{mabi=call0:--abi-call0}"
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-06 12:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06 12:16 [COMMITTED] xtensa: gcc: add static PIE support Max Filippov

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).