1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 18:22:42 +01:00
Files
archived-php-src/TSRM
Fabrice Fontaine e6bbc00964 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>
2016-10-11 15:16:26 +02:00
..
2011-05-16 00:14:47 +00:00
2006-01-04 23:55:42 +00:00
2008-07-30 17:45:18 +00:00
2000-09-16 19:07:50 +00:00
2015-01-10 15:07:38 -08:00
2016-08-29 21:49:28 +02:00
2015-03-10 09:10:23 +01:00