From 7327069eccb47fb947e2a80d8b93ea8a8c8c0553 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 28 May 2022 17:23:12 +0100 Subject: [PATCH] pflask: pull fix pending upstream inclusion for -fno-common support Without the change build fails on upstream gcc-10 as: ld: src/util.c.1.o:/build/pflask/build/../src/printf.h:42: multiple definition of `use_syslog'; src/cgroup.c.1.o:/build/pflask/build/../src/printf.h:42: first defined here --- pkgs/os-specific/linux/pflask/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/pflask/default.nix b/pkgs/os-specific/linux/pflask/default.nix index deb3e06ca49d..1270a9b9494f 100644 --- a/pkgs/os-specific/linux/pflask/default.nix +++ b/pkgs/os-specific/linux/pflask/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python3, wafHook }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, python3, wafHook }: stdenv.mkDerivation rec { pname = "pflask"; @@ -11,6 +11,16 @@ stdenv.mkDerivation rec { hash = "sha256-bAKPUj/EipZ98kHbZiFZZI3hLVMoQpCrYKMmznpSDhg="; }; + patches = [ + # Pull patch pending upstream inclusion for -fno-common toolchain support: + # https://github.com/ghedo/pflask/pull/30 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/ghedo/pflask/commit/73ba32ec48e1e0e4a56b1bceed4635711526e079.patch"; + hash = "sha256-KVuBS7LbYJQv6NXljpSiGGja7ar7W6A6SKzkEjB1B6U="; + }) + ]; + nativeBuildInputs = [ python3 wafHook ]; postInstall = ''