summaryrefslogtreecommitdiff
path: root/package/rt-tests/rt-tests-fix-build-system.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2011-12-22 13:13:38 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2012-01-02 22:47:35 +0100
commit2d75c7927f044e9e847f7f91db9365e8b711bb2b (patch)
tree03d62186ef66f440891d7ce9ad7b70b10128eec7 /package/rt-tests/rt-tests-fix-build-system.patch
parent43f8bb8c250b2e0fbf9fb73a240c299a60511cc4 (diff)
rt-tests: new package
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/rt-tests/rt-tests-fix-build-system.patch')
-rw-r--r--package/rt-tests/rt-tests-fix-build-system.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/package/rt-tests/rt-tests-fix-build-system.patch b/package/rt-tests/rt-tests-fix-build-system.patch
new file mode 100644
index 000000000..9d6aa0523
--- /dev/null
+++ b/package/rt-tests/rt-tests-fix-build-system.patch
@@ -0,0 +1,43 @@
+Fix various minor issues with rt-tests build system
+
+The issues fixed are :
+
+ * Remove the automatic NUMA detection from the host
+ architecture. This is broken when doing cross-compilation. One can
+ still set NUMA=1 if NUMA support is desired.
+
+ * Expand the CFLAGS provided through the environment instead of
+ overriding it.
+
+ * Provide a HASPYTHON variable to tell whether the target system has
+ Python or not. Otherwise, the build system simply tests whether
+ Python is available on the host. The PYLIB variable is also changed
+ so that it can be overriden from the environment, in order to
+ provide the correct Python module location for the target.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: rt-tests/Makefile
+===================================================================
+--- rt-tests.orig/Makefile
++++ rt-tests/Makefile
+@@ -14,15 +14,11 @@
+ mandir ?= $(prefix)/share/man
+ srcdir ?= $(prefix)/src
+
+-machinetype = $(shell uname -m | \
+- sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
+-ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
+-NUMA := 1
+-endif
+-
+-CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
++override CFLAGS += -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
+
+-PYLIB := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
++ifeq ($(HASPYTHON),1)
++PYLIB ?= $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
++endif
+
+ ifndef DEBUG
+ CFLAGS += -O2