diff options
author | Fabrice Fontaine <fabrice.fontaine@orange.com> | 2016-10-11 15:16:26 +0200 |
---|---|---|
committer | Fabrice Fontaine <fabrice.fontaine@orange.com> | 2016-10-11 15:16:26 +0200 |
commit | e6bbc00964d86b4b8ecb6a8e26bf9e3af47a4b98 (patch) | |
tree | 5fd07773516a6aa8bf3e84cb82b2e02c1c75dbed /ext/standard/php_string.h | |
parent | ca6e35f7a52a60bab22c6a802ee7e4b09eabb8a5 (diff) | |
download | php-git-e6bbc00964d86b4b8ecb6a8e26bf9e3af47a4b98.tar.gz |
Fix pthreads detection when cross-compiling
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>
Diffstat (limited to 'ext/standard/php_string.h')
0 files changed, 0 insertions, 0 deletions