From f6df882131aa4de5e6282925321864f81681184e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 3 Jun 2022 15:13:23 +0000 Subject: [PATCH] xorg.xf86videoopenchrome: pull upstream fix for -fno-common toolchain (#176074) * xorg.xf86videoopenchrome: pull upstream fix for -fno-common toolchain Without the chage build fails on upstream gcc-10 as: ld: .libs/via_xvmc.o:/build/xf86-video-openchrome-0.6.0/src/via_vt1632.h:47: multiple definition of `via_vt1632_funcs'; .libs/via_analog.o:/build/xf86-video-openchrome-0.6.0/src/via_vt1632.h:47: first defined here * Update pkgs/servers/x11/xorg/overrides.nix Co-authored-by: Sandro --- pkgs/servers/x11/xorg/overrides.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 7d6efc32a611..8ce406d836b6 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -878,6 +878,14 @@ self: super: xf86videoopenchrome = super.xf86videoopenchrome.overrideAttrs (attrs: { buildInputs = attrs.buildInputs ++ [ self.libXv ]; + patches = [ + # Pull upstream fix for -fno-common toolchains. + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/freedesktop/openchrome-xf86-video-openchrome/commit/edb46574d4686c59e80569ba236d537097dcdd0e.patch"; + sha256 = "0xqawg9zzwb7x5vaf3in60isbkl3zfjq0wcnfi45s3hiii943sxz"; + }) + ]; }); xf86videoxgi = super.xf86videoxgi.overrideAttrs (attrs: {