mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-11 19:53:52 -08:00
Check for __thread attribute, but do not use it since it slows down ECL a lot.
This commit is contained in:
parent
dd83a988c8
commit
69bc814ab1
3 changed files with 70 additions and 3 deletions
12
src/aclocal.m4
vendored
12
src/aclocal.m4
vendored
|
|
@ -519,3 +519,15 @@ if test "$dynamic_ffi" = "yes" ; then
|
|||
AC_DEFINE(ECL_DYNAMIC_FFI, 1, [we can build calls to foreign functions])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Provides a test for the existance of the __thread declaration and
|
||||
dnl defines WITH___THREAD if it is found
|
||||
AC_DEFUN([ECL___THREAD],
|
||||
[AC_CACHE_CHECK(for __thread local data, ac_cv_ecl___thread,
|
||||
AC_TRY_COMPILE(,[static __thread void *data;],
|
||||
ac_cv_ecl___thread=yes,
|
||||
ac_cv_ecl___thread=no))
|
||||
dnl We deactivate this test because it seems to slow down ECL A LOT!!!
|
||||
ac_cv_ecl___thread=no
|
||||
])
|
||||
|
|
|
|||
58
src/configure
vendored
58
src/configure
vendored
|
|
@ -3605,6 +3605,61 @@ echo $ECHO_N "checking for software type... $ECHO_C" >&6
|
|||
echo "$as_me:$LINENO: result: ${SOFTWARE_TYPE}" >&5
|
||||
echo "${ECHO_T}${SOFTWARE_TYPE}" >&6
|
||||
|
||||
echo "$as_me:$LINENO: checking for __thread local data" >&5
|
||||
echo $ECHO_N "checking for __thread local data... $ECHO_C" >&6
|
||||
if test "${ac_cv_ecl___thread+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static __thread void *data;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_ecl___thread=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_ecl___thread=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_ecl___thread" >&5
|
||||
echo "${ECHO_T}$ac_cv_ecl___thread" >&6
|
||||
ac_cv_ecl___thread=no
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -3658,7 +3713,6 @@ fi
|
|||
|
||||
LIBS="${LIBS} -lm"
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for getpwnam in -lsun" >&5
|
||||
echo $ECHO_N "checking for getpwnam in -lsun... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_sun_getpwnam+set}" = set; then
|
||||
|
|
@ -3885,7 +3939,7 @@ cat >>confdefs.h <<\_ACEOF
|
|||
#define ECL_THREADS 1
|
||||
_ACEOF
|
||||
|
||||
if test "${with___thread}" = "yes" ; then
|
||||
if test "${ac_cv_ecl___thread}" = "yes" ; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define WITH___THREAD 1
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ dnl Checks which do not come with autoconf (must be after AC_PROG_CC)
|
|||
ECL_MAKE_ABSOLUTE_SRCDIR
|
||||
ECL_CROSS_CONFIG
|
||||
ECL_GUESS_HOST_OS
|
||||
ECL___THREAD
|
||||
|
||||
AC_SUBST(INFOEXT)
|
||||
AC_SUBST(INSTALL_INFO)
|
||||
|
|
@ -229,7 +230,7 @@ if test "${enable_threads}" = "yes" ; then
|
|||
LIBS="${THREAD_LIBS} ${LIBS}"
|
||||
CFLAGS="${CFLAGS} ${THREAD_CFLAGS}"
|
||||
AC_DEFINE( [ECL_THREADS], [1], [Userland threads?])
|
||||
if test "${with___thread}" = "yes" ; then
|
||||
if test "${ac_cv_ecl___thread}" = "yes" ; then
|
||||
AC_DEFINE( [WITH___THREAD], [1], [__thread thread-local variables?] )
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue