aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch')
-rw-r--r--target/linux/brcm2708/patches-3.10/0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch177
1 files changed, 177 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch b/target/linux/brcm2708/patches-3.10/0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch
new file mode 100644
index 0000000000..4b4b5054da
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.10/0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch
@@ -0,0 +1,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
+