[Bug libc/25271] undeclared identifier PTHREAD_MUTEX_DEFAULT when compiling with -std=c11
romain.geissler at amadeus dot com
sourceware-bugzilla@sourceware.org
Sat Jan 25 14:28:00 GMT 2020
https://sourceware.org/bugzilla/show_bug.cgi?id=25271
Romain Geissler <romain.geissler at amadeus dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |romain.geissler at amadeus dot com
--- Comment #12 from Romain Geissler <romain.geissler at amadeus dot com> ---
Hi,
Please note that this cases happened to me when I tried to bootstrap clang/llvm
using the latest glibc master:
FAILED: CMakeFiles/clang_rt.builtins-x86_64.dir/emutls.c.o
/workdir/build/final-system/llvm-build/./bin/clang --target=x86_64-1a-linux-gnu
-DVISIBILITY_HIDDEN -O2 -msse -msse2 -msse3
-I/workdir/build/final-system/llvm-temporary-static-dependencies/install/include
-I/workdir/build/final-system/llvm-temporary-static-dependencies/install/include/ncursesw
-O3 -DNDEBUG -m64 -std=c11 -fPIC -fno-builtin -fvisibility=hidden
-fomit-frame-pointer -MD -MT CMakeFiles/clang_rt.builtins-x86_64.dir/emutls.c.o
-MF CMakeFiles/clang_rt.builtins-x86_64.dir/emutls.c.o.d -o
CMakeFiles/clang_rt.builtins-x86_64.dir/emutls.c.o -c
/workdir/src/llvm-11.0.0/compiler-rt/lib/builtins/emutls.c
/workdir/src/llvm-11.0.0/compiler-rt/lib/builtins/emutls.c:52:39: error: use of
undeclared identifier 'PTHREAD_MUTEX_DEFAULT'
static pthread_mutex_t emutls_mutex = PTHREAD_MUTEX_INITIALIZER;
^
/opt/1A/toolchain/x86_64-v21.0.0/include/pthread.h:87:36: note: expanded from
macro 'PTHREAD_MUTEX_INITIALIZER'
{ { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_DEFAULT) } }
^
So I am not sure whether glibc or clang must be changed, but I guess that's
annoying that a few days before the glibc 2.31 there is such a build failure
when building clang with this new glibc ;)
Cheers,
Romain
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list