Skip to content

Commit 700f876

Browse files
kadlerpetk
authored andcommitted
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.
1 parent c39fb1f commit 700f876

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

acinclude.m4

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -836,15 +836,11 @@ dnl from object_var in build-dir.
836836
dnl
837837
AC_DEFUN([PHP_SHARED_MODULE],[
838838
install_modules="install-modules"
839+
suffix=la
839840
840841
case $host_alias in
841842
*aix*[)]
842-
suffix=so
843-
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'
844-
;;
845-
*[)]
846-
suffix=la
847-
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)'
843+
additional_flags="-Wl,-G"
848844
;;
849845
esac
850846
@@ -859,7 +855,7 @@ AC_DEFUN([PHP_SHARED_MODULE],[
859855
\$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
860856
861857
$3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
862-
$link_cmd
858+
\$(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)
863859
864860
EOF
865861
])

0 commit comments

Comments
 (0)