brcm2708: switch to 3.14
[15.05/openwrt.git] / target / linux / brcm2708 / patches-3.10 / 0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch
1 From c2ab501c1e79c78de711a3592816a2fa93b2e527 Mon Sep 17 00:00:00 2001
2 From: Daniel Santos <daniel.santos@pobox.com>
3 Date: Fri, 3 Jan 2014 17:52:19 -0600
4 Subject: [PATCH 151/196] Makefiles: change EXTRA_CFLAGS to ccflags-y
5
6 According to section 3.7 of Documentation/kbuild/makefiles.txt, using
7 EXTRA_CFLAGS in Makefiles is "still supported but their usage is
8 deprecated." However, using make EXTRA_CFLAGS="-DSOMETHING" results in
9 EXTRA_CFLAGS from Makefiles being overwritten, obviously breaking the
10 build.  This patch converts to them to the newer ccflags-y which also
11 fixes the problem.
12 ---
13  drivers/char/broadcom/vc_cma/Makefile           | 18 ++++++++--------
14  drivers/misc/vc04_services/Makefile             |  2 +-
15  drivers/usb/host/dwc_common_port/Makefile       | 22 +++++++++----------
16  drivers/usb/host/dwc_common_port/Makefile.linux | 20 +++++++++---------
17  drivers/usb/host/dwc_otg/Makefile               | 28 ++++++++++++-------------
18  sound/arm/Makefile                              |  2 +-
19  6 files changed, 46 insertions(+), 46 deletions(-)
20
21 diff --git a/drivers/char/broadcom/vc_cma/Makefile b/drivers/char/broadcom/vc_cma/Makefile
22 index 61682bf..2d773f8 100644
23 --- a/drivers/char/broadcom/vc_cma/Makefile
24 +++ b/drivers/char/broadcom/vc_cma/Makefile
25 @@ -1,12 +1,12 @@
26 -EXTRA_CFLAGS  += -Wall -Wstrict-prototypes -Wno-trigraphs
27 -EXTRA_CFLAGS  += -Werror
28 -EXTRA_CFLAGS  += -I"drivers/misc/vc04_services"
29 -EXTRA_CFLAGS  += -I"drivers/misc/vc04_services/interface/vchi"
30 -EXTRA_CFLAGS  += -I"drivers/misc/vc04_services/interface/vchiq_arm"
31 -
32 -EXTRA_CFLAGS  += -D__KERNEL__
33 -EXTRA_CFLAGS  += -D__linux__
34 -EXTRA_CFLAGS  += -Werror
35 +ccflags-y += -Wall -Wstrict-prototypes -Wno-trigraphs
36 +ccflags-y += -Werror
37 +ccflags-y += -Idrivers/misc/vc04_services
38 +ccflags-y += -Idrivers/misc/vc04_services/interface/vchi
39 +ccflags-y += -Idrivers/misc/vc04_services/interface/vchiq_arm
40 +
41 +ccflags-y += -D__KERNEL__
42 +ccflags-y += -D__linux__
43 +ccflags-y += -Werror
44  
45  obj-$(CONFIG_BCM_VC_CMA) += vc-cma.o
46  
47 diff --git a/drivers/misc/vc04_services/Makefile b/drivers/misc/vc04_services/Makefile
48 index 1aeb20a..92e7525 100644
49 --- a/drivers/misc/vc04_services/Makefile
50 +++ b/drivers/misc/vc04_services/Makefile
51 @@ -12,7 +12,7 @@ vchiq-objs := \
52     interface/vchiq_arm/vchiq_util.o \
53     interface/vchiq_arm/vchiq_connected.o \
54  
55 -EXTRA_CFLAGS += -DVCOS_VERIFY_BKPTS=1 -Idrivers/misc/vc04_services -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000
56 +ccflags-y += -DVCOS_VERIFY_BKPTS=1 -Idrivers/misc/vc04_services -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000
57  
58  endif
59  
60 diff --git a/drivers/usb/host/dwc_common_port/Makefile b/drivers/usb/host/dwc_common_port/Makefile
61 index 63e3485..ec890b5 100644
62 --- a/drivers/usb/host/dwc_common_port/Makefile
63 +++ b/drivers/usb/host/dwc_common_port/Makefile
64 @@ -4,16 +4,16 @@
65  
66  ifneq ($(KERNELRELEASE),)
67  
68 -EXTRA_CFLAGS   += -DDWC_LINUX
69 -#EXTRA_CFLAGS  += -DDEBUG
70 -#EXTRA_CFLAGS  += -DDWC_DEBUG_REGS
71 -#EXTRA_CFLAGS  += -DDWC_DEBUG_MEMORY
72 +ccflags-y      += -DDWC_LINUX
73 +#ccflags-y     += -DDEBUG
74 +#ccflags-y     += -DDWC_DEBUG_REGS
75 +#ccflags-y     += -DDWC_DEBUG_MEMORY
76  
77 -EXTRA_CFLAGS   += -DDWC_LIBMODULE
78 -EXTRA_CFLAGS   += -DDWC_CCLIB
79 -#EXTRA_CFLAGS  += -DDWC_CRYPTOLIB
80 -EXTRA_CFLAGS   += -DDWC_NOTIFYLIB
81 -EXTRA_CFLAGS   += -DDWC_UTFLIB
82 +ccflags-y      += -DDWC_LIBMODULE
83 +ccflags-y      += -DDWC_CCLIB
84 +#ccflags-y     += -DDWC_CRYPTOLIB
85 +ccflags-y      += -DDWC_NOTIFYLIB
86 +ccflags-y      += -DDWC_UTFLIB
87  
88  obj-$(CONFIG_USB_DWCOTG)       += dwc_common_port_lib.o
89  dwc_common_port_lib-objs := dwc_cc.o dwc_modpow.o dwc_dh.o \
90 @@ -24,8 +24,8 @@ kernrelwd := $(subst ., ,$(KERNELRELEASE))
91  kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd))
92                             
93  ifneq ($(kernrel3),2.6.20)
94 -# grayg - I only know that we use EXTRA_CFLAGS in 2.6.31 actually
95 -EXTRA_CFLAGS += $(CPPFLAGS)
96 +# grayg - I only know that we use ccflags-y in 2.6.31 actually
97 +ccflags-y += $(CPPFLAGS)
98  endif
99  
100  else
101 diff --git a/drivers/usb/host/dwc_common_port/Makefile.linux b/drivers/usb/host/dwc_common_port/Makefile.linux
102 index 961df3f..0cef7b4 100644
103 --- a/drivers/usb/host/dwc_common_port/Makefile.linux
104 +++ b/drivers/usb/host/dwc_common_port/Makefile.linux
105 @@ -3,16 +3,16 @@
106  #
107  ifneq ($(KERNELRELEASE),)
108  
109 -EXTRA_CFLAGS   += -DDWC_LINUX
110 -#EXTRA_CFLAGS  += -DDEBUG
111 -#EXTRA_CFLAGS  += -DDWC_DEBUG_REGS
112 -#EXTRA_CFLAGS  += -DDWC_DEBUG_MEMORY
113 -
114 -EXTRA_CFLAGS   += -DDWC_LIBMODULE
115 -EXTRA_CFLAGS   += -DDWC_CCLIB
116 -EXTRA_CFLAGS   += -DDWC_CRYPTOLIB
117 -EXTRA_CFLAGS   += -DDWC_NOTIFYLIB
118 -EXTRA_CFLAGS   += -DDWC_UTFLIB
119 +ccflags-y      += -DDWC_LINUX
120 +#ccflags-y     += -DDEBUG
121 +#ccflags-y     += -DDWC_DEBUG_REGS
122 +#ccflags-y     += -DDWC_DEBUG_MEMORY
123 +
124 +ccflags-y      += -DDWC_LIBMODULE
125 +ccflags-y      += -DDWC_CCLIB
126 +ccflags-y      += -DDWC_CRYPTOLIB
127 +ccflags-y      += -DDWC_NOTIFYLIB
128 +ccflags-y      += -DDWC_UTFLIB
129  
130  obj-m                   := dwc_common_port_lib.o
131  dwc_common_port_lib-objs := dwc_cc.o dwc_modpow.o dwc_dh.o \
132 diff --git a/drivers/usb/host/dwc_otg/Makefile b/drivers/usb/host/dwc_otg/Makefile
133 index 6bd6a2e..c11cbc2 100644
134 --- a/drivers/usb/host/dwc_otg/Makefile
135 +++ b/drivers/usb/host/dwc_otg/Makefile
136 @@ -12,22 +12,22 @@ ifeq ($(BUS_INTERFACE),)
137          BUS_INTERFACE = -DPLATFORM_INTERFACE
138  endif
139  
140 -#EXTRA_CFLAGS  += -DDEBUG
141 -#EXTRA_CFLAGS  += -DDWC_OTG_DEBUGLEV=1 # reduce common debug msgs
142 +#ccflags-y     += -DDEBUG
143 +#ccflags-y     += -DDWC_OTG_DEBUGLEV=1 # reduce common debug msgs
144  
145  # Use one of the following flags to compile the software in host-only or
146  # device-only mode.
147 -#EXTRA_CFLAGS        += -DDWC_HOST_ONLY
148 -#EXTRA_CFLAGS        += -DDWC_DEVICE_ONLY
149 -
150 -EXTRA_CFLAGS   += -Dlinux -DDWC_HS_ELECT_TST
151 -#EXTRA_CFLAGS  += -DDWC_EN_ISOC
152 -EXTRA_CFLAGS           += -I$(obj)/../dwc_common_port
153 -#EXTRA_CFLAGS          += -I$(PORTLIB)
154 -EXTRA_CFLAGS           += -DDWC_LINUX
155 -EXTRA_CFLAGS           += $(CFI)
156 -EXTRA_CFLAGS   += $(BUS_INTERFACE)
157 -#EXTRA_CFLAGS  += -DDWC_DEV_SRPCAP
158 +#ccflags-y        += -DDWC_HOST_ONLY
159 +#ccflags-y        += -DDWC_DEVICE_ONLY
160 +
161 +ccflags-y      += -Dlinux -DDWC_HS_ELECT_TST
162 +#ccflags-y     += -DDWC_EN_ISOC
163 +ccflags-y      += -I$(obj)/../dwc_common_port
164 +#ccflags-y     += -I$(PORTLIB)
165 +ccflags-y      += -DDWC_LINUX
166 +ccflags-y      += $(CFI)
167 +ccflags-y      += $(BUS_INTERFACE)
168 +#ccflags-y     += -DDWC_DEV_SRPCAP
169  
170  obj-$(CONFIG_USB_DWCOTG) += dwc_otg.o
171  
172 @@ -45,7 +45,7 @@ kernrelwd := $(subst ., ,$(KERNELRELEASE))
173  kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd))
174  
175  ifneq ($(kernrel3),2.6.20)
176 -EXTRA_CFLAGS += $(CPPFLAGS)
177 +ccflags-y += $(CPPFLAGS)
178  endif
179  
180  else
181 diff --git a/sound/arm/Makefile b/sound/arm/Makefile
182 index 181cb57..63cdfb7 100644
183 --- a/sound/arm/Makefile
184 +++ b/sound/arm/Makefile
185 @@ -18,5 +18,5 @@ snd-pxa2xx-ac97-objs          := pxa2xx-ac97.o
186  obj-$(CONFIG_SND_BCM2835)      += snd-bcm2835.o
187  snd-bcm2835-objs               := bcm2835.o bcm2835-ctl.o bcm2835-pcm.o bcm2835-vchiq.o
188  
189 -EXTRA_CFLAGS += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000
190 +ccflags-y += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000
191  
192 -- 
193 1.9.1
194