0b2feb16d5697a27f3443c3355e2fc1936321cdc
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / rt-tests / 04-Makefile-fix-tests-dependencies.patch
1 From e464368807211978fe2dfccf081fa8dc7a35b71b Mon Sep 17 00:00:00 2001
2 From: Baruch Siach <baruch@tkos.co.il>
3 Date: Fri, 23 Jan 2015 07:52:21 +0200
4 Subject: [PATCH] Makefile: fix tests dependencies
5
6 librttest is listed in $(LIBS) so all tests must depend on librttest.a.
7 Fixes build failures like:
8
9 .../armv7-ctng-linux-gnueabihf-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Os -g2  -o hackbench hackbench.o -lrt -lpthread -lrttest -L.
10 .../armv7-ctng-linux-gnueabihf/bin/ld: cannot find -lrttest
11 collect2: error: ld returned 1 exit status
12
13 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
14 ---
15  Makefile | 6 +++---
16  1 file changed, 3 insertions(+), 3 deletions(-)
17
18 diff --git a/Makefile b/Makefile
19 index a3879cea8164..b9a1fed1b920 100644
20 --- a/Makefile
21 +++ b/Makefile
22 @@ -69,14 +69,14 @@ cyclictest: cyclictest.o librttest.a
23  signaltest: signaltest.o librttest.a
24         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
25  
26 -pi_stress: pi_stress.o
27 +pi_stress: pi_stress.o librttest.a
28         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
29  
30  hwlatdetect:  src/hwlatdetect/hwlatdetect.py
31         chmod +x src/hwlatdetect/hwlatdetect.py
32         ln -s src/hwlatdetect/hwlatdetect.py hwlatdetect
33  
34 -rt-migrate-test: rt-migrate-test.o
35 +rt-migrate-test: rt-migrate-test.o librttest.a
36         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
37  
38  ptsematest: ptsematest.o librttest.a
39 @@ -97,7 +97,7 @@ sendme: sendme.o librttest.a
40  pip_stress: pip_stress.o librttest.a
41         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
42  
43 -hackbench: hackbench.o
44 +hackbench: hackbench.o librttest.a
45         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
46  
47  librttest.a: rt-utils.o error.o rt-get_cpu.o
48 -- 
49 2.1.4
50