diff mbox series

[U-Boot] pylibfdt: Add missing CC and LD to Makefile

Message ID 20180517211814.10109-1-marex@denx.de
State Changes Requested
Headers show
Series [U-Boot] pylibfdt: Add missing CC and LD to Makefile | expand

Commit Message

Marek Vasut May 17, 2018, 9:18 p.m. UTC
Add missing CC and LDSHARED variables to the Makefile to pass the
correct C compiler and linker path to the build of _libfdt.so .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
---
Note: This fixes the long standing issue when building U-Boot with
      OE for qemux86 or qemux86_64, where the build will try to use
      the host compiler, which OE will block and thus the build will
      crash on missing compiler/linker binary. With this patch, the
      OE will correctly pass in the compiler/linker generated during
      the build, just like it does for all the other tools.
---
 scripts/dtc/pylibfdt/Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Glass May 18, 2018, 1:38 a.m. UTC | #1
On 17 May 2018 at 14:18, Marek Vasut <marex@denx.de> wrote:
>
> Add missing CC and LDSHARED variables to the Makefile to pass the
> correct C compiler and linker path to the build of _libfdt.so .
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Simon Glass <sjg@chromium.org>
> ---
> Note: This fixes the long standing issue when building U-Boot with
>       OE for qemux86 or qemux86_64, where the build will try to use
>       the host compiler, which OE will block and thus the build will
>       crash on missing compiler/linker binary. With this patch, the
>       OE will correctly pass in the compiler/linker generated during
>       the build, just like it does for all the other tools.
> ---
>  scripts/dtc/pylibfdt/Makefile | 1 +
>  1 file changed, 1 insertion(+)

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

>
> diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
> index 01d5e0ffe3..e6f6e9f633 100644
> --- a/scripts/dtc/pylibfdt/Makefile
> +++ b/scripts/dtc/pylibfdt/Makefile
> @@ -15,6 +15,7 @@ PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) \
>
>  quiet_cmd_pymod = PYMOD   $@
>        cmd_pymod = unset CC; unset CROSS_COMPILE; unset CFLAGS;\

Please can you remove the 'unset CC'? It does not seem necessary since
you set it later:

> +               CC="$(HOSTCC)" LDSHARED="$(HOSTCC) -shared " \
>                 LDFLAGS="$(HOSTLDFLAGS)" \
>                 VERSION="u-boot-$(UBOOTVERSION)" \
>                 CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \
> --
> 2.16.2
>
Marek Vasut May 18, 2018, 7:51 a.m. UTC | #2
On 05/18/2018 03:38 AM, Simon Glass wrote:
> On 17 May 2018 at 14:18, Marek Vasut <marex@denx.de> wrote:
>>
>> Add missing CC and LDSHARED variables to the Makefile to pass the
>> correct C compiler and linker path to the build of _libfdt.so .
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Tom Rini <trini@konsulko.com>
>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Cc: Simon Glass <sjg@chromium.org>
>> ---
>> Note: This fixes the long standing issue when building U-Boot with
>>       OE for qemux86 or qemux86_64, where the build will try to use
>>       the host compiler, which OE will block and thus the build will
>>       crash on missing compiler/linker binary. With this patch, the
>>       OE will correctly pass in the compiler/linker generated during
>>       the build, just like it does for all the other tools.
>> ---
>>  scripts/dtc/pylibfdt/Makefile | 1 +
>>  1 file changed, 1 insertion(+)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
>>
>> diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
>> index 01d5e0ffe3..e6f6e9f633 100644
>> --- a/scripts/dtc/pylibfdt/Makefile
>> +++ b/scripts/dtc/pylibfdt/Makefile
>> @@ -15,6 +15,7 @@ PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) \
>>
>>  quiet_cmd_pymod = PYMOD   $@
>>        cmd_pymod = unset CC; unset CROSS_COMPILE; unset CFLAGS;\
> 
> Please can you remove the 'unset CC'? It does not seem necessary since
> you set it later:

Yeah.

>> +               CC="$(HOSTCC)" LDSHARED="$(HOSTCC) -shared " \
>>                 LDFLAGS="$(HOSTLDFLAGS)" \
>>                 VERSION="u-boot-$(UBOOTVERSION)" \
>>                 CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \
>> --
>> 2.16.2
>>
diff mbox series

Patch

diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
index 01d5e0ffe3..e6f6e9f633 100644
--- a/scripts/dtc/pylibfdt/Makefile
+++ b/scripts/dtc/pylibfdt/Makefile
@@ -15,6 +15,7 @@  PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) \
 
 quiet_cmd_pymod = PYMOD   $@
       cmd_pymod = unset CC; unset CROSS_COMPILE; unset CFLAGS;\
+		CC="$(HOSTCC)" LDSHARED="$(HOSTCC) -shared " \
 		LDFLAGS="$(HOSTLDFLAGS)" \
 		VERSION="u-boot-$(UBOOTVERSION)" \
 		CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \