From: Kevin Adler <kadler@us.ibm.com> Date: Mon, 18 Feb 2019 17:01:23 +0000 (-0600) Subject: Fix shared module generation on AIX bug #77676 X-Git-Tag: php-7.3.4RC1~46^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=700f876a1ae5957bda027b36b1fdf3ffdbe57f6f;p=php 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. --- diff --git a/acinclude.m4 b/acinclude.m4 index 6249cb92e6..6b94af5dd7 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 ])