mirror of
https://github.com/php/php-src.git
synced 2025-08-17 14:38:49 +02:00
![]() pthreads are not working when cross-compiling, indeed configure sets pthreads_working to no if cross_compiling is detected. This behavior is implemented in PTHREADS_CHECK. This function call AC_CACHE_CHECK twice to retrieve ac_cv_pthreads_cflags and ac_cv_pthreads_lib. In these calls, the function PTHREADS_CHECK_COMPILE will call AC_TRY_RUN function which will update the global pthreads_working variable. This is not compliant with autoconf AC_CACHE_CHECK rules which specify that "The commands-to-set-it must have no side effects except for setting the variable cache-id". So, this patch replaces pthread_working assignments with assignments on a new local pthread_checked variable. Value of ptreads_working is computed outside AC_CACHE_CHECK function depending on value of ac_cv_pthreads_cflags and ac_cv_pthreads_lib. Moreover, AC_TRY_RUN call is replaced by AC_TRY_LINK which will work when cross-compiling. Without this modification, thread safety option (--enable-maintainer-zts) can not be enabled on embedded buildsystems such as buildroot. Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com> |
||
---|---|---|
.. | ||
m4 | ||
acinclude.m4 | ||
build.mk | ||
buildconf | ||
config.w32 | ||
configure.in | ||
LICENSE | ||
Makefile.am | ||
readdir.h | ||
threads.m4 | ||
TODO | ||
TSRM.c | ||
TSRM.h | ||
tsrm.m4 | ||
tsrm_config.w32.h | ||
tsrm_config_common.h | ||
tsrm_nw.c | ||
tsrm_nw.h | ||
tsrm_strtok_r.c | ||
tsrm_strtok_r.h | ||
tsrm_win32.c | ||
tsrm_win32.h |