diff options
-rw-r--r-- | gcc/config/riscv/linux.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h index 7323ff3..8901671 100644 --- a/gcc/config/riscv/linux.h +++ b/gcc/config/riscv/linux.h @@ -55,9 +55,10 @@ along with GCC; see the file COPYING3. If not see %{shared} \ %{!shared: \ %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \ - %{static:-static}}" + %{!static-pie: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ + %{static:-static} %{static-pie:-static -pie --no-dynamic-linker -z text}}" #define STARTFILE_PREFIX_SPEC \ "/lib" XLEN_SPEC "/" ABI_SPEC "/ " \ |