diff --git a/libreswan.spec b/libreswan.spec index 09a2838..8699fdc 100644 --- a/libreswan.spec +++ b/libreswan.spec @@ -111,6 +111,7 @@ sed -i "s:#[ ]*include \(.*\)\(/crypto-policies/back-ends/libreswan.config\)$:in %build +# link flags disable hardening because it fails on arm with what looks like gcc bugs in -Werror=lto-type-mismatch make %{?_smp_mflags} \ %if 0%{with_development} OPTIMIZE_CFLAGS="%{?_hardened_cflags}" \ @@ -120,8 +121,8 @@ make %{?_smp_mflags} \ %if 0%{with_efence} USE_EFENCE=true \ %endif - WERROR_CFLAGS="-Werror -Wno-missing-field-initializers -Wno-lto-type-mismatch" \ - USERLINK="%{?__global_ldflags}" \ + WERROR_CFLAGS="-Werror -Wno-missing-field-initializers -Wno-lto-type-mismatch -Wno-maybe-uninitialized" \ + USERLINK="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -flto --no-lto" \ %{libreswan_config} \ programs FS=$(pwd)