libcpuid: fix cross compilation to NetBSD
Applies an upstreamed patch which works around a double definition of popcount64. This change is all needed to cross compile nix to NetBSD, so we can extend the cross-trunk jobset as well.
This commit is contained in:
parent
d4577bc68d
commit
8580bda686
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libcpuid";
|
pname = "libcpuid";
|
||||||
|
@ -14,6 +14,12 @@ stdenv.mkDerivation rec {
|
||||||
patches = [
|
patches = [
|
||||||
# Work around https://github.com/anrieff/libcpuid/pull/102.
|
# Work around https://github.com/anrieff/libcpuid/pull/102.
|
||||||
./stdint.patch
|
./stdint.patch
|
||||||
|
# Fixes cross-compilation to NetBSD, remove me for libcpuid > 0.5.1
|
||||||
|
(fetchpatch {
|
||||||
|
name = "use-popcount-from-libc.patch";
|
||||||
|
url = "https://github.com/anrieff/libcpuid/commit/1acaf9980b55ae180cc08db218b9face28202519.patch";
|
||||||
|
sha256 = "0lvsv9baq0sria1f1ncn1b2783js29lfs5fv8milp54pg1wd5b7q";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook ];
|
nativeBuildInputs = [ autoreconfHook ];
|
||||||
|
|
|
@ -166,8 +166,7 @@ in
|
||||||
i686-embedded = mapTestOnCross lib.systems.examples.i686-embedded embedded;
|
i686-embedded = mapTestOnCross lib.systems.examples.i686-embedded embedded;
|
||||||
x86_64-embedded = mapTestOnCross lib.systems.examples.x86_64-embedded embedded;
|
x86_64-embedded = mapTestOnCross lib.systems.examples.x86_64-embedded embedded;
|
||||||
|
|
||||||
# TODO: fix cross compilation of nix{,Unstable} to netbsd and switch to common
|
x86_64-netbsd = mapTestOnCross lib.systems.examples.x86_64-netbsd common;
|
||||||
x86_64-netbsd = mapTestOnCross lib.systems.examples.x86_64-netbsd embedded;
|
|
||||||
|
|
||||||
# we test `embedded` instead of `linuxCommon` because very few packages
|
# we test `embedded` instead of `linuxCommon` because very few packages
|
||||||
# successfully cross-compile to Redox so far
|
# successfully cross-compile to Redox so far
|
||||||
|
|
Loading…
Reference in a new issue