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

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. V2: Drop unset CC --- scripts/dtc/pylibfdt/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile index 01d5e0ffe3..c769d7db06 100644 --- a/scripts/dtc/pylibfdt/Makefile +++ b/scripts/dtc/pylibfdt/Makefile @@ -14,7 +14,8 @@ PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) \ $(obj)/libfdt.i
quiet_cmd_pymod = PYMOD $@ - cmd_pymod = unset CC; unset CROSS_COMPILE; unset CFLAGS;\ + cmd_pymod = unset CROSS_COMPILE; unset CFLAGS; \ + CC="$(HOSTCC)" LDSHARED="$(HOSTCC) -shared " \ LDFLAGS="$(HOSTLDFLAGS)" \ VERSION="u-boot-$(UBOOTVERSION)" \ CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \

Hi Marek
2018-05-18 16:56 GMT+09:00 Marek Vasut marex@denx.de:
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. V2: Drop unset CC
scripts/dtc/pylibfdt/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile index 01d5e0ffe3..c769d7db06 100644 --- a/scripts/dtc/pylibfdt/Makefile +++ b/scripts/dtc/pylibfdt/Makefile @@ -14,7 +14,8 @@ PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) \ $(obj)/libfdt.i
quiet_cmd_pymod = PYMOD $@
cmd_pymod = unset CC; unset CROSS_COMPILE; unset CFLAGS;\
cmd_pymod = unset CROSS_COMPILE; unset CFLAGS; \
CC="$(HOSTCC)" LDSHARED="$(HOSTCC) -shared " \
Do you need a space between -shared and the double-quote?
Anyway,
Reviewed-by: Masahiro Yamada yamada.masahiro@socionext.com

On Fri, May 18, 2018 at 09:56:53AM +0200, Marek Vasut 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 Reviewed-by: Masahiro Yamada yamada.masahiro@socionext.com
Applied to u-boot/master, thanks!
participants (3)
-
Marek Vasut
-
Masahiro Yamada
-
Tom Rini