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