From: Max Filippov Date: Sat, 13 Aug 2022 04:02:15 +0000 (-0700) Subject: xtensa: gcc: add static PIE support X-Git-Tag: basepoints/gcc-14~4708 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e0c2696724d4d004ea189a69f15781c7baa68e1;p=thirdparty%2Fgcc.git xtensa: gcc: add static PIE support gcc/ * config/xtensa/linux.h (LINK_SPEC): Add static-pie. --- 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}"