]> git.baikalelectronics.ru Git - uboot.git/commit
binman: Support cross-compiling test files to x86
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>
Sun, 6 Sep 2020 11:46:04 +0000 (14:46 +0300)
committerSimon Glass <sjg@chromium.org>
Tue, 22 Sep 2020 18:54:13 +0000 (12:54 -0600)
commit08c6e7943f07a85fc7f2fce60f148b5384110749
tree474f80885a709628e59ea4ffaeb69e04758550ad
parent32d0e64f6f86a6bd8466e4cf278d553b4606070a
binman: Support cross-compiling test files to x86

These test files are currently "intended for use on x86 hosts", but most
of the tests using them can still pass when cross-compiled to x86 on an
arm64 host.

This patch enables non-x86 hosts to run the tests by specifying a
cross-compiler via CROSS_COMPILE. The list of variables it sets is taken
from the top-level Makefile. It would be possible to automatically set
an x86 cross-compiler with a few blocks like:

    ifneq ($(shell i386-linux-gnu-gcc --version 2> /dev/null),)
    CROSS_COMPILE = i386-linux-gnu-
    endif

But it wouldn't propagate to the binman process calling this Makefile,
so it's better just raise an error and expect 'binman test' to be run
with a correct CROSS_COMPILE.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/binman/test/Makefile