On 10/19/20 9:04 AM, Tobias Burnus wrote:
Hi Martin,
Hello.
this patch caused here a build fail: gcc-mainline/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:490:39: error: 'NT_X86_XSTATE' was not declared in this scope It turned out that the used GLIBC of the cross build is 2.11.1. And that one does not contain this #define in 'elf.h'.
Thanks for the heads up.
I wonder whether we should do something like the following – what do you think? --- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp +++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp @@ -490 +490,5 @@ typedef user_regs_struct regs_struct; -static constexpr uptr kExtraRegs[] = {NT_X86_XSTATE, NT_FPREGSET}; +static constexpr uptr kExtraRegs[] = { +#ifdef NT_X86_XSTATE + NT_X86_XSTATE, +#endif + DNT_FPREGSET}; Tobias
The change was introduced in the upstream commit: https://github.com/llvm/llvm-project/commit/5813fca1076089c835de737834955a0fe7eb3898 Please create a LLVM bugzilla entry where you can mention that and they will hopefully merge the change. We usually upstream the changes first. Thanks, Martin