diff --git a/patches/gcc-8.3.0/0012-static-pie.diff b/patches/gcc-8.3.0/0012-static-pie.diff index acd5eb8..c0fcf07 100644 --- a/patches/gcc-8.3.0/0012-static-pie.diff +++ b/patches/gcc-8.3.0/0012-static-pie.diff @@ -105,7 +105,7 @@ index eb1610ba8b0..87560afb03c 100644 #ifdef HAVE_LD_PIE #ifndef LD_PIE_SPEC -#define LD_PIE_SPEC "-pie" -+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}" ++#define LD_PIE_SPEC "-pie %{static-pie:-static} %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}" #endif #else #define LD_PIE_SPEC "" diff --git a/patches/gcc-9.2.0/0012-static-pie.diff b/patches/gcc-9.2.0/0012-static-pie.diff index ec3a4e6..400d7a1 100644 --- a/patches/gcc-9.2.0/0012-static-pie.diff +++ b/patches/gcc-9.2.0/0012-static-pie.diff @@ -74,7 +74,7 @@ index d185c01b257..5d3f81c5fc5 100644 #ifdef HAVE_LD_PIE #ifndef LD_PIE_SPEC -#define LD_PIE_SPEC "-pie" -+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}" ++#define LD_PIE_SPEC "-pie %{static-pie:-static} %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}" #endif #else #define LD_PIE_SPEC ""