Skip to content

Commit

Permalink
Fix error linking with pthread
Browse files Browse the repository at this point in the history
Noticed in php 8.3-dev configured with --disable-all

The "-pthread" flag wasn't actually getting used in the makefile.
  • Loading branch information
TysonAndre committed Nov 12, 2022
1 parent 2599d00 commit 6ef5f79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ if test "$PHP_APCU" != "no"; then
}
]])],[ dnl -Success-
APCU_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_ADD_LIBRARY(pthread)
PHP_ADD_LIBRARY(pthread,, APCU_SHARED_LIBADD)
PHP_LDFLAGS="$PHP_LDFLAGS -lpthread"
AC_DEFINE(APC_NATIVE_RWLOCK, 1, [ ])
AC_MSG_RESULT([yes])
Expand All @@ -131,7 +131,7 @@ if test "$PHP_APCU" != "no"; then
PHP_APCU_RWLOCKS=no
],[
APCU_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_ADD_LIBRARY(pthread)
PHP_ADD_LIBRARY(pthread,, APCU_SHARED_LIBADD)
PHP_LDFLAGS="$PHP_LDFLAGS -lpthread"
])
LIBS="$orig_LIBS"
Expand Down Expand Up @@ -173,7 +173,7 @@ if test "$PHP_APCU" != "no"; then
}
]])],[ dnl -Success-
APCU_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_ADD_LIBRARY(pthread)
PHP_ADD_LIBRARY(pthread,, APCU_SHARED_LIBADD)
PHP_LDFLAGS="$PHP_LDFLAGS -lpthread"
AC_MSG_RESULT([yes])
AC_DEFINE(APC_HAS_PTHREAD_MUTEX, 1, [ ])
Expand All @@ -182,7 +182,7 @@ if test "$PHP_APCU" != "no"; then
PHP_APCU_MUTEX=no
],[
APCU_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_ADD_LIBRARY(pthread)
PHP_ADD_LIBRARY(pthread,, APCU_SHARED_LIBADD)
PHP_LDFLAGS="$PHP_LDFLAGS -lpthread"
])
LIBS="$orig_LIBS"
Expand Down

0 comments on commit 6ef5f79

Please sign in to comment.