rutabaga_gfx: build for the right architecture
Previously, cross compiling rutabaga_gfx looked like it worked, but it
produced binaries for the build machine. This prevented
cross-compiling QEMU with rutabaga_gfx support enabled.
Fixes: 2825760665
("rutabaga_gfx: init at 0.1.2")
This commit is contained in:
parent
0c9055e823
commit
19bb0a96f4
@ -54,14 +54,22 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-wuF3Isrp+u5J8jPQoPsIOWYGNKLSNa2pLfvladAWkLs=";
|
||||
};
|
||||
|
||||
CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
|
||||
"CARGO_TARGET_${stdenv.hostPlatform.rust.cargoEnvVarTarget}_LINKER" =
|
||||
"${stdenv.cc.targetPrefix}cc";
|
||||
|
||||
postConfigure = ''
|
||||
cd rutabaga_gfx/ffi
|
||||
substituteInPlace Makefile --replace-fail pkg-config "$PKG_CONFIG"
|
||||
'';
|
||||
|
||||
# make install always rebuilds
|
||||
dontBuild = true;
|
||||
|
||||
makeFlags = [ "prefix=$(out)" ];
|
||||
|
||||
preInstall = ''
|
||||
cd rutabaga_gfx/ffi
|
||||
'';
|
||||
makeFlags = [
|
||||
"prefix=$(out)"
|
||||
"OUT=target/${stdenv.hostPlatform.rust.cargoShortTarget}/release"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://crosvm.dev/book/appendix/rutabaga_gfx.html";
|
||||
|
Loading…
Reference in New Issue
Block a user