[squid] Use -fPIC instead of -fpie to keep libtool happy
Henrik Nordström
hno at fedoraproject.org
Tue Mar 17 02:18:37 UTC 2015
commit b10ea1ad1af585cd2f258000809298aae6340ab8
Author: Henrik Nordstrom <henrik at henriknordstrom.net>
Date: Tue Mar 17 03:14:46 2015 +0100
Use -fPIC instead of -fpie to keep libtool happy
libtool builds some internal table wrongly when using -fpie.
squid-3.2.0.9-fpic.patch | 36 ------------------------------------
squid.spec | 27 +++++++++++++--------------
2 files changed, 13 insertions(+), 50 deletions(-)
---
diff --git a/squid.spec b/squid.spec
index e5d230a..55cb407 100644
--- a/squid.spec
+++ b/squid.spec
@@ -2,7 +2,7 @@
Name: squid
Version: 3.5.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The Squid proxy caching server
Epoch: 7
# See CREDITS for breakdown of non GPLv2+ code
@@ -30,7 +30,6 @@ Source98: perl-requires-squid.sh
Patch201: squid-3.1.0.9-config.patch
Patch202: squid-3.1.0.9-location.patch
Patch203: squid-3.0.STABLE1-perlpath.patch
-Patch204: squid-3.2.0.9-fpic.patch
Patch205: squid-3.1.9-ltdl.patch
Patch206: active-ftp.patch
Patch207: squid-3.5.2-sbufstats.patch
@@ -91,23 +90,18 @@ lookup program (dnsserver), a program for retrieving FTP data
%patch201 -p1 -b .config
%patch202 -p1 -b .location
%patch203 -p1 -b .perlpath
-# Fails on 3.5.1
-#%patch204 -p1 -b .fpic
-# Fails on 3.5.1
+# Fails on 3.5.1.
#%patch205 -p1 -b .ltdl
# Fails on 3.5.1
#%patch206 -p1 -b .active-ftp
%patch207 -p1 -b .sbufstats
%build
-%ifarch sparcv9 sparc64 s390 s390x
- CXXFLAGS="$RPM_OPT_FLAGS -fPIE" \
- CFLAGS="$RPM_OPT_FLAGS -fPIE" \
-%else
- CXXFLAGS="$RPM_OPT_FLAGS -fpie" \
- CFLAGS="$RPM_OPT_FLAGS -fpie" \
-%endif
-LDFLAGS="$RPM_LD_FLAGS -pie -Wl,-z,relro -Wl,-z,now"
+
+# libtool fails somewhat on -fpie. PIC also works for -pie
+CXXFLAGS="$RPM_OPT_FLAGS -fPIC"
+CFLAGS="$RPM_OPT_FLAGS -fPIC"
+LDFLAGS="$RPM_LD_FLAGS -pie -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel"
%configure \
--exec_prefix=%{_prefix} \
@@ -151,7 +145,8 @@ LDFLAGS="$RPM_LD_FLAGS -pie -Wl,-z,relro -Wl,-z,now"
--with-dl \
--with-openssl \
--with-pthreads \
- --disable-arch-native
+ --disable-arch-native \
+ --with-pic
make \
DEFAULT_SWAP_DIR=%{_localstatedir}/spool/squid \
@@ -294,6 +289,10 @@ fi
%changelog
+* Tue Mar 15 2015 Henrik Nordstrom <henrik at henriknordstrom.net> - 7:3.5.2-3
+- Correct execmod build issue caused by libtool confusion on
+ required compiler flags
+
* Sun Mar 15 2015 Henrik Nordstrom <henrik at henriknordstrom.net> - 7:3.5.2-2
- Update to latest upstream version 3.5.2
- Remove deprecated (and renamed) squid_msnt_auth basic auth helper. Only
More information about the scm-commits
mailing list