Update libtool hardening hack and re-enable (#978949)
This commit is contained in:
parent
33b9cbdc67
commit
6c38f18be2
15
macros
15
macros
@ -29,8 +29,9 @@
|
||||
#==============================================================================
|
||||
# ---- configure and makeinstall.
|
||||
#
|
||||
%_configure_libtool_hardening_hack 1
|
||||
%_configure ./configure
|
||||
%configure(--:-:ChnqV) \
|
||||
%configure \
|
||||
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
|
||||
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
||||
FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
|
||||
@ -39,6 +40,10 @@
|
||||
for i in $(find . -name config.guess -o -name config.sub) ; do \
|
||||
[ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \
|
||||
done ; \
|
||||
[ "%_configure_libtool_hardening_hack" = 1 ] && [ x != "x%{_hardened_ldflags}" ] && \
|
||||
for i in $(find . -name ltmain.sh) ; do \
|
||||
%{__sed} -i.backup -e 's~compiler_flags=$~compiler_flags="%{_hardened_ldflags}"~' $i \
|
||||
done ; \
|
||||
%{_configure} --build=%{_build} --host=%{_host} \\\
|
||||
--program-prefix=%{?_program_prefix} \\\
|
||||
--disable-dependency-tracking \\\
|
||||
@ -54,12 +59,7 @@
|
||||
--localstatedir=%{_localstatedir} \\\
|
||||
--sharedstatedir=%{_sharedstatedir} \\\
|
||||
--mandir=%{_mandir} \\\
|
||||
--infodir=%{_infodir} \\\
|
||||
%{**} ; \
|
||||
[[ -f ./libtool && "x%{?%_hardened_ldflags}" != "x" ]] && \\\
|
||||
sed -i \\\
|
||||
-e 's! \\\\\\$compiler_flags !&%{?%_hardened_ldflags} !g' \\\
|
||||
./libtool ;
|
||||
--infodir=%{_infodir}
|
||||
|
||||
%makeinstall \
|
||||
%{__make} \\\
|
||||
@ -179,6 +179,7 @@ package or when debugging this package.\
|
||||
%__find_requires /usr/lib/rpm/redhat/find-requires
|
||||
|
||||
%_hardening_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
|
||||
# we don't escape symbols '~', '"', etc. so be careful when changing this
|
||||
%_hardening_ldflags -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
|
||||
|
||||
#_hardened_build 0
|
||||
|
Loading…
Reference in New Issue
Block a user