From 6479e403ef7398f48c0e1c0f1a71aa112938a357 Mon Sep 17 00:00:00 2001 From: Jan Maria Matejka Date: Thu, 23 May 2019 11:27:24 +0000 Subject: Filters: If somebody doesn't like _Thread_local, don't fail for now, just be a little slower. When the parallel execution comes into place, we'll likely enforce this C11 feature. It's much simpler and also faster than pthread_[sg]etspecific(). --- aclocal.m4 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'aclocal.m4') diff --git a/aclocal.m4 b/aclocal.m4 index 0044adf9..746d5df5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,25 @@ dnl ** Additional Autoconf tests for BIRD configure script dnl ** (c) 1999 Martin Mares +AC_DEFUN([BIRD_CHECK_THREAD_LOCAL], +[ + AC_CACHE_CHECK( + [whether _Thread_local is known], + [bird_cv_thread_local], + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [ + _Thread_local static int x = 42; + ], + [] + ) + ], + [bird_cv_thread_local=yes], + [bird_cv_thread_local=no] + ) + ) +]) + AC_DEFUN([BIRD_CHECK_PTHREADS], [ bird_tmp_cflags="$CFLAGS" @@ -134,7 +153,7 @@ AC_DEFUN([BIRD_CHECK_ANDROID_LOG], AC_DEFUN([BIRD_CHECK_LTO], [ bird_tmp_cflags="$CFLAGS" - bird_tmp_ldflags="$CFLAGS" + bird_tmp_ldflags="$LDFLAGS" CFLAGS="-flto" LDFLAGS="-flto" -- cgit v1.2.3