diff --git a/squid.spec b/squid.spec index 7797e99..706438e 100644 --- a/squid.spec +++ b/squid.spec @@ -88,8 +88,9 @@ perl -p -i -e 's|%{_prefix}/local/bin/perl|%{_bindir}/perl|' `find -name "*.pl"` chmod a-x CREDITS %build -export CFLAGS="%{optflags} -DOPENSSL_LOAD_CONF" -export CXXFLAGS="%{optflags} -DOPENSSL_LOAD_CONF" +export CFLAGS="%{optflags} -fPIE -fPIC -DOPENSSL_LOAD_CONF" +export CXXFLAGS="%{optflags} -fPIE -fPIC -DOPENSSL_LOAD_CONF" +export LDFLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro,-z,now -pie" %configure \ --disable-strict-error-checking \ --sysconfdir=%{squidconfdir} \