summaryrefslogtreecommitdiffstats
path: root/meta/recipes-rt/rt-tests/rt-tests-0.83/makefile-support-user-cflags-ldflags.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-rt/rt-tests/rt-tests-0.83/makefile-support-user-cflags-ldflags.patch')
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests-0.83/makefile-support-user-cflags-ldflags.patch89
1 files changed, 89 insertions, 0 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