summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-11-08 18:46:08 +0100
committerRemi Collet <fedora@famillecollet.com>2013-11-08 18:46:08 +0100
commit6d668eeb928999737b989eed5bfef5a683e11b95 (patch)
tree3c371fc47a3c6ea980113841e65db2170fe45395
parentb26d9a2c05a6fac857c30156b246576aa60536de (diff)
php: add --with debug option for debug build
-rw-r--r--Makefile4
-rw-r--r--php-wip.patch24
-rw-r--r--php55.spec20
3 files changed, 44 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d095534..7aca750 100644
--- a/Makefile
+++ b/Makefile
@@ -8,3 +8,7 @@ include ../../common/Makefile
tembed: tembed.c
gcc -Wall $(INCL1) $(INCL2) tembed.c $(LIBS) -o tembed
+
+debug:
+ time rpmbuild $(RPMDEFINES) --with debug -bb $(NAME).spec
+
diff --git a/php-wip.patch b/php-wip.patch
index af82ce6..0fcc0e7 100644
--- a/php-wip.patch
+++ b/php-wip.patch
@@ -102,3 +102,27 @@ index 8cee80f..72b5a1b 100644
--
1.8.4.rc3
+diff -up ext/date/lib/parse_iso_intervals.c.old ext/date/lib/parse_iso_intervals.c
+--- a/ext/date/lib/parse_iso_intervals.c.old 2013-11-08 18:22:12.225586458 +0100
++++ b/ext/date/lib/parse_iso_intervals.c 2013-11-08 18:22:47.484721897 +0100
+@@ -380,7 +380,7 @@ yy6:
+ break;
+ }
+ ptr++;
+- } while (*ptr);
++ } while (!s->errors->error_count && *ptr);
+ s->have_period = 1;
+ TIMELIB_DEINIT;
+ return TIMELIB_PERIOD;
+diff -up ext/date/lib/parse_iso_intervals.re.old ext/date/lib/parse_iso_intervals.re
+--- a/ext/date/lib/parse_iso_intervals.re.old 2013-11-08 18:09:18.815549958 +0100
++++ b/ext/date/lib/parse_iso_intervals.re 2013-11-08 18:09:34.461608419 +0100
+@@ -348,7 +348,7 @@ isoweek = year4 "-"? "W" weekof
+ break;
+ }
+ ptr++;
+- } while (*ptr);
++ } while (!s->errors->error_count && *ptr);
+ s->have_period = 1;
+ TIMELIB_DEINIT;
+ return TIMELIB_PERIOD;
diff --git a/php55.spec b/php55.spec
index 6557c2f..2bcd7c0 100644
--- a/php55.spec
+++ b/php55.spec
@@ -39,6 +39,9 @@
# Build ZTS extension or only NTS
%global with_zts 1
+# Debuild build
+%global with_debug %{?_with_debug:1}%{!?_with_debug:0}
+
%if 0%{?__isa_bits:1}
%global isasuffix -%{__isa_bits}
%else
@@ -103,7 +106,7 @@ Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: 5.5.6
%if 0%{?snapdate:1}%{?rcver:1}
-Release: 0.5.%{?snapdate}%{?rcver}%{?dist}
+Release: 0.6.%{?snapdate}%{?rcver}%{?dist}
%else
Release: 2%{?dist}
%endif
@@ -1000,11 +1003,14 @@ cat `aclocal --print-ac-dir`/libtool.m4 > build/libtool.m4
# Regenerate configure scripts (patches change config.m4's)
touch configure.in
./buildconf --force
+%if %{with_debug}
+LDFLAGS="-fsanitize=address"
+export LDFLAGS
+CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign -fsanitize=address -ggdb"
+%else
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign"
-#CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign -fsanitize=address -ggdb"
+%endif
export CFLAGS
-#LDFLAGS="-fsanitize=address"
-#export LDFLAGS
# Install extension modules in %{_libdir}/php/modules.
EXTENSION_DIR=%{_libdir}/php/modules; export EXTENSION_DIR
@@ -1065,6 +1071,9 @@ ln -sf ../configure
%if %{with_dtrace}
--enable-dtrace \
%endif
+%if %{with_debug}
+ --enable-debug \
+%endif
$*
if test $? != 0; then
tail -500 config.log
@@ -1848,6 +1857,9 @@ fi
%changelog
+* Fri Nov 8 2013 Remi Collet <remi@fedoraproject.org> 5.5.6-0.6.RC1
+- add --with debug option for debug build
+
* Wed Nov 6 2013 Remi Collet <remi@fedoraproject.org> 5.5.6-0.5.RC1
- test buid with opcache changes reverted