lgpio: Fix cross-compilation build

The upstream Makefile [1] supports the CROSS_PREFIX variable to specify
the cross-compiler toolchain prefix. Without this, the build fails
when cross-compiling (e.g., for aarch64-multiplatform) because it
tries to use the native 'gcc' instead of the target compiler.

This fix allows building lgpio for other architectures using
pkgsCross.

[1] https://github.com/joan2937/lg/blob/v0.2.2/Makefile#L4
This commit is contained in:
matthiasdotsh
2025-12-17 09:05:12 +01:00
parent 6aef7c6beb
commit 2d587a5603
+1
View File
@@ -55,6 +55,7 @@ mkDerivation rec {
makeFlags = [
"prefix=$(out)"
"CROSS_PREFIX=${stdenv.cc.targetPrefix}"
];
meta = {