Merge pull request #173970 from trofi/workaround-fno-common-for-lockdep

lockdep: add -fcommon workaround
This commit is contained in:
Sandro 2022-05-25 00:43:43 +02:00 committed by GitHub
commit 824ad4fe30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,6 +23,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ flex bison ];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: lockdep.o:/build/linux-5.0.21/tools/lib/lockdep/../../include/linux/rcu.h:5: multiple definition of
# `rcu_scheduler_active'; common.o:/build/linux-5.0.21/tools/lib/lockdep/../../include/linux/rcu.h:5: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
buildPhase = ''
make defconfig
make headers_install