[Buildroot] [PATCH v1] dtc: Add set-ldshared.patch

Geoff Levand geoff at infradead.org
Fri Jul 27 22:23:28 UTC 2018


Fixes pylibfdt cross compile errors.

http://autobuild.buildroot.net/?reason=%dtc-1.4.7

Signed-off-by: Geoff Levand <geoff at infradead.org>
---

Hi Thomas,

This gets the dtc package to build with python support, but
it seems the real problem is that python distutils doesn't
set LDSHARED correctly, which should default to CC.

-Geoff

 package/dtc/set-ldshared.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 package/dtc/set-ldshared.patch

diff --git a/package/dtc/set-ldshared.patch b/package/dtc/set-ldshared.patch
new file mode 100644
index 0000000000..09220da359
--- /dev/null
+++ b/package/dtc/set-ldshared.patch
@@ -0,0 +1,13 @@
+diff --git a/pylibfdt/Makefile.pylibfdt b/pylibfdt/Makefile.pylibfdt
+index 9507d3d..c2ac8e9 100644
+--- a/pylibfdt/Makefile.pylibfdt
++++ b/pylibfdt/Makefile.pylibfdt
+@@ -8,7 +8,7 @@ PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
+ define run_setup
+ 	SOURCES="$(1)" CPPFLAGS="$(CPPFLAGS)" OBJDIR="$(PYLIBFDT_objdir)"
+ 	VERSION="$(dtc_version)"
+-	$(PYLIBFDT_objdir)/setup.py --quiet $(2)
++	LDSHARED="$(CC) -shared" $(PYLIBFDT_objdir)/setup.py --quiet $(2)
+ endef
+ 
+ $(PYMODULE): $(PYLIBFDT_srcs)
-- 
2.14.1



More information about the buildroot mailing list