0001-cross-compile.patch
1.34 KB
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
This patch allows us to set a value for the cross compiler via TARGETCC without
setting CC on the command line. CC is used for host tools as well as cross
compiled code so we cannot define it on the command line without breaking
the host tools build.
[Gustavo: update for nss 3.16.1]
[baruch: add OPTIMIZER handling]
Signed-off-by: Will Newton <will.newton@imgtec.com>
diff -Nuar nss-3.16.1-orig/nss/coreconf/Linux.mk nss-3.16.1/nss/coreconf/Linux.mk
--- nss-3.16.1-orig/nss/coreconf/Linux.mk 2014-05-02 06:27:18.000000000 +0300
+++ nss-3.16.1/nss/coreconf/Linux.mk 2014-07-01 02:38:18.701480512 +0300
@@ -16,9 +16,13 @@
IMPL_STRATEGY = _PTH
endif
-CC = gcc
-CCC = g++
-RANLIB = ranlib
+TARGETCC = gcc
+TARGETCCC = g++
+TARGETRANLIB = ranlib
+
+CC = $(TARGETCC)
+CCC = $(TARGETCCC)
+RANLIB = $(TARGETRANLIB)
DEFAULT_COMPILER = gcc
@@ -125,6 +129,7 @@
endif
endif
+OPTIMIZER = $(TARGET_OPTIMIZER)
ifeq ($(USE_PTHREADS),1)
OS_PTHREAD = -lpthread
diff -Nuar nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile nss-3.16.1/nss/coreconf/nsinstall/Makefile
--- nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile 2014-05-02 06:27:18.000000000 +0300
+++ nss-3.16.1/nss/coreconf/nsinstall/Makefile 2014-07-01 02:38:48.102185011 +0300
@@ -31,6 +31,7 @@
ifdef NATIVE_FLAGS
OS_CFLAGS=$(NATIVE_FLAGS)
+OPTIMIZER=
endif
include $(DEPTH)/coreconf/rules.mk