[PATCH] D71082: Allow system header to provide their own implementation of some builtin
serge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 16 01:40:29 PST 2020
serge-sans-paille added a comment.
In D71082#1822925 <https://reviews.llvm.org/D71082#1822925>, @akhuang wrote:
> This caused a linker error in chromium:
>
> ld.lld: error: undefined symbol: __warn_memset_zero_len
>
>
> Apparently now that the glibc memset is being used, __warn_memset_zero_len gets called from libc++ code (https://github.com/llvm/llvm-project/blob/b72a8c65e4e34779b6bc9e466203f553f5294486/libcxx/include/__bit_reference#L371).
I can reproduce the behavior locally, but without the linker error. On my system, (RHEL7.5) libc_nonshared.a provides that symbol. I've checked on other systems and it's available in that library on Ubuntu 14.04.
On other systems, this symbol is not available, neither in the lib nor in the header, because the associated gcc version is high enough. Can you try to reproduce with:
clang -S -O2 -fgnuc-version=5.0 t.cpp -o - -stdlib=libc++ -D_FORTIFY_SOURCE=1
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71082/new/
https://reviews.llvm.org/D71082
More information about the cfe-commits
mailing list