From c233ff19f313adc3442363f7f10df4e0481c4069 Mon Sep 17 00:00:00 2001 From: Paul Wouters Date: Mon, 28 Sep 2020 01:25:53 -0400 Subject: [PATCH] temporarilly skip %{?__global_ldflags} to avoid gcc errors on armv7 related to link lto-type-mismatch errors. --- libreswan.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)