summaryrefslogtreecommitdiffstats
path: root/php-8.0.0-static.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-04-28 11:58:04 +0200
committerRemi Collet <remi@remirepo.net>2020-04-28 11:58:04 +0200
commit526d963ee4c432d68b518047d910942aac0f47d4 (patch)
treea37b4f0d8eafd9aa3884375e151ef1e90f80b7ea /php-8.0.0-static.patch
parentf43c742fef022e73bc39562a320455f6b04fa6ed (diff)
new snapshot
test build for https://github.com/php/php-src/pull/5480
Diffstat (limited to 'php-8.0.0-static.patch')
-rw-r--r--php-8.0.0-static.patch65
1 files changed, 57 insertions, 8 deletions
diff --git a/php-8.0.0-static.patch b/php-8.0.0-static.patch
index 997b5e0..30f7557 100644
--- a/php-8.0.0-static.patch
+++ b/php-8.0.0-static.patch
@@ -1,14 +1,63 @@
-From 0aa209863a098b644ecbcbd1a73c1813cc182809 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Mon, 27 Apr 2020 16:13:42 +0200
-Subject: [PATCH] fix --tag=disable-static option position
+From 5fe723c92da05d9a2d7763fd9d54d223f4381571 Mon Sep 17 00:00:00 2001
+From: Dmitry Stogov <dmitry@zend.com>
+Date: Mon, 27 Apr 2020 23:31:54 +0300
+Subject: [PATCH] Fix libtool to provide a simple way to generate only "shared"
+ object files or libraries.
+- Support for "-shared" option is taken from libtool-2.0 that is already at lease 15 years old.
+- Change PHP build system to use "-shared" instead of "--tag=disable-static".
---
- build/php.m4 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ build/Makefile.global | 2 +-
+ build/ltmain.sh | 13 +++++++++++++
+ build/php.m4 | 2 +-
+ 3 files changed, 15 insertions(+), 2 deletions(-)
+diff --git a/build/Makefile.global b/build/Makefile.global
+index 237308d26597..17482043f9c5 100644
+--- a/build/Makefile.global
++++ b/build/Makefile.global
+@@ -16,7 +16,7 @@ build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
+ build-binaries: $(PHP_BINARIES)
+
+ libphp.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
+- $(LIBTOOL) --mode=link --tag=disable-static $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
++ $(LIBTOOL) --mode=link $(CC) -shared $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
+ -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
+
+ libs/libphp.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
+diff --git a/build/ltmain.sh b/build/ltmain.sh
+index 7e2240e980e0..2f1c8c9dc80f 100755
+--- a/build/ltmain.sh
++++ b/build/ltmain.sh
+@@ -811,6 +811,13 @@ if test -z "$show_help"; then
+
+ for arg in $later; do
+ case $arg in
++ -shared)
++ test yes = "$build_libtool_libs" \
++ || func_fatal_configuration "cannot build a shared library"
++ build_old_libs=no
++ continue
++ ;;
++
+ -static)
+ build_old_libs=yes
+ continue
+@@ -1177,6 +1184,12 @@ EOF
+ for arg
+ do
+ case $arg in
++ -shared)
++ test yes != "$build_libtool_libs" \
++ && func_fatal_configuration "cannot build a shared library"
++ build_old_libs=no
++ break
++ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
diff --git a/build/php.m4 b/build/php.m4
-index 1b9940147e16..e9bea81e02ae 100644
+index 1b9940147e16..c5ce38026462 100644
--- a/build/php.m4
+++ b/build/php.m4
@@ -851,7 +851,7 @@ AC_DEFUN([PHP_SHARED_MODULE],[
@@ -16,7 +65,7 @@ index 1b9940147e16..e9bea81e02ae 100644
$3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
- \$(LIBTOOL) --mode=link --tag=disable-static ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o [\$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
-+ \$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) --tag=disable-static \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o [\$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
++ \$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) -shared \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o [\$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
EOF
])