[pptp] Drop compiler optimization level to -O0
Paul Howarth
pghmcfc at fedoraproject.org
Wed Jan 4 14:18:39 UTC 2012
commit d7cf92742a6e0fe91e71470bcb0d061b0b942c81
Author: Paul Howarth <paul at city-fan.org>
Date: Fri Nov 11 12:49:09 2011 +0000
Drop compiler optimization level to -O0
- Drop compiler optimization level to -O0 as per upstream in attempt to
resolve occasional segfault in pptpcm (#749455)
- Add patch to fix highly-parallel build (e.g. -j16)
pptp-1.7.2-parallel-build.patch | 26 ++++++++++++++++++++++++++
pptp.spec | 12 ++++++++++--
2 files changed, 36 insertions(+), 2 deletions(-)
---
diff --git a/pptp-1.7.2-parallel-build.patch b/pptp-1.7.2-parallel-build.patch
new file mode 100644
index 0000000..ebcef8c
--- /dev/null
+++ b/pptp-1.7.2-parallel-build.patch
@@ -0,0 +1,26 @@
+Index: Makefile
+===================================================================
+RCS file: /cvsroot/pptpclient/pptp-linux/Makefile,v
+retrieving revision 1.50
+diff -u -r1.50 Makefile
+--- Makefile 4 Jun 2010 01:04:12 -0000 1.50
++++ Makefile 11 Nov 2011 13:31:16 -0000
+@@ -48,11 +48,13 @@
+ pptpsetup.8: pptpsetup
+ pod2man $? > $@
+
+-config.h:
+- echo "/* text added by Makefile target config.h */" > config.h
+- echo "#define PPTP_LINUX_VERSION \"$(VERSION)$(RELEASE)\"" >> config.h
+- echo "#define PPPD_BINARY \"$(PPPD)\"" >> config.h
+- echo "#define IP_BINARY \"$(IP)\"" >> config.h
++config.h:
++ ( \
++ echo "/* text added by Makefile target config.h */"; \
++ echo "#define PPTP_LINUX_VERSION \"$(VERSION)$(RELEASE)\""; \
++ echo "#define PPPD_BINARY \"$(PPPD)\""; \
++ echo "#define IP_BINARY \"$(IP)\"" \
++ ) > config.h
+
+ vector_test: vector_test.o vector.o
+ $(CC) -o vector_test vector_test.o vector.o
diff --git a/pptp.spec b/pptp.spec
index 289dd08..fa02066 100644
--- a/pptp.spec
+++ b/pptp.spec
@@ -1,6 +1,6 @@
Name: pptp
Version: 1.7.2
-Release: 13%{?dist}
+Release: 13.1%{?dist}
Summary: Point-to-Point Tunneling Protocol (PPTP) Client
Group: Applications/Internet
License: GPLv2+
@@ -19,6 +19,7 @@ Patch8: pptp-1.7.2-conn-free2.patch
Patch9: pptp-1.7.2-call-disconnect-notify.patch
Patch10: pptp-1.7.2-so_mark.patch
Patch11: pptp-1.7.2-nohostroute-option.patch
+Patch12: pptp-1.7.2-parallel-build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
Requires: ppp >= 2.4.2, /sbin/ip
%if 0%{?fedora} > 14
@@ -53,6 +54,7 @@ tunnels.
# Fix Makefile dependencies to support parallel make (applied upstream)
%patch3 -p0 -b .makedeps
+%patch12 -p0 -b .parallel
# Don't check for MPPE capability in kernel or pppd unless we're creating a
# tunnel that requires encryption (applied upstream)
@@ -86,7 +88,8 @@ tunnels.
perl -pi -e 's/install -o root -m 555 pptp/install -m 755 pptp/;' Makefile
%build
-make %{?_smp_mflags} CFLAGS="-Wall %{optflags}" IP=/sbin/ip
+OUR_CFLAGS="$(echo X%{optflags} | sed -e 's/^X//; s/-O[0-9]* /-O0 /')"
+make %{?_smp_mflags} CFLAGS="-Wall $OUR_CFLAGS" IP=/sbin/ip
%install
rm -rf %{buildroot}
@@ -123,6 +126,11 @@ rm -rf %{buildroot}
%{_mandir}/man8/pptpsetup.8*
%changelog
+* Fri Nov 11 2011 Paul Howarth <paul at city-fan.org> 1.7.2-13.1
+- Drop compiler optimization level to -O0 as per upstream in attempt to
+ resolve occasional segfault in pptpcm (#749455)
+- Add patch to fix highly-parallel build (e.g. -j16)
+
* Tue Nov 8 2011 Paul Howarth <paul at city-fan.org> 1.7.2-13
- Patch to fix broken Call-Disconnect-Notify code accepted upstream
- Add upstream patch to support setting SO_MARK for the PPTP TCP control
More information about the scm-commits
mailing list