0005-tools-conditionally-disable-python-libfdt-wrapper.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From 4dc3139cc9fa12882792053bdce7b69aca9b91bf Mon Sep 17 00:00:00 2001
  2. From: Matt Weber <matthew.weber@rockwellcollins.com>
  3. Date: Mon, 1 May 2017 22:19:57 -0500
  4. Subject: [PATCH] tools: conditionally disable python libfdt wrapper
  5. Not all host systems want the default swig to be
  6. used when building the tools. Allow for the
  7. disabling of the wrapper to enable cross-compiling
  8. of the tools on a host system with swig.
  9. Upsteam submission for RFC:
  10. https://lists.denx.de/pipermail/u-boot/2017-May/289520.html
  11. Workaround for:
  12. http://autobuild.buildroot.net/results/6d5/6d52ac8bb71012aea6fc4c679691b31a3366728b
  13. Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
  14. ---
  15. tools/Makefile | 2 ++
  16. 1 file changed, 2 insertions(+)
  17. diff --git a/tools/Makefile b/tools/Makefile
  18. index 2fc4a58..7f6c29d 100644
  19. --- a/tools/Makefile
  20. +++ b/tools/Makefile
  21. @@ -114,6 +114,7 @@ fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o
  22. # Build a libfdt Python module if swig is available
  23. # Use 'sudo apt-get install swig libpython-dev' to enable this
  24. +ifndef CONFIG_TOOLS_PYTHON_WRAPPER_DISABLE
  25. hostprogs-y += \
  26. $(if $(shell which swig 2> /dev/null),_libfdt.so)
  27. _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
  28. @@ -126,6 +127,7 @@ tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
  29. tools/libfdt_wrap.c: $(srctree)/lib/libfdt/libfdt.swig
  30. swig -python -o $@ $<
  31. +endif
  32. # TODO(sjg@chromium.org): Is this correct on Mac OS?
  33. --
  34. 1.9.1