5c65018916c58ee57b568c70ae38b3420dab38ac
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / rt-tests / 03-fix-non-nptl-buil.patch
1 From c6920f97be02ca3fba9320b043acd578ce4c62d8 Mon Sep 17 00:00:00 2001
2 From: Alexey Brodkin <abrodkin@synopsys.com>
3 Date: Mon, 10 Nov 2014 10:00:13 +0300
4 Subject: [PATCH] Makefile: allow building selected tests with non-NPTL
5  toolchain
6
7 Some architectures are still stuck with non-NPTL toolchains.
8 These are for example ARC, Blackfin, Xtensa etc.
9
10 Still rt-tests are very good benchmarks and it would be good to enable use of
11 at least selected (those that will be built) tests on those architectures.
12
13 This change makes it possible to only build subset of tests that don't require
14 NPTL calls.
15
16 By default behavior is not modified - all tests are built, but if one wants
17 to build with non-NPTL toolchain just add "HAVE_NPTL=no" in command line
18 or modify "HAVE_NPTL" variable right in Makefile and execute "make".
19
20 This patch was submitted upstream:
21 https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg762958.html
22 so as soon as it is accepted with the next version bump this patch should be
23 removed.
24
25 Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
26 Cc: Vineet Gupta <vgupta@synopsys.com>
27 Cc: Clark Williams <clark.williams@gmail.com>
28 ---
29  Makefile | 11 ++++++++---
30  1 file changed, 8 insertions(+), 3 deletions(-)
31
32 diff --git a/Makefile b/Makefile
33 index 318a5c6..675edf7 100644
34 --- a/Makefile
35 +++ b/Makefile
36 @@ -1,8 +1,13 @@
37  VERSION_STRING = 0.89
38  
39 -sources = cyclictest.c signaltest.c pi_stress.c rt-migrate-test.c      \
40 -         ptsematest.c sigwaittest.c svsematest.c pmqtest.c sendme.c    \
41 -         pip_stress.c hackbench.c
42 +HAVE_NPTL ?= yes
43 +
44 +ifeq ($(HAVE_NPTL),yes)
45 +sources = cyclictest.c pi_stress.c pip_stress.c pmqtest.c rt-migrate-test.c
46 +endif
47 +
48 +sources += signaltest.c ptsematest.c sigwaittest.c svsematest.c sendme.c \
49 +         hackbench.c
50  
51  TARGETS = $(sources:.c=)
52  
53 -- 
54 1.9.3
55