crust-firmware / crust

SCP (power management) firmware for sunxi SoCs
Other
150 stars 34 forks source link

Makefile: allow override of BUILDCC #201

Closed heitbaum closed 2 years ago

heitbaum commented 2 years ago

Purpose

Allow BUILDCC to be overridden, as crust build fails when cc is missing (e.g. minimal Ubuntu 20.04)

Considerations for reviewers

Issue identified in LibreELEC builds with the minimal focal 20.04 docker. cc is not available. Patch currently in place - https://github.com/LibreELEC/LibreELEC.tv/pull/5953 - but better solution is to allow BUILDCC to be overridden and use the toolchain compiler (not the Operating System supplied cc compiler.)

Error log

BUILD      crust (target)
    TOOLCHAIN      manual
...
  HOSTCC  build/3rdparty/kconfig/conf.o
/bin/sh: 1: exec: cc: not found
make[1]: *** [Makefile:170: build/3rdparty/kconfig/conf.o] Error 127
...
smaeul commented 2 years ago

This change is fine, and I plan to merge it regardless, but the description is not strictly accurate. While BUILDCC is not taken from an environment variable, it can already be overridden on the make command line, like LibreELEC does with HOSTCC for Linux and for U-Boot. I wonder if that is a satisfactory solution?