From 6b0031dbbe3439fa4a7cc59d024db71998aa4275 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 29 May 2022 07:59:42 +0100 Subject: [PATCH] super: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: pam.o:/build/super-3.30.0/super.h:293: multiple definition of `Method'; super.o:/build/super-3.30.0/super.h:293: first defined here --- pkgs/tools/security/super/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/super/default.nix b/pkgs/tools/security/super/default.nix index d87580975f19..eba7def957ce 100644 --- a/pkgs/tools/security/super/default.nix +++ b/pkgs/tools/security/super/default.nix @@ -26,7 +26,11 @@ stdenv.mkDerivation rec { }) ]; - NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE"; + # -fcommon: workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: pam.o:/build/super-3.30.0/super.h:293: multiple definition of + # `Method'; super.o:/build/super-3.30.0/super.h:293: first defined here + NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE -fcommon"; configureFlags = [ "--sysconfdir=/etc"