rt-tests-fix-build-system.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Fix various minor issues with rt-tests build system
  2. The issues fixed are :
  3. * Remove the automatic NUMA detection from the host
  4. architecture. This is broken when doing cross-compilation. One can
  5. still set NUMA=1 if NUMA support is desired.
  6. * Expand the CFLAGS provided through the environment instead of
  7. overriding it.
  8. * Provide a HASPYTHON variable to tell whether the target system has
  9. Python or not. Otherwise, the build system simply tests whether
  10. Python is available on the host. The PYLIB variable is also changed
  11. so that it can be overriden from the environment, in order to
  12. provide the correct Python module location for the target.
  13. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  14. Index: rt-tests/Makefile
  15. ===================================================================
  16. --- rt-tests.orig/Makefile
  17. +++ rt-tests/Makefile
  18. @@ -14,15 +14,11 @@
  19. mandir ?= $(prefix)/share/man
  20. srcdir ?= $(prefix)/src
  21. -machinetype = $(shell uname -m | \
  22. - sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
  23. -ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
  24. -NUMA := 1
  25. -endif
  26. -
  27. -CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
  28. +override CFLAGS += -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
  29. -PYLIB := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
  30. +ifeq ($(HASPYTHON),1)
  31. +PYLIB ?= $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
  32. +endif
  33. ifndef DEBUG
  34. CFLAGS += -O2