summaryrefslogtreecommitdiffstats
path: root/selftest-kdbus-enable-cross-compilation.patch
blob: 77f35cae069e0412f6d4757a86e706def0089af1 (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
From: Tyler Baker <tyler.baker@linaro.org>
Date: Wed, 1 Apr 2015 16:20:16 -0700
Subject: [PATCH] selftest/kdbus: enable cross compilation

Use the CC variable instead of hard coding gcc and include lib.mk.

Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 tools/testing/selftests/kdbus/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/kdbus/Makefile b/tools/testing/selftests/kdbus/Makefile
index f6cfab26f315..de8242f9b00e 100644
--- a/tools/testing/selftests/kdbus/Makefile
+++ b/tools/testing/selftests/kdbus/Makefile
@@ -33,11 +33,13 @@ OBJS= \
 
 all: kdbus-test
 
+include ../lib.mk
+
 %.o: %.c
-	gcc $(CFLAGS) -c $< -o $@
+	$(CC) $(CFLAGS) -c $< -o $@
 
 kdbus-test: $(OBJS)
-	gcc $(CFLAGS) $^ $(LDLIBS) -o $@
+	$(CC) $(CFLAGS) $^ $(LDLIBS) -o $@
 
 run_tests:
 	./kdbus-test --tap