summaryrefslogtreecommitdiff
path: root/packages/ltp/ltp-20080229/cross-compile.patch
blob: 456bf4f135889e8cf1062c50b0906725335d2a53 (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
51
52
53
54
55
56
57
Index: ltp-full-20080229/Makefile
===================================================================
--- ltp-full-20080229.orig/Makefile	2008-02-29 08:55:41.000000000 +0100
+++ ltp-full-20080229/Makefile	2008-03-01 01:14:35.000000000 +0100
@@ -33,11 +33,12 @@
 endif
 ifdef CROSS_COMPILER
 CC=$(CROSS_COMPILER)gcc
+CPP=$(CROSS_COMPILER)g++
 AR=$(CROSS_COMPILER)ar
 endif
 
 export CFLAGS += -Wall $(CROSS_CFLAGS)
-export CC AR LDFLAGS
+export CC AR LDFLAGS CPP
 
 -include config.mk
 
Index: ltp-full-20080229/testcases/ballista/ballista/Makefile
===================================================================
--- ltp-full-20080229.orig/testcases/ballista/ballista/Makefile	2008-02-29 08:55:46.000000000 +0100
+++ ltp-full-20080229/testcases/ballista/ballista/Makefile	2008-03-01 01:14:35.000000000 +0100
@@ -24,7 +24,7 @@
 ########################
 
 # compiler info for the host
-CC = g++ -Wno-deprecated
+CC = $(CPP) -Wno-deprecated
 CFLAGS = -w -O ${TARGET_DEF}
 CLIBS = -lpthread -ldl -lnsl -rdynamic
 TEST_MAN_FILE = selfHost
Index: ltp-full-20080229/testcases/kernel/security/filecaps/Makefile
===================================================================
--- ltp-full-20080229.orig/testcases/kernel/security/filecaps/Makefile	2008-03-01 01:14:49.000000000 +0100
+++ ltp-full-20080229/testcases/kernel/security/filecaps/Makefile	2008-03-01 01:15:05.000000000 +0100
@@ -20,7 +20,6 @@
 
 SCRIPTS = filecapstest.sh checkforlibcap.sh checkforfilecaps.sh
 ifeq ($(shell sh checkforlibcap.sh yesno),yes)
-CC=gcc
 
 CFLAGS += -I../../../../include -Wall
 LDLIBS += -L../../../../lib -lltp -lcap
@@ -29,11 +28,11 @@
 TARGETS = $(patsubst %.c,%,$(SRCS))
 INSTALLTARGETS = $(TARGETS) $(SCRIPTS)
 all: $(TARGETS)
-	gcc -o checkforlibcap gotlibcap.c
+	$(CC) -o checkforlibcap gotlibcap.c
 else
 all:
 	@echo "setcap or xattr headers not installed.  Please install libcap from"; echo "ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2"; echo "Then make clean in ltp or ltp/testcases/kernel/security/filecaps, and recompile ltp."
-	gcc -o checkforlibcap nolibcap.c
+	$(CC) -o checkforlibcap nolibcap.c
 TARGETS =
 endif