[cfe-dev] [Modules TS] new libstdc++ weakref issue

Tom Stellard via cfe-dev cfe-dev at lists.llvm.org
Mon Jul 24 09:56:47 PDT 2017


On 07/19/2017 09:21 AM, Boris Kolpackov via cfe-dev wrote:
> Something recently introduced (~ past two weeks) is now causing the
> following error when using Clang with libstdc++ on Linux:
> 

Can you file a bug for this a bugs.llvm.org.

-Tom

> $ cat <<EOF >std-core.mxx
> export module std.core;
> export
> {
> #include <stdexcept>
> }
> EOF
> 
> $ clang++-5.0 --version
> clang version 5.0.0-svn308397-1~exp1 (trunk)
> 
> $ clang++-5.0 -std=c++1z -D__cpp_modules=201704 -fmodules-ts -o std.core.pcm --precompile -Xclang -fmodules-embed-all-files -Xclang -fmodules-codegen -Xclang -fmodules-debuginfo -x c++-module std-core.mxx
> In file included from std-core.mxx:4:
> In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/c++/6.2.0/stdexcept:39:
> In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/c++/6.2.0/string:52:
> In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/c++/6.2.0/bits/basic_string.h:39:
> In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/c++/6.2.0/ext/atomicity.h:35:
> In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/x86_64-linux-gnu/c++/6.2.0/bits/gthr.h:148:
> /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/x86_64-linux-gnu/c++/6.2.0/bits/gthr-default.h:101:1: error: weakref declaration must have internal
>       linkage
> __gthrw(pthread_once)
> 
> A non-module program that uses the same header compiles fine.
> 
> Let me know if you need any extra information.
> 
> Boris
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> 




More information about the cfe-dev mailing list