Re: x86 - clang / objtool status
From: Nathan Chancellor
Date: Thu Jul 18 2019 - 16:58:46 EST
Hi Thomas,
I can't comment on the objtool stuff as it is a bit outside of my area
of expertise (probably going to be my next major learning project) but I
can comment on the other errors.
On Thu, Jul 18, 2019 at 10:40:09PM +0200, Thomas Gleixner wrote:
> Build fails with:
>
> clang-10: error: unknown argument: '-mpreferred-stack-boundary=4'
> make[5]: *** [linux/scripts/Makefile.build:279: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.o] Error 1
Arnd sent a patch for this which has been picked up:
https://lore.kernel.org/lkml/CADnq5_Mm=Fj4AkFtuo+W_295q8r6DY3Sumo7gTG-McUYY=CeVg@xxxxxxxxxxxxxx/
> 3) allmodconfig:
> Build fails with:
>
> ERROR: "__compiletime_assert_2801" [drivers/net/wireless/intel/iwlwifi/iwlwifi.ko] undefined!
> ERROR: "__compiletime_assert_2446" [drivers/net/wireless/intel/iwlwifi/iwlwifi.ko] undefined!
> ERROR: "__compiletime_assert_2452" [drivers/net/wireless/intel/iwlwifi/iwlwifi.ko] undefined!
> ERROR: "__compiletime_assert_2790" [drivers/net/wireless/intel/iwlwifi/iwlwifi.ko] undefined!
Being tracked here:
https://github.com/ClangBuiltLinux/linux/issues/580
It is a clang bug but has a kernel side fix. Nick sent one but it sounds
like Intel has another one pending:
https://lore.kernel.org/lkml/20190712001708.170259-1-ndesaulniers@xxxxxxxxxx/
https://lore.kernel.org/lkml/da053a97d771eff0ad8db37e644108ed2fad25a3.camel@xxxxxxxxx/
> This also emits a boatload of warnings like this:
>
> linux/fs/nfs/dir.c:451:34: warning: variable 'wq' is uninitialized when used within its own initialization
> [-Wuninitialized]
> DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
> ^~
> linux/include/linux/wait.h:74:63: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD_ONSTACK'
> struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
> ~~~~ ^~~~
> linux/include/linux/wait.h:72:33: note: expanded from macro '__WAIT_QUEUE_HEAD_INIT_ONSTACK'
> ({ init_waitqueue_head(&name); name; })
Being tracked here:
https://github.com/ClangBuiltLinux/linux/issues/499
Has a kernel workaround patch posted but it should be fixed in clang:
https://lore.kernel.org/lkml/20190703081119.209976-1-arnd@xxxxxxxx/
https://bugs.llvm.org/show_bug.cgi?id=42604
Thanks for continuing to test it and keeping us posted on the issues!
Nathan