netperf: pull patch pending upstream inclusion for -fno-common toolchain support

Without the change build fails on upstream gcc-10 as:

    ld: nettest_omni.o:(.bss+0x4230): multiple definition of
      `loc_sndavoid'; nettest_bsd.o:(.bss+0x1c): first defined here
This commit is contained in:
Sergei Trofimovich 2022-05-22 17:38:02 +01:00
parent e04ca59317
commit a4774b5b1b

View File

@ -1,4 +1,4 @@
{ libsmbios, lib, stdenv, autoreconfHook, fetchFromGitHub }: { libsmbios, lib, stdenv, autoreconfHook, fetchFromGitHub, fetchpatch }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "netperf"; pname = "netperf";
@ -11,6 +11,16 @@ stdenv.mkDerivation {
sha256 = "s4G1ZN+6LERdEMDkc+12ZQgTi6K+ppUYUCGn4faCS9c="; sha256 = "s4G1ZN+6LERdEMDkc+12ZQgTi6K+ppUYUCGn4faCS9c=";
}; };
patches = [
# Pul fix pending upstream inclusion for -fno-common toolchains:
# https://github.com/HewlettPackard/netperf/pull/46
(fetchpatch {
name = "fno-common.patch";
url = "https://github.com/HewlettPackard/netperf/commit/c6a2e17fe35f0e68823451fedfdf5b1dbecddbe3.patch";
sha256 = "P/lRa6EakSalKWDTgZ7bWeGleaTLLa5UhzulxKd1xE4=";
})
];
buildInputs = lib.optional (with stdenv.hostPlatform; isx86 && isLinux) libsmbios; buildInputs = lib.optional (with stdenv.hostPlatform; isx86 && isLinux) libsmbios;
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
autoreconfPhase = '' autoreconfPhase = ''