[PATCH v2 1/4] binman: Support cross-compiling test files to x86

Simon Glass sjg at chromium.org
Sun Sep 6 15:58:37 CEST 2020


On Sun, 6 Sep 2020 at 05:46, Alper Nebi Yasak <alpernebiyasak at gmail.com> wrote:
>
> 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 at gmail.com>
> ---
>
> Changes in v2:
> - Fix detecting architecture (HOST_ARCH should've been HOSTARCH)
> - Remove Makefile variables for unused tools
>
>  tools/binman/test/Makefile | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list