From 1acbd4da02eb82a035c00a2f484364453469ff06 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Thu, 27 Jun 2019 15:16:39 -0700 Subject: Detect TLS support in compiler --- pkg/e2fsprogs/config.h | 4 +++- pkg/e2fsprogs/gen.lua | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'pkg/e2fsprogs') diff --git a/pkg/e2fsprogs/config.h b/pkg/e2fsprogs/config.h index 5f53c893..80cd9925 100644 --- a/pkg/e2fsprogs/config.h +++ b/pkg/e2fsprogs/config.h @@ -227,7 +227,9 @@ #endif /* #undef STACK_DIRECTION */ #define STDC_HEADERS 1 -#define TLS __thread +#ifdef HAVE__THREAD_LOCAL +# define TLS _Thread_local +#endif #define USE_POSIX_THREADS 1 /* #undef USE_POSIX_THREADS_WEAK */ /* #undef USE_PTH_THREADS */ diff --git a/pkg/e2fsprogs/gen.lua b/pkg/e2fsprogs/gen.lua index 96fb876f..57a06301 100644 --- a/pkg/e2fsprogs/gen.lua +++ b/pkg/e2fsprogs/gen.lua @@ -10,9 +10,10 @@ cflags{ } build('cat', '$outdir/config.h', { - '$dir/config.h', + '$builddir/probe/HAVE__THREAD_LOCAL', '$builddir/probe/SIZEOF_LONG', '$builddir/probe/SIZEOF_TIME_T', + '$dir/config.h', }) set('subst', { -- cgit v1.2.3