lockdep: add -fcommon workaround

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
This commit is contained in:
Sergei Trofimovich 2022-05-22 11:04:12 +01:00
parent 3b468e68b7
commit 1b11f2b6ac

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