The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libnss / 0001-cross-compile.patch
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.
5
6 [Gustavo: update for nss 3.16.1]
7 [baruch: add OPTIMIZER handling]
8 Signed-off-by: Will Newton <will.newton@imgtec.com>
9
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
16  
17 -CC                     = gcc
18 -CCC                    = g++
19 -RANLIB                 = ranlib
20 +TARGETCC               = gcc
21 +TARGETCCC              = g++
22 +TARGETRANLIB           = ranlib
23 +
24 +CC                     = $(TARGETCC)
25 +CCC                    = $(TARGETCCC)
26 +RANLIB                 = $(TARGETRANLIB)
27  
28  DEFAULT_COMPILER = gcc
29  
30 @@ -125,6 +129,7 @@
31  endif
32  endif
33  
34 +OPTIMIZER = $(TARGET_OPTIMIZER)
35  
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 @@
42  
43  ifdef NATIVE_FLAGS
44  OS_CFLAGS=$(NATIVE_FLAGS)
45 +OPTIMIZER=
46  endif
47  
48  include $(DEPTH)/coreconf/rules.mk