Mon Jul 16 10:58:50 2018 UTC ()
php*: disable global regs on i386.
Fixes PR pkg/53222 that resurfaced

Remove the previous workaround to add GCC_REQD, which isn't sufficient
any more, possibly due to enabling ssp/fortify?

XXX bumping PKGREVISION might not be sufficient, for the same reason the
GCC_REQD had to be moved to Makefile.php, it affects modules too.


(maya)
diff -r1.10 -r1.11 pkgsrc/lang/php70/Makefile
diff -r1.7 -r1.8 pkgsrc/lang/php70/Makefile.php
diff -r1.13 -r1.14 pkgsrc/lang/php71/Makefile
diff -r1.6 -r1.7 pkgsrc/lang/php71/Makefile.php
diff -r1.8 -r1.9 pkgsrc/lang/php72/Makefile
diff -r1.4 -r1.5 pkgsrc/lang/php72/Makefile.php

cvs diff -r1.10 -r1.11 pkgsrc/lang/php70/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/php70/Attic/Makefile 2017/10/27 08:46:49 1.10
+++ pkgsrc/lang/php70/Attic/Makefile 2018/07/16 10:58:50 1.11
@@ -1,20 +1,21 @@ @@ -1,20 +1,21 @@
1# $NetBSD: Makefile,v 1.10 2017/10/27 08:46:49 taca Exp $ 1# $NetBSD: Makefile,v 1.11 2018/07/16 10:58:50 maya Exp $
2 2
3# 3#
4# We can't omit PKGNAME here to handle PKG_OPTIONS. 4# We can't omit PKGNAME here to handle PKG_OPTIONS.
5# 5#
6PKGNAME= php-${PHP_VERSION} 6PKGNAME= php-${PHP_VERSION}
7CATEGORIES= lang 7CATEGORIES= lang
 8PKGREVISION= 1
8 9
9HOMEPAGE= http://www.php.net/ 10HOMEPAGE= http://www.php.net/
10COMMENT= PHP Hypertext Preprocessor version 7.0 11COMMENT= PHP Hypertext Preprocessor version 7.0
11LICENSE= php 12LICENSE= php
12 13
13TEST_TARGET= test 14TEST_TARGET= test
14 15
15USE_TOOLS+= gmake lex pkg-config 16USE_TOOLS+= gmake lex pkg-config
16LIBTOOL_OVERRIDE= # empty 17LIBTOOL_OVERRIDE= # empty
17PHP_CHECK_INSTALLED= No 18PHP_CHECK_INSTALLED= No
18 19
19PHP_VERSIONS_ACCEPTED= 70 20PHP_VERSIONS_ACCEPTED= 70
20 21
@@ -38,26 +39,32 @@ SUBST_FILES.path+= php.ini-development p @@ -38,26 +39,32 @@ SUBST_FILES.path+= php.ini-development p
38SUBST_FILES.path+= sapi/cgi/Makefile.frag 39SUBST_FILES.path+= sapi/cgi/Makefile.frag
39SUBST_SED.path= -e 's,@CGIDIR@,${CGIDIR},g' 40SUBST_SED.path= -e 's,@CGIDIR@,${CGIDIR},g'
40SUBST_SED.path+= -e 's,@PREFIX@,${PREFIX},g' 41SUBST_SED.path+= -e 's,@PREFIX@,${PREFIX},g'
41 42
42INSTALLATION_DIRS+= ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php 43INSTALLATION_DIRS+= ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php
43 44
44# segfault generating phar.phar for i386 & SPARC 45# segfault generating phar.phar for i386 & SPARC
45# revisit this if builtin PCRE is updated beyond PCRE1 8.38 46# revisit this if builtin PCRE is updated beyond PCRE1 8.38
46# https://bugs.php.net/bug.php?id=73880 47# https://bugs.php.net/bug.php?id=73880
47.if ${MACHINE_ARCH} != "x86_64" 48.if ${MACHINE_ARCH} != "x86_64"
48CONFIGURE_ARGS+= --without-pcre-jit 49CONFIGURE_ARGS+= --without-pcre-jit
49.endif 50.endif
50 51
 52.if ${MACHINE_ARCH} == "i386"
 53# segfaults when buidling with many compilers
 54# https://bugs.php.net/bug.php?id=74527
 55CONFIGURE_ARGS+= --disable-gcc-global-regs
 56.endif
 57
51# Make sure modules can link correctly 58# Make sure modules can link correctly
52.if ${OPSYS} == "Darwin" 59.if ${OPSYS} == "Darwin"
53INSTALL_UNSTRIPPED= yes 60INSTALL_UNSTRIPPED= yes
54.endif 61.endif
55 62
56# Darwin < 9 (Mac OS X < 10.5 "Leopard") doesn't have gethostuuid(2) 63# Darwin < 9 (Mac OS X < 10.5 "Leopard") doesn't have gethostuuid(2)
57# and lacks the zone memory allocator 64# and lacks the zone memory allocator
58.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) 65.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
59CFLAGS+= -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WITHOUT_ZONEMALLOC 66CFLAGS+= -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WITHOUT_ZONEMALLOC
60.endif 67.endif
61 68
62post-install: 69post-install:
63 ${INSTALL_PROGRAM} ${WRKSRC}/sapi/cli/php ${DESTDIR}${PREFIX}/bin/php 70 ${INSTALL_PROGRAM} ${WRKSRC}/sapi/cli/php ${DESTDIR}${PREFIX}/bin/php

cvs diff -r1.7 -r1.8 pkgsrc/lang/php70/Attic/Makefile.php (expand / switch to unified diff)

--- pkgsrc/lang/php70/Attic/Makefile.php 2017/08/04 23:07:28 1.7
+++ pkgsrc/lang/php70/Attic/Makefile.php 2018/07/16 10:58:50 1.8
@@ -1,23 +1,18 @@ @@ -1,23 +1,18 @@
1# $NetBSD: Makefile.php,v 1.7 2017/08/04 23:07:28 taca Exp $ 1# $NetBSD: Makefile.php,v 1.8 2018/07/16 10:58:50 maya Exp $
2# used by lang/php70/Makefile 2# used by lang/php70/Makefile
3# used by www/ap-php/Makefile 3# used by www/ap-php/Makefile
4# used by www/php-fpm/Makefile 4# used by www/php-fpm/Makefile
5 5
6# PHP bug #74526 - segfaults on build with GCC 4.8.5 i386 
7.if ${MACHINE_ARCH} == "i386" 
8GCC_REQD+= 4.9 
9.endif 
10 
11.include "../../lang/php70/Makefile.common" 6.include "../../lang/php70/Makefile.common"
12 7
13DISTINFO_FILE= ${.CURDIR}/../../lang/php70/distinfo 8DISTINFO_FILE= ${.CURDIR}/../../lang/php70/distinfo
14PATCHDIR= ${.CURDIR}/../../lang/php70/patches 9PATCHDIR= ${.CURDIR}/../../lang/php70/patches
15 10
16USE_LIBTOOL= YES 11USE_LIBTOOL= YES
17USE_LANGUAGES= c c++ 12USE_LANGUAGES= c c++
18GNU_CONFIGURE= YES 13GNU_CONFIGURE= YES
19BUILD_DEFS+= VARBASE 14BUILD_DEFS+= VARBASE
20PLIST_VARS+= dtrace 15PLIST_VARS+= dtrace
21 16
22CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}" 17CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"
23 18

cvs diff -r1.13 -r1.14 pkgsrc/lang/php71/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/php71/Attic/Makefile 2017/10/27 08:47:49 1.13
+++ pkgsrc/lang/php71/Attic/Makefile 2018/07/16 10:58:50 1.14
@@ -1,20 +1,21 @@ @@ -1,20 +1,21 @@
1# $NetBSD: Makefile,v 1.13 2017/10/27 08:47:49 taca Exp $ 1# $NetBSD: Makefile,v 1.14 2018/07/16 10:58:50 maya Exp $
2 2
3# 3#
4# We can't omit PKGNAME here to handle PKG_OPTIONS. 4# We can't omit PKGNAME here to handle PKG_OPTIONS.
5# 5#
6PKGNAME= php-${PHP_VERSION:S/RC/rc/} 6PKGNAME= php-${PHP_VERSION:S/RC/rc/}
7CATEGORIES= lang 7CATEGORIES= lang
 8PKGREVISION= 1
8 9
9HOMEPAGE= http://www.php.net/ 10HOMEPAGE= http://www.php.net/
10COMMENT= PHP Hypertext Preprocessor version 7.1 11COMMENT= PHP Hypertext Preprocessor version 7.1
11LICENSE= php 12LICENSE= php
12 13
13TEST_TARGET= test 14TEST_TARGET= test
14 15
15USE_TOOLS+= gmake lex pkg-config 16USE_TOOLS+= gmake lex pkg-config
16LIBTOOL_OVERRIDE= # empty 17LIBTOOL_OVERRIDE= # empty
17PHP_CHECK_INSTALLED= No 18PHP_CHECK_INSTALLED= No
18 19
19PHP_VERSIONS_ACCEPTED= 71 20PHP_VERSIONS_ACCEPTED= 71
20 21
@@ -38,26 +39,32 @@ SUBST_FILES.path+= php.ini-development p @@ -38,26 +39,32 @@ SUBST_FILES.path+= php.ini-development p
38SUBST_FILES.path+= sapi/cgi/Makefile.frag 39SUBST_FILES.path+= sapi/cgi/Makefile.frag
39SUBST_SED.path= -e 's,@CGIDIR@,${CGIDIR},g' 40SUBST_SED.path= -e 's,@CGIDIR@,${CGIDIR},g'
40SUBST_SED.path+= -e 's,@PREFIX@,${PREFIX},g' 41SUBST_SED.path+= -e 's,@PREFIX@,${PREFIX},g'
41 42
42INSTALLATION_DIRS+= ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php 43INSTALLATION_DIRS+= ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php
43 44
44# segfault generating phar.phar for i386 & SPARC 45# segfault generating phar.phar for i386 & SPARC
45# revisit this if builtin PCRE is updated beyond PCRE1 8.38 46# revisit this if builtin PCRE is updated beyond PCRE1 8.38
46# https://bugs.php.net/bug.php?id=73880 47# https://bugs.php.net/bug.php?id=73880
47.if ${MACHINE_ARCH} != "x86_64" 48.if ${MACHINE_ARCH} != "x86_64"
48CONFIGURE_ARGS+= --without-pcre-jit 49CONFIGURE_ARGS+= --without-pcre-jit
49.endif 50.endif
50 51
 52# segfaults when buidling with many compilers
 53# https://bugs.php.net/bug.php?id=74527
 54.if ${MACHINE_ARCH} == "i386"
 55CONFIGURE_ARGS+= --disable-gcc-global-regs
 56.endif
 57
51# Make sure modules can link correctly 58# Make sure modules can link correctly
52.if ${OPSYS} == "Darwin" 59.if ${OPSYS} == "Darwin"
53INSTALL_UNSTRIPPED= yes 60INSTALL_UNSTRIPPED= yes
54.endif 61.endif
55 62
56# Darwin < 9 (Mac OS X < 10.5 "Leopard") doesn't have gethostuuid(2) 63# Darwin < 9 (Mac OS X < 10.5 "Leopard") doesn't have gethostuuid(2)
57# and lacks the zone memory allocator 64# and lacks the zone memory allocator
58.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) 65.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
59CFLAGS+= -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WITHOUT_ZONEMALLOC 66CFLAGS+= -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WITHOUT_ZONEMALLOC
60.endif 67.endif
61 68
62post-install: 69post-install:
63 ${INSTALL_PROGRAM} ${WRKSRC}/sapi/cli/php ${DESTDIR}${PREFIX}/bin/php 70 ${INSTALL_PROGRAM} ${WRKSRC}/sapi/cli/php ${DESTDIR}${PREFIX}/bin/php

cvs diff -r1.6 -r1.7 pkgsrc/lang/php71/Attic/Makefile.php (expand / switch to unified diff)

--- pkgsrc/lang/php71/Attic/Makefile.php 2017/08/04 23:08:47 1.6
+++ pkgsrc/lang/php71/Attic/Makefile.php 2018/07/16 10:58:50 1.7
@@ -1,23 +1,18 @@ @@ -1,23 +1,18 @@
1# $NetBSD: Makefile.php,v 1.6 2017/08/04 23:08:47 taca Exp $ 1# $NetBSD: Makefile.php,v 1.7 2018/07/16 10:58:50 maya Exp $
2# used by lang/php71/Makefile 2# used by lang/php71/Makefile
3# used by www/ap-php/Makefile 3# used by www/ap-php/Makefile
4# used by www/php-fpm/Makefile 4# used by www/php-fpm/Makefile
5 5
6# PHP bug #74526 - segfaults on build with GCC 4.8.5 i386 
7.if ${MACHINE_ARCH} == "i386" 
8GCC_REQD+= 4.9 
9.endif 
10 
11.include "../../lang/php71/Makefile.common" 6.include "../../lang/php71/Makefile.common"
12 7
13DISTINFO_FILE= ${.CURDIR}/../../lang/php71/distinfo 8DISTINFO_FILE= ${.CURDIR}/../../lang/php71/distinfo
14PATCHDIR= ${.CURDIR}/../../lang/php71/patches 9PATCHDIR= ${.CURDIR}/../../lang/php71/patches
15 10
16USE_LIBTOOL= YES 11USE_LIBTOOL= YES
17USE_LANGUAGES= c c++ 12USE_LANGUAGES= c c++
18GNU_CONFIGURE= YES 13GNU_CONFIGURE= YES
19BUILD_DEFS+= VARBASE 14BUILD_DEFS+= VARBASE
20PLIST_VARS+= dtrace 15PLIST_VARS+= dtrace
21 16
22CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}" 17CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"
23 18

cvs diff -r1.8 -r1.9 pkgsrc/lang/php72/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/php72/Attic/Makefile 2018/04/26 15:44:15 1.8
+++ pkgsrc/lang/php72/Attic/Makefile 2018/07/16 10:58:50 1.9
@@ -1,20 +1,21 @@ @@ -1,20 +1,21 @@
1# $NetBSD: Makefile,v 1.8 2018/04/26 15:44:15 taca Exp $ 1# $NetBSD: Makefile,v 1.9 2018/07/16 10:58:50 maya Exp $
2 2
3# 3#
4# We can't omit PKGNAME here to handle PKG_OPTIONS. 4# We can't omit PKGNAME here to handle PKG_OPTIONS.
5# 5#
6PKGNAME= php-${PHP_VERSION:S/RC/rc/} 6PKGNAME= php-${PHP_VERSION:S/RC/rc/}
7CATEGORIES= lang 7CATEGORIES= lang
 8PKGREVISION= 1
8 9
9HOMEPAGE= http://www.php.net/ 10HOMEPAGE= http://www.php.net/
10COMMENT= PHP Hypertext Preprocessor version 7.2 11COMMENT= PHP Hypertext Preprocessor version 7.2
11LICENSE= php 12LICENSE= php
12 13
13TEST_TARGET= test 14TEST_TARGET= test
14 15
15USE_TOOLS+= gmake lex pkg-config 16USE_TOOLS+= gmake lex pkg-config
16LIBTOOL_OVERRIDE= # empty 17LIBTOOL_OVERRIDE= # empty
17PHP_CHECK_INSTALLED= No 18PHP_CHECK_INSTALLED= No
18 19
19PHP_VERSIONS_ACCEPTED= 72 20PHP_VERSIONS_ACCEPTED= 72
20 21
@@ -31,26 +32,32 @@ CONF_FILES= ${EGDIR}/php.ini-production @@ -31,26 +32,32 @@ CONF_FILES= ${EGDIR}/php.ini-production
31PLIST_SUBST+= PHPEXTDIR="${PHP_EXTENSION_DIR}" 32PLIST_SUBST+= PHPEXTDIR="${PHP_EXTENSION_DIR}"
32 33
33SUBST_CLASSES+= path 34SUBST_CLASSES+= path
34SUBST_MESSAGE.path= Fixing common paths. 35SUBST_MESSAGE.path= Fixing common paths.
35SUBST_STAGE.path= pre-configure 36SUBST_STAGE.path= pre-configure
36SUBST_FILES.path= ext/phar/phar/phar.php 37SUBST_FILES.path= ext/phar/phar/phar.php
37SUBST_FILES.path+= php.ini-development php.ini-production run-tests.php 38SUBST_FILES.path+= php.ini-development php.ini-production run-tests.php
38SUBST_FILES.path+= sapi/cgi/Makefile.frag 39SUBST_FILES.path+= sapi/cgi/Makefile.frag
39SUBST_SED.path= -e 's,@CGIDIR@,${CGIDIR},g' 40SUBST_SED.path= -e 's,@CGIDIR@,${CGIDIR},g'
40SUBST_SED.path+= -e 's,@PREFIX@,${PREFIX},g' 41SUBST_SED.path+= -e 's,@PREFIX@,${PREFIX},g'
41 42
42INSTALLATION_DIRS+= ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php 43INSTALLATION_DIRS+= ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php
43 44
 45# segfaults when buidling with many compilers
 46# https://bugs.php.net/bug.php?id=74527
 47.if ${MACHINE_ARCH} == "i386"
 48CONFIGURE_ARGS+= --disable-gcc-global-regs
 49.endif
 50
44# Make sure modules can link correctly 51# Make sure modules can link correctly
45.if ${OPSYS} == "Darwin" 52.if ${OPSYS} == "Darwin"
46INSTALL_UNSTRIPPED= yes 53INSTALL_UNSTRIPPED= yes
47.endif 54.endif
48 55
49# Darwin < 9 (Mac OS X < 10.5 "Leopard") doesn't have gethostuuid(2) 56# Darwin < 9 (Mac OS X < 10.5 "Leopard") doesn't have gethostuuid(2)
50# and lacks the zone memory allocator 57# and lacks the zone memory allocator
51.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) 58.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
52CFLAGS+= -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WITHOUT_ZONEMALLOC 59CFLAGS+= -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WITHOUT_ZONEMALLOC
53.endif 60.endif
54 61
55post-install: 62post-install:
56 ${INSTALL_PROGRAM} ${WRKSRC}/sapi/cli/php ${DESTDIR}${PREFIX}/bin/php 63 ${INSTALL_PROGRAM} ${WRKSRC}/sapi/cli/php ${DESTDIR}${PREFIX}/bin/php

cvs diff -r1.4 -r1.5 pkgsrc/lang/php72/Attic/Makefile.php (expand / switch to unified diff)

--- pkgsrc/lang/php72/Attic/Makefile.php 2018/02/05 08:51:25 1.4
+++ pkgsrc/lang/php72/Attic/Makefile.php 2018/07/16 10:58:50 1.5
@@ -1,23 +1,18 @@ @@ -1,23 +1,18 @@
1# $NetBSD: Makefile.php,v 1.4 2018/02/05 08:51:25 jdolecek Exp $ 1# $NetBSD: Makefile.php,v 1.5 2018/07/16 10:58:50 maya Exp $
2# used by lang/php72/Makefile 2# used by lang/php72/Makefile
3# used by www/ap-php/Makefile 3# used by www/ap-php/Makefile
4# used by www/php-fpm/Makefile 4# used by www/php-fpm/Makefile
5 5
6# PHP bug #74526 - segfaults on build with GCC 4.8.5 i386 
7.if ${MACHINE_ARCH} == "i386" 
8GCC_REQD+= 4.9 
9.endif 
10 
11# the binary actually needs full dep on PCRE 6# the binary actually needs full dep on PCRE
12BUILDLINK_DEPMETHOD.pcre= full 7BUILDLINK_DEPMETHOD.pcre= full
13 8
14.include "../../lang/php72/Makefile.common" 9.include "../../lang/php72/Makefile.common"
15 10
16DISTINFO_FILE= ${.CURDIR}/../../lang/php72/distinfo 11DISTINFO_FILE= ${.CURDIR}/../../lang/php72/distinfo
17PATCHDIR= ${.CURDIR}/../../lang/php72/patches 12PATCHDIR= ${.CURDIR}/../../lang/php72/patches
18 13
19USE_LIBTOOL= YES 14USE_LIBTOOL= YES
20USE_LANGUAGES= c c++ 15USE_LANGUAGES= c c++
21GNU_CONFIGURE= YES 16GNU_CONFIGURE= YES
22BUILD_DEFS+= VARBASE 17BUILD_DEFS+= VARBASE
23PLIST_VARS+= dtrace 18PLIST_VARS+= dtrace