From ad9df2b36a57d5a2760dc5924e8fa91201916bc0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 8 Aug 2017 14:47:52 -0700 Subject: php7: upgrade to 7.1.7 License checksum changed due to opyright year changed to 2017 Fix build with clang/hardening Signed-off-by: Khem Raj Signed-off-by: Martin Jansa --- .../change-AC_TRY_RUN-to-AC_TRY_LINK.patch | 56 ------------------- .../php-7.1.7/0001-Specify-tag-with-libtool.patch | 62 ++++++++++++++++++++++ .../change-AC_TRY_RUN-to-AC_TRY_LINK.patch | 56 +++++++++++++++++++ meta-oe/recipes-devtools/php/php_7.1.0.bb | 14 ----- meta-oe/recipes-devtools/php/php_7.1.7.bb | 16 ++++++ 5 files changed, 134 insertions(+), 70 deletions(-) delete mode 100644 meta-oe/recipes-devtools/php/php-7.1.0/change-AC_TRY_RUN-to-AC_TRY_LINK.patch create mode 100644 meta-oe/recipes-devtools/php/php-7.1.7/0001-Specify-tag-with-libtool.patch create mode 100644 meta-oe/recipes-devtools/php/php-7.1.7/change-AC_TRY_RUN-to-AC_TRY_LINK.patch delete mode 100644 meta-oe/recipes-devtools/php/php_7.1.0.bb create mode 100644 meta-oe/recipes-devtools/php/php_7.1.7.bb (limited to 'meta-oe/recipes-devtools') diff --git a/meta-oe/recipes-devtools/php/php-7.1.0/change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/meta-oe/recipes-devtools/php/php-7.1.0/change-AC_TRY_RUN-to-AC_TRY_LINK.patch deleted file mode 100644 index 39c334f39d..0000000000 --- a/meta-oe/recipes-devtools/php/php-7.1.0/change-AC_TRY_RUN-to-AC_TRY_LINK.patch +++ /dev/null @@ -1,56 +0,0 @@ -[PATCH] config.m4: change AC_TRY_RUN to AC_TRY_LINK - -Upstream-Status: Pending - -AC_TRY_RUN is not suitable for cross-compile - -Signed-off-by: Roy Li ---- - ext/fileinfo/config.m4 | 31 ++++++------------------------- - 1 file changed, 6 insertions(+), 25 deletions(-) - -diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4 -index 7e98d62..8a8ea0e 100644 ---- a/ext/fileinfo/config.m4 -+++ b/ext/fileinfo/config.m4 -@@ -14,31 +14,12 @@ if test "$PHP_FILEINFO" != "no"; then - libmagic/readcdf.c libmagic/softmagic.c" - - AC_MSG_CHECKING([for strcasestr]) -- AC_TRY_RUN([ --#include --#include --#include -- --int main(void) --{ -- char *s0, *s1, *ret; -- -- s0 = (char *) malloc(42); -- s1 = (char *) malloc(8); -- -- memset(s0, 'X', 42); -- s0[24] = 'Y'; -- s0[26] = 'Z'; -- s0[41] = '\0'; -- memset(s1, 'x', 8); -- s1[0] = 'y'; -- s1[2] = 'Z'; -- s1[7] = '\0'; -- -- ret = strcasestr(s0, s1); -- -- return !(NULL != ret); --} -+ AC_TRY_COMPILE([ -+ #include -+ #include -+ #include -+ ],[ -+ strcasestr(NULL, NULL); - ],[ - dnl using the platform implementation - AC_MSG_RESULT(yes) --- -1.9.1 - diff --git a/meta-oe/recipes-devtools/php/php-7.1.7/0001-Specify-tag-with-libtool.patch b/meta-oe/recipes-devtools/php/php-7.1.7/0001-Specify-tag-with-libtool.patch new file mode 100644 index 0000000000..18b4937dbd --- /dev/null +++ b/meta-oe/recipes-devtools/php/php-7.1.7/0001-Specify-tag-with-libtool.patch @@ -0,0 +1,62 @@ +From 5c84b039e97abd88f6a18da0e6d27383c00fea92 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 26 Jul 2017 23:06:56 -0700 +Subject: [PATCH] Specify --tag with libtool + +This helps in compiling with external toolchains +with -fPIE appended to CC e.g. via hardening flags + +Signed-off-by: Khem Raj +--- + acinclude.m4 | 8 ++++---- + configure.in | 4 ++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index a114a98..1cc7a26 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -806,10 +806,10 @@ dnl + dnl PHP_BUILD_PROGRAM + dnl + AC_DEFUN([PHP_BUILD_PROGRAM],[ +- php_c_pre='$(LIBTOOL) --mode=compile $(CC)' ++ php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= +- php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' ++ php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo +@@ -819,10 +819,10 @@ AC_DEFUN([PHP_BUILD_PROGRAM],[ + no) pic_setting='-prefer-non-pic';; + esac + +- shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' ++ shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= +- shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' ++ shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo +diff --git a/configure.in b/configure.in +index 7d65b63..7221af9 100644 +--- a/configure.in ++++ b/configure.in +@@ -1431,8 +1431,8 @@ PHP_SET_LIBTOOL_VARIABLE([--silent]) + dnl libtool 1.4.3 needs this. + PHP_SET_LIBTOOL_VARIABLE([--preserve-dup-deps]) + +-test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<' +-test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<' ++test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --tag=CC --mode=compile $(COMPILE) -c $<' ++test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --tag=CXX --mode=compile $(CXX_COMPILE) -c $<' + SHARED_LIBTOOL='$(LIBTOOL)' + + CC=$old_CC +-- +2.13.3 + diff --git a/meta-oe/recipes-devtools/php/php-7.1.7/change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/meta-oe/recipes-devtools/php/php-7.1.7/change-AC_TRY_RUN-to-AC_TRY_LINK.patch new file mode 100644 index 0000000000..39c334f39d --- /dev/null +++ b/meta-oe/recipes-devtools/php/php-7.1.7/change-AC_TRY_RUN-to-AC_TRY_LINK.patch @@ -0,0 +1,56 @@ +[PATCH] config.m4: change AC_TRY_RUN to AC_TRY_LINK + +Upstream-Status: Pending + +AC_TRY_RUN is not suitable for cross-compile + +Signed-off-by: Roy Li +--- + ext/fileinfo/config.m4 | 31 ++++++------------------------- + 1 file changed, 6 insertions(+), 25 deletions(-) + +diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4 +index 7e98d62..8a8ea0e 100644 +--- a/ext/fileinfo/config.m4 ++++ b/ext/fileinfo/config.m4 +@@ -14,31 +14,12 @@ if test "$PHP_FILEINFO" != "no"; then + libmagic/readcdf.c libmagic/softmagic.c" + + AC_MSG_CHECKING([for strcasestr]) +- AC_TRY_RUN([ +-#include +-#include +-#include +- +-int main(void) +-{ +- char *s0, *s1, *ret; +- +- s0 = (char *) malloc(42); +- s1 = (char *) malloc(8); +- +- memset(s0, 'X', 42); +- s0[24] = 'Y'; +- s0[26] = 'Z'; +- s0[41] = '\0'; +- memset(s1, 'x', 8); +- s1[0] = 'y'; +- s1[2] = 'Z'; +- s1[7] = '\0'; +- +- ret = strcasestr(s0, s1); +- +- return !(NULL != ret); +-} ++ AC_TRY_COMPILE([ ++ #include ++ #include ++ #include ++ ],[ ++ strcasestr(NULL, NULL); + ],[ + dnl using the platform implementation + AC_MSG_RESULT(yes) +-- +1.9.1 + diff --git a/meta-oe/recipes-devtools/php/php_7.1.0.bb b/meta-oe/recipes-devtools/php/php_7.1.0.bb deleted file mode 100644 index 210d91fd78..0000000000 --- a/meta-oe/recipes-devtools/php/php_7.1.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -require php.inc - -LIC_FILES_CHKSUM = "file://LICENSE;md5=b602636d46a61c0ac0432bbf5c078fe4" - -SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch" -SRC_URI[md5sum] = "54e364b60a88db77adb96aacb10f10a4" -SRC_URI[sha256sum] = "68bcfd7deed5b3474d81dec9f74d122058327e2bed0ac25bbc9ec70995228e61" - -PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ - --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ - ,--without-mysqli --without-pdo-mysql \ - ,mysql5" - -FILES_${PN}-fpm += "${sysconfdir}/php-fpm.d/www.conf.default" diff --git a/meta-oe/recipes-devtools/php/php_7.1.7.bb b/meta-oe/recipes-devtools/php/php_7.1.7.bb new file mode 100644 index 0000000000..ebf9237812 --- /dev/null +++ b/meta-oe/recipes-devtools/php/php_7.1.7.bb @@ -0,0 +1,16 @@ +require php.inc + +LIC_FILES_CHKSUM = "file://LICENSE;md5=c0af599f66d0461c5837c695fcbc5c1e" + +SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch \ + file://0001-Specify-tag-with-libtool.patch \ + " +SRC_URI[md5sum] = "22e11a372f99afbbbf3f46a31e8a82ca" +SRC_URI[sha256sum] = "079b6792987f38dc485f92258c04f9e02dedd593f9d260ebe725343f812d1ff8" + +PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ + --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ + ,--without-mysqli --without-pdo-mysql \ + ,mysql5" + +FILES_${PN}-fpm += "${sysconfdir}/php-fpm.d/www.conf.default" -- cgit 1.2.3-korg