[U-Boot] [PATCH] Pass empty CFLAGS on invocation of libfdt/setup.py

Simon Glass sjg at chromium.org
Thu Mar 16 22:06:36 UTC 2017


Hi Max,

On 16 March 2017 at 12:38, Max Filippov <jcmvbkbc at gmail.com> wrote:
>
> When building u-boot tools in cross-build environment CFLAGS environment
> variable set up for target is taken into an account when building code
> for host. Set it to empty on invocation of python.
>
> This fixes the following build errors when cross-compiling for xtensa:
>
>   cc1: error: unrecognized command line option "-mlongcalls"
>   cc1: error: unrecognized command line option "-mauto-litpools"
>
> Signed-off-by: Max Filippov <jcmvbkbc at gmail.com>
> ---
>  tools/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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

Please see below

>
> diff --git a/tools/Makefile b/tools/Makefile
> index 1c840d7..c224e8a 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -120,7 +120,7 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
>  libfdt:
>
>  tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
> -       LDFLAGS="$(HOSTLDFLAGS)" python $(srctree)/lib/libfdt/setup.py \
> +       LDFLAGS="$(HOSTLDFLAGS)" CFLAGS="" python $(srctree)/lib/libfdt/setup.py \

Can we drop the "" ?

>                 "$(_hostc_flags)" $^
>         mv _libfdt.so $@
>
> --
> 2.1.4
>

Regards,
Simon


More information about the U-Boot mailing list