From 578e075e1a4e7c457c0032efff958622d18d341c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 15 May 2022 17:12:05 +0100 Subject: [PATCH] lcdproc: pull upstream fix for fno-common toolchains Without the change build fails on upstream gcc-10 as: ld: iface.o:(.bss+0x0): multiple definition of `iface'; main.o:(.bss+0x60): first defined here --- pkgs/servers/monitoring/lcdproc/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/servers/monitoring/lcdproc/default.nix b/pkgs/servers/monitoring/lcdproc/default.nix index bd0a7dc0dfbe..949be34b80b5 100644 --- a/pkgs/servers/monitoring/lcdproc/default.nix +++ b/pkgs/servers/monitoring/lcdproc/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , autoreconfHook , makeWrapper , pkg-config @@ -27,6 +28,14 @@ stdenv.mkDerivation rec { patches = [ ./hardcode_mtab.patch + + # Pull upstream fix for -fno-common toolchains: + # https://github.com/lcdproc/lcdproc/pull/148 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/lcdproc/lcdproc/commit/fda5302878692da933dc03cd011f8ddffefa07a4.patch"; + sha256 = "0ld6p1r4rjsnjr63afw3lp5lx25jxjs07lsp9yc3q96r91r835cy"; + }) ]; # we don't need to see the GPL every time we launch lcdd in the foreground