sngrep: fix error if gnutls and openssl are both enabled
[buildroot-gz.git] / package / libnss / 0001-cross-compile.patch
blob31de71bc5addd4efa8bd749b4e699353254f5e5c
1 This patch allows us to set a value for the cross compiler via TARGETCC without
2 setting CC on the command line. CC is used for host tools as well as cross
3 compiled code so we cannot define it on the command line without breaking
4 the host tools build.
6 [Gustavo: update for nss 3.16.1]
7 [baruch: add OPTIMIZER handling]
8 Signed-off-by: Will Newton <will.newton@imgtec.com>
10 diff -Nuar nss-3.16.1-orig/nss/coreconf/Linux.mk nss-3.16.1/nss/coreconf/Linux.mk
11 --- nss-3.16.1-orig/nss/coreconf/Linux.mk 2014-05-02 06:27:18.000000000 +0300
12 +++ nss-3.16.1/nss/coreconf/Linux.mk 2014-07-01 02:38:18.701480512 +0300
13 @@ -16,9 +16,13 @@
14 IMPL_STRATEGY = _PTH
15 endif
17 -CC = gcc
18 -CCC = g++
19 -RANLIB = ranlib
20 +TARGETCC = gcc
21 +TARGETCCC = g++
22 +TARGETRANLIB = ranlib
24 +CC = $(TARGETCC)
25 +CCC = $(TARGETCCC)
26 +RANLIB = $(TARGETRANLIB)
28 DEFAULT_COMPILER = gcc
30 @@ -125,6 +129,7 @@
31 endif
32 endif
34 +OPTIMIZER = $(TARGET_OPTIMIZER)
36 ifeq ($(USE_PTHREADS),1)
37 OS_PTHREAD = -lpthread
38 diff -Nuar nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile nss-3.16.1/nss/coreconf/nsinstall/Makefile
39 --- nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile 2014-05-02 06:27:18.000000000 +0300
40 +++ nss-3.16.1/nss/coreconf/nsinstall/Makefile 2014-07-01 02:38:48.102185011 +0300
41 @@ -31,6 +31,7 @@
43 ifdef NATIVE_FLAGS
44 OS_CFLAGS=$(NATIVE_FLAGS)
45 +OPTIMIZER=
46 endif
48 include $(DEPTH)/coreconf/rules.mk