aboutsummaryrefslogtreecommitdiff
path: root/package/rt-tests/04-Makefile-fix-tests-dependencies.patch
blob: 0b2feb16d5697a27f3443c3355e2fc1936321cdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From e464368807211978fe2dfccf081fa8dc7a35b71b Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch@tkos.co.il>
Date: Fri, 23 Jan 2015 07:52:21 +0200
Subject: [PATCH] Makefile: fix tests dependencies

librttest is listed in $(LIBS) so all tests must depend on librttest.a.
Fixes build failures like:

.../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.
.../armv7-ctng-linux-gnueabihf/bin/ld: cannot find -lrttest
collect2: error: ld returned 1 exit status

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index a3879cea8164..b9a1fed1b920 100644
--- a/Makefile
+++ b/Makefile
@@ -69,14 +69,14 @@ cyclictest: cyclictest.o librttest.a
 signaltest: signaltest.o librttest.a
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
-pi_stress: pi_stress.o
+pi_stress: pi_stress.o librttest.a
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 hwlatdetect:  src/hwlatdetect/hwlatdetect.py
 	chmod +x src/hwlatdetect/hwlatdetect.py
 	ln -s src/hwlatdetect/hwlatdetect.py hwlatdetect
 
-rt-migrate-test: rt-migrate-test.o
+rt-migrate-test: rt-migrate-test.o librttest.a
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 ptsematest: ptsematest.o librttest.a
@@ -97,7 +97,7 @@ sendme: sendme.o librttest.a
 pip_stress: pip_stress.o librttest.a
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
-hackbench: hackbench.o
+hackbench: hackbench.o librttest.a
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 librttest.a: rt-utils.o error.o rt-get_cpu.o
-- 
2.1.4