* [U-Boot] [PATCH] Revert "build: Always build the libfdt python module"
@ 2017-01-23 12:37 Simon Glass
2017-01-23 12:56 ` Emmanuel Vadot
2017-01-23 12:57 ` Heiko Schocher
0 siblings, 2 replies; 4+ messages in thread
From: Simon Glass @ 2017-01-23 12:37 UTC (permalink / raw)
To: u-boot
This appears to cause problems with powerpc:
+x86_64-linux-gnu-gcc: error: unrecognized command line option ?-melf32ppclinux?
+error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
+make[2]: *** [tools/_libfdt.so] Error 1
+make[1]: *** [tools] Error 2
+make: *** [sub-make] Error 2
It may need to be made ARM-specific.
This reverts commit 1905c8fc711a527ff10550425498bc77e4db9ac3.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/Makefile b/tools/Makefile
index a609d058595..5b81dde4b06 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -111,7 +111,7 @@ fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o
# Build a libfdt Python module if swig is available
# Use 'sudo apt-get install swig libpython-dev' to enable this
-hostprogs-y += \
+hostprogs-$(CONFIG_SPL_OF_PLATDATA) += \
$(if $(shell which swig 2> /dev/null),_libfdt.so)
_libfdt.so-sharedobjs += $(LIBFDT_OBJS)
libfdt:
--
2.11.0.483.g087da7b7c-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] Revert "build: Always build the libfdt python module"
2017-01-23 12:37 [U-Boot] [PATCH] Revert "build: Always build the libfdt python module" Simon Glass
@ 2017-01-23 12:56 ` Emmanuel Vadot
2017-01-23 13:41 ` Tom Rini
2017-01-23 12:57 ` Heiko Schocher
1 sibling, 1 reply; 4+ messages in thread
From: Emmanuel Vadot @ 2017-01-23 12:56 UTC (permalink / raw)
To: u-boot
Hi Simon,
On Mon, 23 Jan 2017 05:37:50 -0700
Simon Glass <sjg@chromium.org> wrote:
> This appears to cause problems with powerpc:
>
> +x86_64-linux-gnu-gcc: error: unrecognized command line option ?-melf32ppclinux?
> +error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
> +make[2]: *** [tools/_libfdt.so] Error 1
> +make[1]: *** [tools] Error 2
> +make: *** [sub-make] Error 2
Why does your hostcc have this cflags ?
There is a problem where we do not check that we can build python
module (I'll look at how to check this properly) as Heiko just reported
but the fact that your hostcc have an ppc flags just seems wrong, there
must be another problem.
> It may need to be made ARM-specific.
>
> This reverts commit 1905c8fc711a527ff10550425498bc77e4db9ac3.
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> tools/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/Makefile b/tools/Makefile
> index a609d058595..5b81dde4b06 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -111,7 +111,7 @@ fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o
>
> # Build a libfdt Python module if swig is available
> # Use 'sudo apt-get install swig libpython-dev' to enable this
> -hostprogs-y += \
> +hostprogs-$(CONFIG_SPL_OF_PLATDATA) += \
> $(if $(shell which swig 2> /dev/null),_libfdt.so)
> _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
> libfdt:
> --
> 2.11.0.483.g087da7b7c-goog
--
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] Revert "build: Always build the libfdt python module"
2017-01-23 12:37 [U-Boot] [PATCH] Revert "build: Always build the libfdt python module" Simon Glass
2017-01-23 12:56 ` Emmanuel Vadot
@ 2017-01-23 12:57 ` Heiko Schocher
1 sibling, 0 replies; 4+ messages in thread
From: Heiko Schocher @ 2017-01-23 12:57 UTC (permalink / raw)
To: u-boot
Hello Simon,
Am 23.01.2017 um 13:37 schrieb Simon Glass:
> This appears to cause problems with powerpc:
>
> +x86_64-linux-gnu-gcc: error: unrecognized command line option ?-melf32ppclinux?
> +error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
> +make[2]: *** [tools/_libfdt.so] Error 1
> +make[1]: *** [tools] Error 2
> +make: *** [sub-make] Error 2
>
> It may need to be made ARM-specific.
>
> This reverts commit 1905c8fc711a527ff10550425498bc77e4db9ac3.
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> tools/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Yup, I posted this issue exactly today ...
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested on the tqm5200 board, so:
Tested-by: Heiko Schocher <hs@denx.de>
> diff --git a/tools/Makefile b/tools/Makefile
> index a609d058595..5b81dde4b06 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -111,7 +111,7 @@ fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o
>
> # Build a libfdt Python module if swig is available
> # Use 'sudo apt-get install swig libpython-dev' to enable this
> -hostprogs-y += \
> +hostprogs-$(CONFIG_SPL_OF_PLATDATA) += \
> $(if $(shell which swig 2> /dev/null),_libfdt.so)
> _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
> libfdt:
>
Why do we need this at all?
Fedora for example has no "libpython-dev" ... So at least the
"if" should check for "libpython-dev" too...
# dnf install libpython-dev Last metadata expiration check: 1:50:58 ago on Mon Jan 23 07:49:26 2017.
No package libpython-dev available.
Error: Unable to find a match.
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] Revert "build: Always build the libfdt python module"
2017-01-23 12:56 ` Emmanuel Vadot
@ 2017-01-23 13:41 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-01-23 13:41 UTC (permalink / raw)
To: u-boot
On Mon, Jan 23, 2017 at 01:56:25PM +0100, Emmanuel Vadot wrote:
>
> Hi Simon,
>
> On Mon, 23 Jan 2017 05:37:50 -0700
> Simon Glass <sjg@chromium.org> wrote:
>
> > This appears to cause problems with powerpc:
> >
> > +x86_64-linux-gnu-gcc: error: unrecognized command line option ?-melf32ppclinux?
> > +error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
> > +make[2]: *** [tools/_libfdt.so] Error 1
> > +make[1]: *** [tools] Error 2
> > +make: *** [sub-make] Error 2
>
> Why does your hostcc have this cflags ?
Looking into this, because it's python doing the building here:
swig -python -o tools/libfdt_wrap.c ../lib/libfdt/libfdt.swig python ../lib/libfdt/setup.py "-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ../include/libfdt_env.h -idirafterinclude -idirafter../include -idirafter../arch/powerpc/include -I../lib/libfdt -I../tools -DCONFIG_SYS_TEXT_BASE=0xFC000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE " ../lib/libfdt/fdt.c ../lib/libfdt/fdt_ro.c ../lib/libfdt/fdt_rw.c ../lib/libfdt/fdt_strerror.c ../lib/libfdt/fdt_wip.c ../lib/libfdt/fdt_region.c ../lib/libfdt/fdt_sw.c tools/libfdt_wrap.c
gcc-4.8.real: error: unrecognized command line option ?-melf32ppclinux?
I suspect that what's going on is that python is seeing LDFLAGS being
set to $(PLATFORM_LDFLAGS) and passing that along. ARM (and sandbox) do
not set PLATFORM_LDFLAGS so don't run into this problem.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170123/bb38f5b8/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-23 13:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-23 12:37 [U-Boot] [PATCH] Revert "build: Always build the libfdt python module" Simon Glass
2017-01-23 12:56 ` Emmanuel Vadot
2017-01-23 13:41 ` Tom Rini
2017-01-23 12:57 ` Heiko Schocher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox