Commit 2d587a56 authored by matthiasdotsh's avatar matthiasdotsh
Browse files

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
parent 6aef7c6b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ mkDerivation rec {

  makeFlags = [
    "prefix=$(out)"
    "CROSS_PREFIX=${stdenv.cc.targetPrefix}"
  ];

  meta = {