summaryrefslogtreecommitdiffstats
path: root/meta/recipes-rt
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2012-03-21 22:46:05 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-22 16:47:06 +0000
commit0f4998389451cef12c799997dcadcb14f612301b (patch)
tree329228da8074b2cf65765896acf6a1cd63cba137 /meta/recipes-rt
parent22cb225044563f07655b6971b7f9ca16ddbbd94e (diff)
downloadpoky-0f4998389451cef12c799997dcadcb14f612301b.tar.gz
rt-tests: add patch to support passing CFLAGS/LDFLAGS
Enable passing OE and Distro-specific CFLAGS/LDFLAGS to the Makefile. (From OE-Core rev: fb89e4585644db0958a633a637fc70f0459af26a) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-rt')
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests-0.83/makefile-support-user-cflags-ldflags.patch89
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests_0.83.bb8
2 files changed, 94 insertions, 3 deletions
diff --git a/meta/recipes-rt/rt-tests/rt-tests-0.83/makefile-support-user-cflags-ldflags.patch b/meta/recipes-rt/rt-tests/rt-tests-0.83/makefile-support-user-cflags-ldflags.patch
new file mode 100644
index 0000000000..09a5d7b812
--- /dev/null
+++ b/meta/recipes-rt/rt-tests/rt-tests-0.83/makefile-support-user-cflags-ldflags.patch
@@ -0,0 +1,89 @@
1From: Darren Hart <dvhart@linux.intel.com>
2Subject: [PATCH rt-tests RFC 4/6] Makefile: Support user supplied CFLAGS and LDFLAGS
3Date: Thu, 22 Mar 2012 02:14:04 +0100
4
5Accept user supplied CFLAGS and LDFLAGS, overwriting the
6Makefile supplied versions. This can cause the build to
7fail if the user does not provide at least what the Makefile
8defines, but so be it.
9
10Upstream-Status: Submitted [linux-rt-users@vger.kernel.org]
11
12Signed-off-by: Darren Hart <dvhart@linux.intel.com>
13CC: Clark Williams <williams@redhat.com>
14CC: John Kacur <jkacur@redhat.com>
15CC: Denys Dmytriyenko <denis@denix.org>
16Signed-off-by: John Kacur <jkacur@redhat.com>
17---
18 Makefile | 25 +++++++++++++------------
19 1 files changed, 13 insertions(+), 12 deletions(-)
20
21diff --git a/Makefile b/Makefile
22index 4038dcc..e1edf6c 100644
23--- a/Makefile
24+++ b/Makefile
25@@ -20,7 +20,8 @@ ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
26 NUMA := 1
27 endif
28
29-CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
30+CFLAGS ?= -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
31+LDFLAGS ?=
32
33 PYLIB := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
34
35@@ -61,41 +62,41 @@ all: $(TARGETS) hwlatdetect
36 -include $(sources:.c=.d)
37
38 cyclictest: cyclictest.o rt-utils.o
39- $(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(NUMA_LIBS)
40+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(NUMA_LIBS)
41
42 signaltest: signaltest.o rt-utils.o
43- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
44+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
45
46 pi_stress: pi_stress.o
47- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
48+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
49
50 hwlatdetect: src/hwlatdetect/hwlatdetect.py
51 chmod +x src/hwlatdetect/hwlatdetect.py
52 ln -s src/hwlatdetect/hwlatdetect.py hwlatdetect
53
54 rt-migrate-test: rt-migrate-test.o
55- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
56+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
57
58 ptsematest: ptsematest.o rt-utils.o rt-get_cpu.o
59- $(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
60+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
61
62 sigwaittest: sigwaittest.o rt-utils.o rt-get_cpu.o
63- $(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
64+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
65
66 svsematest: svsematest.o rt-utils.o rt-get_cpu.o
67- $(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
68+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
69
70 pmqtest: pmqtest.o rt-utils.o rt-get_cpu.o
71- $(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
72+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
73
74 sendme: sendme.o rt-utils.o rt-get_cpu.o
75- $(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
76+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
77
78 pip_stress: pip_stress.o error.o rt-utils.o
79- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
80+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
81
82 hackbench: hackbench.o
83- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
84+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
85
86 CLEANUP = $(TARGETS) *.o .depend *.*~ *.orig *.rej rt-tests.spec *.d
87 CLEANUP += $(if $(wildcard .git), ChangeLog)
88--
891.7.7.6
diff --git a/meta/recipes-rt/rt-tests/rt-tests_0.83.bb b/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
index 1a91e867eb..6c4931e0a9 100644
--- a/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
+++ b/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
@@ -11,13 +11,15 @@ SRCREV = "5f1e84f8b015df3ff950056494134eca3f640d70"
11 11
12# git -> 0.83 needs a PE bump 12# git -> 0.83 needs a PE bump
13PE = "1" 13PE = "1"
14PR = "r1" 14PR = "r2"
15 15
16SRC_URI = "git://github.com/clrkwllms/rt-tests.git" 16SRC_URI = "git://github.com/clrkwllms/rt-tests.git \
17 file://makefile-support-user-cflags-ldflags.patch"
17 18
18S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
19 20
20CFLAGS += "-I${S}/src/include -D_GNU_SOURCE -Wall -Wno-nonnulli ${LDFLAGS}" 21# need to append rt-tests' default CFLAGS to ours
22CFLAGS += "-I${S}/src/include -D_GNU_SOURCE -Wall -Wno-nonnulli"
21 23
22# calling 'uname -m' is broken on crossbuilds 24# calling 'uname -m' is broken on crossbuilds
23EXTRA_OEMAKE = "NUMA=0" 25EXTRA_OEMAKE = "NUMA=0"