0002-Fix-python-client-cross-compile.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From 13c4ffcfde07f659a836fba4a604dc1c5024bb90 Mon Sep 17 00:00:00 2001
  2. From: Baruch Siach <baruch@tkos.co.il>
  3. Date: Tue, 29 Aug 2017 11:37:36 +0300
  4. Subject: [PATCH] Fix python client cross compile
  5. The setup.py setuptools wrapper needs to use a version of python built
  6. specifically for cross compiling to cross compile successfully. Allow
  7. setting that in the environment using the SETUPTOOLS_ENV variable.
  8. Fixes the following build failure:
  9. /usr/bin/ld: skipping incompatible .../lirc-tools-0.10.0/lib/.libs/liblirc_client.so when searching for -llirc_client
  10. /usr/bin/ld: cannot find -llirc_client
  11. collect2: error: ld returned 1 exit status
  12. error: command '/usr/bin/gcc' failed with exit status 1
  13. Makefile:1578: recipe for target 'all-local' failed
  14. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  15. ---
  16. Upstream status: https://sourceforge.net/p/lirc/tickets/308/
  17. Makefile.am | 2 ++
  18. 1 file changed, 2 insertions(+)
  19. diff --git a/Makefile.am b/Makefile.am
  20. index d8164fcd44cf..a16be4278ae2 100644
  21. --- a/Makefile.am
  22. +++ b/Makefile.am
  23. @@ -131,6 +131,7 @@ pep8: $(py_PYTHON)
  24. if HAVE_PYTHON35
  25. all-local:
  26. cd python-pkg; \
  27. + $(SETUPTOOLS_ENV) \
  28. CFLAGS="-I$(abs_top_srcdir)/lib -I$(abs_builddir)/lib" \
  29. LDFLAGS=-L$(abs_builddir)/lib/.libs $(PYTHON) setup.py \
  30. $(if $(VERBOSE),,-q) build
  31. @@ -179,6 +180,7 @@ $(abs_builddir)/python-pkg/setup.py:
  32. $(PYTHON_TARBALL): $(abs_builddir)/python-pkg/setup.py
  33. cp $(top_builddir)/VERSION $(abs_builddir)/python-pkg
  34. cd $(abs_builddir)/python-pkg; CFLAGS=-I$(abs_top_srcdir)/lib \
  35. + $(SETUPTOOLS_ENV) \
  36. LDFLAGS=-L$(abs_builddir)/lib/.libs $(PYTHON) setup.py -q sdist
  37. $(top_builddir)/python-pkg/VERSION: VERSION
  38. --
  39. 2.14.1