com php-src: Fix shared module generation on AIX bug #77676: acinclude.m4
| From: | Peter Kokot | Date: | Sat, 02 Mar 2019 17:45:55 +0000 |
| Subject: | com php-src: Fix shared module generation on AIX bug #77676: acinclude.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104943@lists.php.net to get a copy of this message | ||
Commit: 700f876a1ae5957bda027b36b1fdf3ffdbe57f6f
Author: Kevin Adler <kadler@us.ibm.com> Mon, 18 Feb 2019 11:01:23 -0600
Committer: Peter Kokot <peterkokot@gmail.com> Sat, 2 Mar 2019 18:45:55 +0100
Parents: c39fb1fc4f1cf33e0d0c633f289c1c47f179e87a
Branches: PHP-7.2 PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=700f876a1ae5957bda027b36b1fdf3ffdbe57f6f
Log:
Fix shared module generation on AIX bug #77676
Makefiles for PHP extensions generated by phpize expect the PHP_MODULES
to contain a list of libtool .la files so that it can read the $dlname
variable from them by sourcing them in to a shell. On AIX, the code was
setting PHP_MODULES to a list of .so files, which meant the dlname was
blank, preventing the tests from being able to run.
Change the AIX code path in the PHP_SHARED_MODULE macro to match the
output on other platforms, using libtool .la files.
Bugs:
https://bugs.php.net/77676
Changed paths:
M acinclude.m4
Diff:
diff --git a/acinclude.m4 b/acinclude.m4
index 6249cb9...6b94af5 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -836,15 +836,11 @@ dnl from object_var in build-dir.
dnl
AC_DEFUN([PHP_SHARED_MODULE],[
install_modules="install-modules"
+ suffix=la
case $host_alias in
*aix*[)]
- suffix=so
- link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS)
$(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$3'/$1.la -export-dynamic
-avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2)
$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) && mv -f '$3'/.libs/$1.so
'$3'/$1.so'
- ;;
- *[)]
- suffix=la
- link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS)
$(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic
-module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
+ additional_flags="-Wl,-G"
;;
esac
@@ -859,7 +855,7 @@ AC_DEFUN([PHP_SHARED_MODULE],[
\$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
$3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
- $link_cmd
+ \$(LIBTOOL) --mode=link 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)
EOF
])