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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
From 6544998027a0bb96d3f64ec5429757344c9a729a Mon Sep 17 00:00:00 2001
From: Daniel Santos <daniel.santos@pobox.com>
Date: Fri, 3 Jan 2014 17:52:19 -0600
Subject: [PATCH 151/174] Makefiles: change EXTRA_CFLAGS to ccflags-y
According to section 3.7 of Documentation/kbuild/makefiles.txt, using
EXTRA_CFLAGS in Makefiles is "still supported but their usage is
deprecated." However, using make EXTRA_CFLAGS="-DSOMETHING" results in
EXTRA_CFLAGS from Makefiles being overwritten, obviously breaking the
build. This patch converts to them to the newer ccflags-y which also
fixes the problem.
---
drivers/char/broadcom/vc_cma/Makefile | 18 ++++++++--------
drivers/misc/vc04_services/Makefile | 2 +-
drivers/usb/host/dwc_common_port/Makefile | 22 +++++++++----------
drivers/usb/host/dwc_common_port/Makefile.linux | 20 +++++++++---------
drivers/usb/host/dwc_otg/Makefile | 28 ++++++++++++-------------
sound/arm/Makefile | 2 +-
6 files changed, 46 insertions(+), 46 deletions(-)
--- a/drivers/char/broadcom/vc_cma/Makefile
+++ b/drivers/char/broadcom/vc_cma/Makefile
@@ -1,12 +1,12 @@
-EXTRA_CFLAGS += -Wall -Wstrict-prototypes -Wno-trigraphs
-EXTRA_CFLAGS += -Werror
-EXTRA_CFLAGS += -I"drivers/misc/vc04_services"
-EXTRA_CFLAGS += -I"drivers/misc/vc04_services/interface/vchi"
-EXTRA_CFLAGS += -I"drivers/misc/vc04_services/interface/vchiq_arm"
+ccflags-y += -Wall -Wstrict-prototypes -Wno-trigraphs
+ccflags-y += -Werror
+ccflags-y += -Idrivers/misc/vc04_services
+ccflags-y += -Idrivers/misc/vc04_services/interface/vchi
+ccflags-y += -Idrivers/misc/vc04_services/interface/vchiq_arm
-EXTRA_CFLAGS += -D__KERNEL__
-EXTRA_CFLAGS += -D__linux__
-EXTRA_CFLAGS += -Werror
+ccflags-y += -D__KERNEL__
+ccflags-y += -D__linux__
+ccflags-y += -Werror
obj-$(CONFIG_BCM_VC_CMA) += vc-cma.o
--- a/drivers/misc/vc04_services/Makefile
+++ b/drivers/misc/vc04_services/Makefile
@@ -12,7 +12,7 @@ vchiq-objs := \
interface/vchiq_arm/vchiq_util.o \
interface/vchiq_arm/vchiq_connected.o \
-EXTRA_CFLAGS += -DVCOS_VERIFY_BKPTS=1 -Idrivers/misc/vc04_services -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000
+ccflags-y += -DVCOS_VERIFY_BKPTS=1 -Idrivers/misc/vc04_services -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000
endif
--- a/drivers/usb/host/dwc_common_port/Makefile
+++ b/drivers/usb/host/dwc_common_port/Makefile
@@ -4,16 +4,16 @@
ifneq ($(KERNELRELEASE),)
-EXTRA_CFLAGS += -DDWC_LINUX
-#EXTRA_CFLAGS += -DDEBUG
-#EXTRA_CFLAGS += -DDWC_DEBUG_REGS
-#EXTRA_CFLAGS += -DDWC_DEBUG_MEMORY
-
-EXTRA_CFLAGS += -DDWC_LIBMODULE
-EXTRA_CFLAGS += -DDWC_CCLIB
-#EXTRA_CFLAGS += -DDWC_CRYPTOLIB
-EXTRA_CFLAGS += -DDWC_NOTIFYLIB
-EXTRA_CFLAGS += -DDWC_UTFLIB
+ccflags-y += -DDWC_LINUX
+#ccflags-y += -DDEBUG
+#ccflags-y += -DDWC_DEBUG_REGS
+#ccflags-y += -DDWC_DEBUG_MEMORY
+
+ccflags-y += -DDWC_LIBMODULE
+ccflags-y += -DDWC_CCLIB
+#ccflags-y += -DDWC_CRYPTOLIB
+ccflags-y += -DDWC_NOTIFYLIB
+ccflags-y += -DDWC_UTFLIB
obj-$(CONFIG_USB_DWCOTG) += dwc_common_port_lib.o
dwc_common_port_lib-objs := dwc_cc.o dwc_modpow.o dwc_dh.o \
@@ -24,8 +24,8 @@ kernrelwd := $(subst ., ,$(KERNELRELEASE
kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd))
ifneq ($(kernrel3),2.6.20)
-# grayg - I only know that we use EXTRA_CFLAGS in 2.6.31 actually
-EXTRA_CFLAGS += $(CPPFLAGS)
+# grayg - I only know that we use ccflags-y in 2.6.31 actually
+ccflags-y += $(CPPFLAGS)
endif
else
--- a/drivers/usb/host/dwc_common_port/Makefile.linux
+++ b/drivers/usb/host/dwc_common_port/Makefile.linux
@@ -3,16 +3,16 @@
#
ifneq ($(KERNELRELEASE),)
-EXTRA_CFLAGS += -DDWC_LINUX
-#EXTRA_CFLAGS += -DDEBUG
-#EXTRA_CFLAGS += -DDWC_DEBUG_REGS
-#EXTRA_CFLAGS += -DDWC_DEBUG_MEMORY
+ccflags-y += -DDWC_LINUX
+#ccflags-y += -DDEBUG
+#ccflags-y += -DDWC_DEBUG_REGS
+#ccflags-y += -DDWC_DEBUG_MEMORY
-EXTRA_CFLAGS += -DDWC_LIBMODULE
-EXTRA_CFLAGS += -DDWC_CCLIB
-EXTRA_CFLAGS += -DDWC_CRYPTOLIB
-EXTRA_CFLAGS += -DDWC_NOTIFYLIB
-EXTRA_CFLAGS += -DDWC_UTFLIB
+ccflags-y += -DDWC_LIBMODULE
+ccflags-y += -DDWC_CCLIB
+ccflags-y += -DDWC_CRYPTOLIB
+ccflags-y += -DDWC_NOTIFYLIB
+ccflags-y += -DDWC_UTFLIB
obj-m := dwc_common_port_lib.o
dwc_common_port_lib-objs := dwc_cc.o dwc_modpow.o dwc_dh.o \
--- a/drivers/usb/host/dwc_otg/Makefile
+++ b/drivers/usb/host/dwc_otg/Makefile
@@ -12,22 +12,22 @@ ifeq ($(BUS_INTERFACE),)
BUS_INTERFACE = -DPLATFORM_INTERFACE
endif
-#EXTRA_CFLAGS += -DDEBUG
-#EXTRA_CFLAGS += -DDWC_OTG_DEBUGLEV=1 # reduce common debug msgs
+#ccflags-y += -DDEBUG
+#ccflags-y += -DDWC_OTG_DEBUGLEV=1 # reduce common debug msgs
# Use one of the following flags to compile the software in host-only or
# device-only mode.
-#EXTRA_CFLAGS += -DDWC_HOST_ONLY
-#EXTRA_CFLAGS += -DDWC_DEVICE_ONLY
+#ccflags-y += -DDWC_HOST_ONLY
+#ccflags-y += -DDWC_DEVICE_ONLY
-EXTRA_CFLAGS += -Dlinux -DDWC_HS_ELECT_TST
-#EXTRA_CFLAGS += -DDWC_EN_ISOC
-EXTRA_CFLAGS += -I$(obj)/../dwc_common_port
-#EXTRA_CFLAGS += -I$(PORTLIB)
-EXTRA_CFLAGS += -DDWC_LINUX
-EXTRA_CFLAGS += $(CFI)
-EXTRA_CFLAGS += $(BUS_INTERFACE)
-#EXTRA_CFLAGS += -DDWC_DEV_SRPCAP
+ccflags-y += -Dlinux -DDWC_HS_ELECT_TST
+#ccflags-y += -DDWC_EN_ISOC
+ccflags-y += -I$(obj)/../dwc_common_port
+#ccflags-y += -I$(PORTLIB)
+ccflags-y += -DDWC_LINUX
+ccflags-y += $(CFI)
+ccflags-y += $(BUS_INTERFACE)
+#ccflags-y += -DDWC_DEV_SRPCAP
obj-$(CONFIG_USB_DWCOTG) += dwc_otg.o
@@ -45,7 +45,7 @@ kernrelwd := $(subst ., ,$(KERNELRELEASE
kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd))
ifneq ($(kernrel3),2.6.20)
-EXTRA_CFLAGS += $(CPPFLAGS)
+ccflags-y += $(CPPFLAGS)
endif
else
--- a/sound/arm/Makefile
+++ b/sound/arm/Makefile
@@ -18,5 +18,5 @@ snd-pxa2xx-ac97-objs := pxa2xx-ac97.o
obj-$(CONFIG_SND_BCM2835) += snd-bcm2835.o
snd-bcm2835-objs := bcm2835.o bcm2835-ctl.o bcm2835-pcm.o bcm2835-vchiq.o
-EXTRA_CFLAGS += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000
+ccflags-y += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000
|