Message ID | 20220906121614.1968627-1-jcmvbkbc@gmail.com |
---|---|
State | New |
Headers | show |
Series | [COMMITTED] xtensa: gcc: add static PIE support | expand |
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}"