0004-src-Makefile-don-t-pass-bogus-I-and-L-to-python-setu.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 4b1568bce5bbdc7bf76a4bbf1066ba7e7b84649f Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  3. Date: Fri, 25 Oct 2019 11:45:04 +0200
  4. Subject: [PATCH] src/Makefile: don't pass bogus -I and -L to python setup.py
  5. build_ext
  6. Using $(DESTDIR) during the build does not follow the normal/standard
  7. semantic of DESTDIR: it is normally only needed during the
  8. installation. Therefore, a lot of build systems/environments don't
  9. pass any DESTDIR at build time, which causes setup.py to be called
  10. with -I /usr/include -L /usr/lib, which breaks cross-compilation.
  11. [Upstream: https://github.com/SELinuxProject/selinux/pull/183]
  12. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  13. ---
  14. src/Makefile | 2 +-
  15. 1 file changed, 1 insertion(+), 1 deletion(-)
  16. diff --git a/src/Makefile b/src/Makefile
  17. index 2b1696a0..3b8bad81 100644
  18. --- a/src/Makefile
  19. +++ b/src/Makefile
  20. @@ -130,7 +130,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
  21. all: $(LIBA) $(LIBSO) $(LIBPC)
  22. pywrap: all selinuxswig_python_exception.i
  23. - CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR)
  24. + CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext
  25. rubywrap: all $(SWIGRUBYSO)
  26. --
  27. 2.21.0