Switch from static to dynamically-linked libstdc++
When using C++11 code that can possibly throw exceptions (such as std::make_shared(...) linking libstdc++.a using Clang on MSYS2 will generate errors such as: libstdc++.a(eh_personality.o): duplicate section `.rdata$_ZTSSt9exception[_ZTSSt9exception]' has different size Although potential suggested fixes involve allowing duplicate symbols, -Wl,--allow-multiple-definition, this solution can introduce unexpected behavior when one symbol clobbers another symbol. To solve this, switching to dynamic linking of the libstdc++ library appears to be all that's needed.
This commit is contained in:
parent
cc7d6b6e43
commit
c776239c3c
1 changed files with 1 additions and 1 deletions
|
@ -2,4 +2,4 @@
|
|||
ar="llvm-ar${postfix}"
|
||||
ld="llvm-link${postfix}"
|
||||
ranlib="llvm-ranlib${postfix}"
|
||||
ldflags+=(-static-libgcc -static-libstdc++)
|
||||
ldflags+=(-static-libgcc)
|
||||
|
|
Loading…
Add table
Reference in a new issue