linux-kernel-module-cheat
linux-kernel-module-cheat copied to clipboard
Buildroot 2018.08 and GCC 9.2.0 build fails with "__EI___errno_location' specifies less restrictive attributes than its target"
At LKMC 5cdbd57de09b64f48d06351b065dc8949493d7e8
cd submodules/gcc
git checkout gcc-9_2_0-release
cd ../..
./build-buildroot -aA --buildroot-build-id gcc-9-2 -- toolchain
outcome after several minutes:
In file included from <command-line>:
./../include/libc-symbols.h:471:26: error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location': 'const', 'nothrow' [-Werror=missing-attributes]
471 | extern __typeof (name) __EI_##name \
| ^~~~~
./../include/libc-symbols.h:475:29: note: in expansion of macro '__hidden_ver1'
475 | # define hidden_def(name) __hidden_ver1(__GI_##name, name, name);
| ^~~~~~~~~~~~~
./../include/libc-symbols.h:539:32: note: in expansion of macro 'hidden_def'
539 | # define libc_hidden_def(name) hidden_def (name)
| ^~~~~~~~~~
errno-loc.c:28:1: note: in expansion of macro 'libc_hidden_def'
28 | libc_hidden_def (__errno_location)
| ^~~~~~~~~~~~~~~
errno-loc.c:24:1: note: '__EI___errno_location' target declared here
24 | __errno_location (void)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
TODO: should have added --no-all.
when building with a newer gcc use --disable-werror as a parameter to configure