tcb: fix cross-compilation of tcb

Without the change build fails to find `gcc`:

    $ nix build --no-link -f. pkgsCross.riscv64.shadow
    > make[1]: Entering directory '/build/source/libs'
    > gcc -O2  -I../include -Wall -Wextra -fPIC -c libtcb.c -o libtcb.o
    > /nix/store/b9jxsncywlygxjjyql0z5bq6z29m6j4r-bash-5.1-p16/bin/bash: line 1: gcc: command not found
This commit is contained in:
Sergei Trofimovich 2022-12-26 14:45:00 +00:00
parent 69ba914b99
commit 67ce2eda82

View File

@ -26,6 +26,9 @@ stdenv.mkDerivation rec {
--replace "PREFIX = /usr" "PREFIX = $out" \
--replace "SBINDIR = /sbin" "SBINDIR = $bin/bin" \
--replace "INCLUDEDIR = \$(PREFIX)/include" "INCLUDEDIR = $dev/include"
# Override default 'CC=gcc'
makeFlagsArray+=("CC=$CC")
'';
meta = with lib; {