build.sh: use a gcc with target triplet from PATH if CC=gcc is set
The motivation of this change is to be able to use the gcc version from
PATH (e.g. the bundled prebuilt) even in case CC=clang has been set
as default by the build.config:
-- Build with Clang from $PATH
-- Build with GCC from $PATH
$ CC=gcc ./build/build.sh
In case of build/build.sh, $PATH is usually setup for a prebuilt
In order to accomodate any cross compiler settings when falling back to
gcc, simply unset CC to let kbuild figure out the correct compiler from
It appears a bit hacky, but only breaks backward compatibility for the
case that somebody uses CC=gcc and expects the gcc from PATH to be used.
That case is still supported by passing an absolute path.
Signed-off-by: Matthias Maennich <email@example.com>
1 file changed