Use -fPIC instead of -fpie to keep libtool happy
libtool builds some internal table wrongly when using -fpie.
This commit is contained in:
parent
552b3cdd99
commit
b10ea1ad1a
@ -1,36 +0,0 @@
|
||||
diff -up squid-3.4.3/compat/Makefile.in.fpic squid-3.4.3/compat/Makefile.in
|
||||
--- squid-3.4.3/compat/Makefile.in.fpic 2014-02-02 09:42:12.000000000 +0100
|
||||
+++ squid-3.4.3/compat/Makefile.in 2014-02-04 00:48:38.666316042 +0100
|
||||
@@ -677,7 +677,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-AM_CFLAGS = $(SQUID_CFLAGS)
|
||||
+AM_CFLAGS = $(SQUID_CFLAGS) -fPIC
|
||||
AM_CXXFLAGS = $(SQUID_CXXFLAGS)
|
||||
CLEANFILES = testHeaders
|
||||
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/lib \
|
||||
diff -up squid-3.4.3/snmplib/Makefile.am.fpic squid-3.4.3/snmplib/Makefile.am
|
||||
--- squid-3.4.3/snmplib/Makefile.am.fpic 2014-02-04 00:48:38.666316042 +0100
|
||||
+++ squid-3.4.3/snmplib/Makefile.am 2014-02-04 00:50:09.017139167 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
##
|
||||
## Makefile for libsnmp.
|
||||
##
|
||||
-AM_CFLAGS = $(SQUID_CFLAGS)
|
||||
+AM_CFLAGS = $(SQUID_CFLAGS) -fPIC
|
||||
AM_CXXFLAGS = $(SQUID_CXXFLAGS)
|
||||
noinst_LTLIBRARIES = libsnmplib.la
|
||||
libsnmplib_la_SOURCES = asn1.c parse.c snmp_vars.c \
|
||||
diff -up squid-3.4.3/snmplib/Makefile.in.fpic squid-3.4.3/snmplib/Makefile.in
|
||||
--- squid-3.4.3/snmplib/Makefile.in.fpic 2014-02-04 00:48:38.667316039 +0100
|
||||
+++ squid-3.4.3/snmplib/Makefile.in 2014-02-04 00:56:24.497249891 +0100
|
||||
@@ -434,7 +434,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-AM_CFLAGS = $(SQUID_CFLAGS)
|
||||
+AM_CFLAGS = $(SQUID_CFLAGS) -fPIC
|
||||
AM_CXXFLAGS = $(SQUID_CXXFLAGS)
|
||||
noinst_LTLIBRARIES = libsnmplib.la
|
||||
libsnmplib_la_SOURCES = asn1.c parse.c snmp_vars.c \
|
27
squid.spec
27
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@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@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
|
||||
|
Loading…
Reference in New Issue
Block a user