linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS
@ 2011-08-15  5:07 Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 01/11] arch/m68k: do not use EXTRA_{A,C,LD}FLAGS Arnaud Lacombe
                   ` (10 more replies)
  0 siblings, 11 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg

Hi folks,

The attached serie fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS. Usage of
these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Their usage is replaced by Kbuild's `{as,cc,cpp,ld}flags-y'.

This serie has been build-tested on x86-64 `allyesconfig' where it fixes the
complete brokenness of the media tree, plus various other failure, espectially
in the SCSI tree when EXTRA_CFLAGS is defined on the command-line.

I did not build test other architectures.

 - Arnaud

Cc: Sam Ravnborg <sam@ravnborg.org>

Arnaud Lacombe (11):
  arch/m68k: do not use EXTRA_{A,C,LD}FLAGS
  arch/mips: do not use EXTRA_CFLAGS
  arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS
  arch/x86: do not use EXTRA_CFLAGS
  drivers/media: do not use EXTRA_CFLAGS
  drivers/net/bna: do not use EXTRA_CFLAGS
  drivers/pps: do not use EXTRA_CFLAGS
  drivers/scsi: do not use EXTRA_CFLAGS
  drivers/staging: do not use EXTRA_CFLAGS
  scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS
    replacement
  script/checkpatch.pl: warn about deprecated use of
    EXTRA_{A,C,CPP,LD}FLAGS

 arch/m68k/fpsp040/Makefile                 |    2 +-
 arch/m68k/ifpsp060/Makefile                |    2 +-
 arch/m68k/platform/54xx/Makefile           |    4 ++--
 arch/mips/netlogic/xlr/Makefile            |    2 +-
 arch/unicore32/boot/compressed/Makefile    |    4 ++--
 arch/x86/math-emu/Makefile                 |    4 ++--
 arch/x86/pci/Makefile                      |    4 +---
 drivers/media/common/tuners/Makefile       |    4 ++--
 drivers/media/dvb/b2c2/Makefile            |    4 ++--
 drivers/media/dvb/bt8xx/Makefile           |    8 ++++----
 drivers/media/dvb/ddbridge/Makefile        |    8 ++++----
 drivers/media/dvb/dm1105/Makefile          |    2 +-
 drivers/media/dvb/dvb-usb/Makefile         |    4 ++--
 drivers/media/dvb/frontends/Makefile       |    4 ++--
 drivers/media/dvb/mantis/Makefile          |    2 +-
 drivers/media/dvb/ngene/Makefile           |    8 ++++----
 drivers/media/dvb/pluto2/Makefile          |    2 +-
 drivers/media/dvb/pt1/Makefile             |    2 +-
 drivers/media/dvb/siano/Makefile           |    4 ++--
 drivers/media/dvb/ttpci/Makefile           |    4 ++--
 drivers/media/dvb/ttusb-budget/Makefile    |    2 +-
 drivers/media/dvb/ttusb-dec/Makefile       |    2 +-
 drivers/media/radio/Makefile               |    2 +-
 drivers/media/video/Makefile               |    6 +++---
 drivers/media/video/au0828/Makefile        |    8 ++++----
 drivers/media/video/bt8xx/Makefile         |    6 +++---
 drivers/media/video/cx18/Makefile          |    6 +++---
 drivers/media/video/cx231xx/Makefile       |   10 +++++-----
 drivers/media/video/cx23885/Makefile       |   10 +++++-----
 drivers/media/video/cx25840/Makefile       |    2 +-
 drivers/media/video/cx88/Makefile          |    8 ++++----
 drivers/media/video/em28xx/Makefile        |    8 ++++----
 drivers/media/video/gspca/gl860/Makefile   |    2 +-
 drivers/media/video/gspca/m5602/Makefile   |    2 +-
 drivers/media/video/gspca/stv06xx/Makefile |    2 +-
 drivers/media/video/hdpvr/Makefile         |    4 ++--
 drivers/media/video/ivtv/Makefile          |    8 ++++----
 drivers/media/video/omap3isp/Makefile      |    4 +---
 drivers/media/video/pvrusb2/Makefile       |    8 ++++----
 drivers/media/video/saa7134/Makefile       |    8 ++++----
 drivers/media/video/saa7164/Makefile       |   10 +++++-----
 drivers/media/video/tlg2300/Makefile       |    8 ++++----
 drivers/media/video/usbvision/Makefile     |    4 ++--
 drivers/net/bna/Makefile                   |    2 +-
 drivers/pps/generators/Makefile            |    4 +---
 drivers/scsi/cxgbi/cxgb3i/Kbuild           |    2 +-
 drivers/scsi/cxgbi/cxgb4i/Kbuild           |    2 +-
 drivers/staging/cxd2099/Makefile           |    6 +++---
 drivers/staging/go7007/Makefile            |    8 ++------
 drivers/staging/rtl8187se/Makefile         |    6 +++---
 drivers/staging/rts_pstor/Makefile         |    2 +-
 scripts/Makefile.build                     |    2 +-
 scripts/checkpatch.pl                      |   14 ++++++++++++++
 53 files changed, 130 insertions(+), 126 deletions(-)

-- 
1.7.6.153.g78432


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 01/11] arch/m68k: do not use EXTRA_{A,C,LD}FLAGS
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-15  5:11   ` Arnaud Lacombe
  2011-08-15  7:26   ` Finn Thain
  2011-08-15  5:07 ` [PATCH 02/11] arch/mips: do not use EXTRA_CFLAGS Arnaud Lacombe
                   ` (9 subsequent siblings)
  10 siblings, 2 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, linux-m68k

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-m68k@lists.linux-m68k.org
---
 arch/m68k/fpsp040/Makefile       |    2 +-
 arch/m68k/ifpsp060/Makefile      |    2 +-
 arch/m68k/platform/54xx/Makefile |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/m68k/fpsp040/Makefile b/arch/m68k/fpsp040/Makefile
index 9506d88..628a351 100644
--- a/arch/m68k/fpsp040/Makefile
+++ b/arch/m68k/fpsp040/Makefile
@@ -10,6 +10,6 @@ obj-y    := bindec.o binstr.o decbin.o do_func.o gen_except.o get_op.o \
 	    x_bsun.o x_fline.o x_operr.o x_ovfl.o x_snan.o x_store.o \
 	    x_unfl.o x_unimp.o x_unsupp.o bugfix.o skeleton.o
 
-EXTRA_LDFLAGS := -x
+ldflags-y := -x
 
 $(OS_OBJS): fpsp.h
diff --git a/arch/m68k/ifpsp060/Makefile b/arch/m68k/ifpsp060/Makefile
index 43b4350..5ba2d1e 100644
--- a/arch/m68k/ifpsp060/Makefile
+++ b/arch/m68k/ifpsp060/Makefile
@@ -6,4 +6,4 @@
 
 obj-y := fskeleton.o iskeleton.o os.o
 
-EXTRA_LDFLAGS := -x
+ldflags-y := -x
diff --git a/arch/m68k/platform/54xx/Makefile b/arch/m68k/platform/54xx/Makefile
index 6cfd090..967b51d 100644
--- a/arch/m68k/platform/54xx/Makefile
+++ b/arch/m68k/platform/54xx/Makefile
@@ -8,8 +8,8 @@
 # on the console port whenever a DBG interrupt occurs. You have to
 # set up you HW breakpoints to trigger a DBG interrupt:
 #
-# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT
-# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT
+# ccflags-y += -DTRAP_DBG_INTERRUPT
+# ccflags-y += -DTRAP_DBG_INTERRUPT
 #
 
 asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 02/11] arch/mips: do not use EXTRA_CFLAGS
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 01/11] arch/m68k: do not use EXTRA_{A,C,LD}FLAGS Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-15  9:45   ` Sergei Shtylyov
  2011-08-15  5:07 ` [PATCH 03/11] arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS Arnaud Lacombe
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, linux-mips

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-mips@linux-mips.org
---
 arch/mips/netlogic/xlr/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/netlogic/xlr/Makefile b/arch/mips/netlogic/xlr/Makefile
index 9bd3f73..2dca585 100644
--- a/arch/mips/netlogic/xlr/Makefile
+++ b/arch/mips/netlogic/xlr/Makefile
@@ -2,4 +2,4 @@ obj-y				+= setup.o platform.o irq.o setup.o time.o
 obj-$(CONFIG_SMP)		+= smp.o smpboot.o
 obj-$(CONFIG_EARLY_PRINTK)	+= xlr_console.o
 
-EXTRA_CFLAGS			+= -Werror
+ccflags-y			+= -Werror
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 03/11] arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 01/11] arch/m68k: do not use EXTRA_{A,C,LD}FLAGS Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 02/11] arch/mips: do not use EXTRA_CFLAGS Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-15  5:13   ` Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 04/11] arch/x86: do not use EXTRA_CFLAGS Arnaud Lacombe
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, Guan Xuetao

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
---
 arch/unicore32/boot/compressed/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/unicore32/boot/compressed/Makefile b/arch/unicore32/boot/compressed/Makefile
index b0954a2..950a9af 100644
--- a/arch/unicore32/boot/compressed/Makefile
+++ b/arch/unicore32/boot/compressed/Makefile
@@ -10,8 +10,8 @@
 # Copyright (C) 2001~2010 GUAN Xue-tao
 #
 
-EXTRA_CFLAGS	:= -fpic -fno-builtin
-EXTRA_AFLAGS	:= -Wa,-march=all
+ccflags-y	:= -fpic -fno-builtin
+asflags-y	:= -Wa,-march=all
 
 OBJS		:= misc.o
 
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 04/11] arch/x86: do not use EXTRA_CFLAGS
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
                   ` (2 preceding siblings ...)
  2011-08-15  5:07 ` [PATCH 03/11] arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-15  5:14   ` Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 05/11] drivers/media: " Arnaud Lacombe
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, x86

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: x86@kernel.org
---
 arch/x86/math-emu/Makefile |    4 ++--
 arch/x86/pci/Makefile      |    4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/x86/math-emu/Makefile b/arch/x86/math-emu/Makefile
index 9b0c63b..60db1b8 100644
--- a/arch/x86/math-emu/Makefile
+++ b/arch/x86/math-emu/Makefile
@@ -5,8 +5,8 @@
 #DEBUG	= -DDEBUGGING
 DEBUG	=
 PARANOID = -DPARANOID
-EXTRA_CFLAGS	:= $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
-EXTRA_AFLAGS	:= $(PARANOID)
+ccflags-y	:= $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
+asflags-y	:= $(PARANOID)
 
 # From 'C' language sources:
 C_OBJS =fpu_entry.o errors.o \
diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
index 6b8759f..aef971f 100644
--- a/arch/x86/pci/Makefile
+++ b/arch/x86/pci/Makefile
@@ -22,6 +22,4 @@ obj-y				+= amd_bus.o bus_numa.o
 
 obj-$(CONFIG_PCI_CNB20LE_QUIRK)	+= broadcom_bus.o
 
-ifeq ($(CONFIG_PCI_DEBUG),y)
-EXTRA_CFLAGS += -DDEBUG
-endif
+ccflags-$(CONFIG_PCI_DEBUG) += -DDEBUG
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 05/11] drivers/media: do not use EXTRA_CFLAGS
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
                   ` (3 preceding siblings ...)
  2011-08-15  5:07 ` [PATCH 04/11] arch/x86: do not use EXTRA_CFLAGS Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-15  5:15   ` Arnaud Lacombe
  2011-08-16  8:15   ` Laurent Pinchart
  2011-08-15  5:07 ` [PATCH 06/11] drivers/net/bna: " Arnaud Lacombe
                   ` (5 subsequent siblings)
  10 siblings, 2 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Arnaud Lacombe, Sam Ravnborg, Mauro Carvalho Chehab, linux-media

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media@vger.kernel.org
---
 drivers/media/common/tuners/Makefile       |    4 ++--
 drivers/media/dvb/b2c2/Makefile            |    4 ++--
 drivers/media/dvb/bt8xx/Makefile           |    8 ++++----
 drivers/media/dvb/ddbridge/Makefile        |    8 ++++----
 drivers/media/dvb/dm1105/Makefile          |    2 +-
 drivers/media/dvb/dvb-usb/Makefile         |    4 ++--
 drivers/media/dvb/frontends/Makefile       |    4 ++--
 drivers/media/dvb/mantis/Makefile          |    2 +-
 drivers/media/dvb/ngene/Makefile           |    8 ++++----
 drivers/media/dvb/pluto2/Makefile          |    2 +-
 drivers/media/dvb/pt1/Makefile             |    2 +-
 drivers/media/dvb/siano/Makefile           |    4 ++--
 drivers/media/dvb/ttpci/Makefile           |    4 ++--
 drivers/media/dvb/ttusb-budget/Makefile    |    2 +-
 drivers/media/dvb/ttusb-dec/Makefile       |    2 +-
 drivers/media/radio/Makefile               |    2 +-
 drivers/media/video/Makefile               |    6 +++---
 drivers/media/video/au0828/Makefile        |    8 ++++----
 drivers/media/video/bt8xx/Makefile         |    6 +++---
 drivers/media/video/cx18/Makefile          |    6 +++---
 drivers/media/video/cx231xx/Makefile       |   10 +++++-----
 drivers/media/video/cx23885/Makefile       |   10 +++++-----
 drivers/media/video/cx25840/Makefile       |    2 +-
 drivers/media/video/cx88/Makefile          |    8 ++++----
 drivers/media/video/em28xx/Makefile        |    8 ++++----
 drivers/media/video/gspca/gl860/Makefile   |    2 +-
 drivers/media/video/gspca/m5602/Makefile   |    2 +-
 drivers/media/video/gspca/stv06xx/Makefile |    2 +-
 drivers/media/video/hdpvr/Makefile         |    4 ++--
 drivers/media/video/ivtv/Makefile          |    8 ++++----
 drivers/media/video/omap3isp/Makefile      |    4 +---
 drivers/media/video/pvrusb2/Makefile       |    8 ++++----
 drivers/media/video/saa7134/Makefile       |    8 ++++----
 drivers/media/video/saa7164/Makefile       |   10 +++++-----
 drivers/media/video/tlg2300/Makefile       |    8 ++++----
 drivers/media/video/usbvision/Makefile     |    4 ++--
 36 files changed, 92 insertions(+), 94 deletions(-)

diff --git a/drivers/media/common/tuners/Makefile b/drivers/media/common/tuners/Makefile
index 20d24fc..196c12a 100644
--- a/drivers/media/common/tuners/Makefile
+++ b/drivers/media/common/tuners/Makefile
@@ -28,5 +28,5 @@ obj-$(CONFIG_MEDIA_TUNER_MAX2165) += max2165.o
 obj-$(CONFIG_MEDIA_TUNER_TDA18218) += tda18218.o
 obj-$(CONFIG_MEDIA_TUNER_TDA18212) += tda18212.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
diff --git a/drivers/media/dvb/b2c2/Makefile b/drivers/media/dvb/b2c2/Makefile
index b97cf72..3d04a8d 100644
--- a/drivers/media/dvb/b2c2/Makefile
+++ b/drivers/media/dvb/b2c2/Makefile
@@ -12,5 +12,5 @@ obj-$(CONFIG_DVB_B2C2_FLEXCOP_PCI) += b2c2-flexcop-pci.o
 b2c2-flexcop-usb-objs = flexcop-usb.o
 obj-$(CONFIG_DVB_B2C2_FLEXCOP_USB) += b2c2-flexcop-usb.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
-EXTRA_CFLAGS += -Idrivers/media/common/tuners/
+ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
+ccflags-y += -Idrivers/media/common/tuners/
diff --git a/drivers/media/dvb/bt8xx/Makefile b/drivers/media/dvb/bt8xx/Makefile
index d98f1d4..0713b3a 100644
--- a/drivers/media/dvb/bt8xx/Makefile
+++ b/drivers/media/dvb/bt8xx/Makefile
@@ -1,6 +1,6 @@
 obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
-EXTRA_CFLAGS += -Idrivers/media/video/bt8xx
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/video/bt8xx
+ccflags-y += -Idrivers/media/common/tuners
diff --git a/drivers/media/dvb/ddbridge/Makefile b/drivers/media/dvb/ddbridge/Makefile
index de4fe19..cf7214e 100644
--- a/drivers/media/dvb/ddbridge/Makefile
+++ b/drivers/media/dvb/ddbridge/Makefile
@@ -6,9 +6,9 @@ ddbridge-objs := ddbridge-core.o
 
 obj-$(CONFIG_DVB_DDBRIDGE) += ddbridge.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends/
-EXTRA_CFLAGS += -Idrivers/media/common/tuners/
+ccflags-y += -Idrivers/media/dvb/dvb-core/
+ccflags-y += -Idrivers/media/dvb/frontends/
+ccflags-y += -Idrivers/media/common/tuners/
 
 # For the staging CI driver cxd2099
-EXTRA_CFLAGS += -Idrivers/staging/cxd2099/
+ccflags-y += -Idrivers/staging/cxd2099/
diff --git a/drivers/media/dvb/dm1105/Makefile b/drivers/media/dvb/dm1105/Makefile
index 8ac28b0..95a008b 100644
--- a/drivers/media/dvb/dm1105/Makefile
+++ b/drivers/media/dvb/dm1105/Makefile
@@ -1,3 +1,3 @@
 obj-$(CONFIG_DVB_DM1105) += dm1105.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends
diff --git a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile
index 4bac13d..327613f 100644
--- a/drivers/media/dvb/dvb-usb/Makefile
+++ b/drivers/media/dvb/dvb-usb/Makefile
@@ -94,7 +94,7 @@ obj-$(CONFIG_DVB_USB_LME2510) += dvb-usb-lmedm04.o
 dvb-usb-technisat-usb2-objs = technisat-usb2.o
 obj-$(CONFIG_DVB_USB_TECHNISAT_USB2) += dvb-usb-technisat-usb2.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
+ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
 # due to tuner-xc3028
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/common/tuners
 
diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile
index 6a6ba05..ed91c01 100644
--- a/drivers/media/dvb/frontends/Makefile
+++ b/drivers/media/dvb/frontends/Makefile
@@ -2,8 +2,8 @@
 # Makefile for the kernel DVB frontend device drivers.
 #
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
-EXTRA_CFLAGS += -Idrivers/media/common/tuners/
+ccflags-y += -Idrivers/media/dvb/dvb-core/
+ccflags-y += -Idrivers/media/common/tuners/
 
 stb0899-objs = stb0899_drv.o stb0899_algo.o
 stv0900-objs = stv0900_core.o stv0900_sw.o
diff --git a/drivers/media/dvb/mantis/Makefile b/drivers/media/dvb/mantis/Makefile
index 98dc5cd..ec8116d 100644
--- a/drivers/media/dvb/mantis/Makefile
+++ b/drivers/media/dvb/mantis/Makefile
@@ -25,4 +25,4 @@ obj-$(CONFIG_MANTIS_CORE)	+= mantis_core.o
 obj-$(CONFIG_DVB_MANTIS)	+= mantis.o
 obj-$(CONFIG_DVB_HOPPER)	+= hopper.o
 
-EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
+ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
diff --git a/drivers/media/dvb/ngene/Makefile b/drivers/media/dvb/ngene/Makefile
index 2bc9687..8987361 100644
--- a/drivers/media/dvb/ngene/Makefile
+++ b/drivers/media/dvb/ngene/Makefile
@@ -6,9 +6,9 @@ ngene-objs := ngene-core.o ngene-i2c.o ngene-cards.o ngene-dvb.o
 
 obj-$(CONFIG_DVB_NGENE) += ngene.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends/
-EXTRA_CFLAGS += -Idrivers/media/common/tuners/
+ccflags-y += -Idrivers/media/dvb/dvb-core/
+ccflags-y += -Idrivers/media/dvb/frontends/
+ccflags-y += -Idrivers/media/common/tuners/
 
 # For the staging CI driver cxd2099
-EXTRA_CFLAGS += -Idrivers/staging/cxd2099/
+ccflags-y += -Idrivers/staging/cxd2099/
diff --git a/drivers/media/dvb/pluto2/Makefile b/drivers/media/dvb/pluto2/Makefile
index 7ac1287..7008223 100644
--- a/drivers/media/dvb/pluto2/Makefile
+++ b/drivers/media/dvb/pluto2/Makefile
@@ -1,3 +1,3 @@
 obj-$(CONFIG_DVB_PLUTO2) += pluto2.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
+ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
diff --git a/drivers/media/dvb/pt1/Makefile b/drivers/media/dvb/pt1/Makefile
index a66da17..d80d8e8 100644
--- a/drivers/media/dvb/pt1/Makefile
+++ b/drivers/media/dvb/pt1/Makefile
@@ -2,4 +2,4 @@ earth-pt1-objs := pt1.o va1j5jf8007s.o va1j5jf8007t.o
 
 obj-$(CONFIG_DVB_PT1) += earth-pt1.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/dvb/dvb-core -Idrivers/media/dvb/frontends
diff --git a/drivers/media/dvb/siano/Makefile b/drivers/media/dvb/siano/Makefile
index c54140b..f233b57 100644
--- a/drivers/media/dvb/siano/Makefile
+++ b/drivers/media/dvb/siano/Makefile
@@ -5,7 +5,7 @@ obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o
 obj-$(CONFIG_SMS_USB_DRV) += smsusb.o
 obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/dvb-core
 
-EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
+ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
 
diff --git a/drivers/media/dvb/ttpci/Makefile b/drivers/media/dvb/ttpci/Makefile
index 8a4d5bb..f6e8693 100644
--- a/drivers/media/dvb/ttpci/Makefile
+++ b/drivers/media/dvb/ttpci/Makefile
@@ -17,5 +17,5 @@ obj-$(CONFIG_DVB_BUDGET_CI) += budget-ci.o
 obj-$(CONFIG_DVB_BUDGET_PATCH) += budget-patch.o
 obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
+ccflags-y += -Idrivers/media/common/tuners
diff --git a/drivers/media/dvb/ttusb-budget/Makefile b/drivers/media/dvb/ttusb-budget/Makefile
index fbe2b95..8d6c4ac 100644
--- a/drivers/media/dvb/ttusb-budget/Makefile
+++ b/drivers/media/dvb/ttusb-budget/Makefile
@@ -1,3 +1,3 @@
 obj-$(CONFIG_DVB_TTUSB_BUDGET) += dvb-ttusb-budget.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends
diff --git a/drivers/media/dvb/ttusb-dec/Makefile b/drivers/media/dvb/ttusb-dec/Makefile
index 2d70a82..ed28b53 100644
--- a/drivers/media/dvb/ttusb-dec/Makefile
+++ b/drivers/media/dvb/ttusb-dec/Makefile
@@ -1,3 +1,3 @@
 obj-$(CONFIG_DVB_TTUSB_DEC) += ttusb_dec.o ttusbdecfe.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
+ccflags-y += -Idrivers/media/dvb/dvb-core/
diff --git a/drivers/media/radio/Makefile b/drivers/media/radio/Makefile
index f484a6e..390daf9 100644
--- a/drivers/media/radio/Makefile
+++ b/drivers/media/radio/Makefile
@@ -27,4 +27,4 @@ obj-$(CONFIG_RADIO_TIMBERDALE) += radio-timb.o
 obj-$(CONFIG_RADIO_WL1273) += radio-wl1273.o
 obj-$(CONFIG_RADIO_WL128X) += wl128x/
 
-EXTRA_CFLAGS += -Isound
+ccflags-y += -Isound
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 2723900..c06f515 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -190,6 +190,6 @@ obj-y	+= davinci/
 
 obj-$(CONFIG_ARCH_OMAP)	+= omap/
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/common/tuners
diff --git a/drivers/media/video/au0828/Makefile b/drivers/media/video/au0828/Makefile
index 5c7f2f7..bd22223 100644
--- a/drivers/media/video/au0828/Makefile
+++ b/drivers/media/video/au0828/Makefile
@@ -2,8 +2,8 @@ au0828-objs	:= au0828-core.o au0828-i2c.o au0828-cards.o au0828-dvb.o au0828-vid
 
 obj-$(CONFIG_VIDEO_AU0828) += au0828.o
 
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
 
-EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
+ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
diff --git a/drivers/media/video/bt8xx/Makefile b/drivers/media/video/bt8xx/Makefile
index e415f6f..3f9a2b2 100644
--- a/drivers/media/video/bt8xx/Makefile
+++ b/drivers/media/video/bt8xx/Makefile
@@ -8,6 +8,6 @@ bttv-objs      :=      bttv-driver.o bttv-cards.o bttv-if.o \
 
 obj-$(CONFIG_VIDEO_BT848) += bttv.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
diff --git a/drivers/media/video/cx18/Makefile b/drivers/media/video/cx18/Makefile
index 2fadd9d..a86bab5 100644
--- a/drivers/media/video/cx18/Makefile
+++ b/drivers/media/video/cx18/Makefile
@@ -8,6 +8,6 @@ cx18-alsa-objs := cx18-alsa-main.o cx18-alsa-pcm.o
 obj-$(CONFIG_VIDEO_CX18) += cx18.o
 obj-$(CONFIG_VIDEO_CX18_ALSA) += cx18-alsa.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/common/tuners
diff --git a/drivers/media/video/cx231xx/Makefile b/drivers/media/video/cx231xx/Makefile
index 2c24843..b334897 100644
--- a/drivers/media/video/cx231xx/Makefile
+++ b/drivers/media/video/cx231xx/Makefile
@@ -8,9 +8,9 @@ obj-$(CONFIG_VIDEO_CX231XX) += cx231xx.o
 obj-$(CONFIG_VIDEO_CX231XX_ALSA) += cx231xx-alsa.o
 obj-$(CONFIG_VIDEO_CX231XX_DVB) += cx231xx-dvb.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-usb
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/dvb/dvb-usb
 
diff --git a/drivers/media/video/cx23885/Makefile b/drivers/media/video/cx23885/Makefile
index 23293c7..185cc01 100644
--- a/drivers/media/video/cx23885/Makefile
+++ b/drivers/media/video/cx23885/Makefile
@@ -7,9 +7,9 @@ cx23885-objs	:= cx23885-cards.o cx23885-video.o cx23885-vbi.o \
 obj-$(CONFIG_VIDEO_CX23885) += cx23885.o
 obj-$(CONFIG_MEDIA_ALTERA_CI) += altera-ci.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
 
-EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
+ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
diff --git a/drivers/media/video/cx25840/Makefile b/drivers/media/video/cx25840/Makefile
index 2ee96d3..dc40dde 100644
--- a/drivers/media/video/cx25840/Makefile
+++ b/drivers/media/video/cx25840/Makefile
@@ -3,4 +3,4 @@ cx25840-objs    := cx25840-core.o cx25840-audio.o cx25840-firmware.o \
 
 obj-$(CONFIG_VIDEO_CX25840) += cx25840.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
+ccflags-y += -Idrivers/media/video
diff --git a/drivers/media/video/cx88/Makefile b/drivers/media/video/cx88/Makefile
index 5b7e267..c1a2785 100644
--- a/drivers/media/video/cx88/Makefile
+++ b/drivers/media/video/cx88/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_VIDEO_CX88_BLACKBIRD) += cx88-blackbird.o
 obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o
 obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
diff --git a/drivers/media/video/em28xx/Makefile b/drivers/media/video/em28xx/Makefile
index 38aaa00..2abdf76 100644
--- a/drivers/media/video/em28xx/Makefile
+++ b/drivers/media/video/em28xx/Makefile
@@ -9,8 +9,8 @@ obj-$(CONFIG_VIDEO_EM28XX) += em28xx.o
 obj-$(CONFIG_VIDEO_EM28XX_ALSA) += em28xx-alsa.o
 obj-$(CONFIG_VIDEO_EM28XX_DVB) += em28xx-dvb.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
 
diff --git a/drivers/media/video/gspca/gl860/Makefile b/drivers/media/video/gspca/gl860/Makefile
index 13c9403..f511ecc 100644
--- a/drivers/media/video/gspca/gl860/Makefile
+++ b/drivers/media/video/gspca/gl860/Makefile
@@ -6,5 +6,5 @@ gspca_gl860-objs := gl860.o \
 		    gl860-ov9655.o \
 		    gl860-mi2020.o
 
-EXTRA_CFLAGS += -Idrivers/media/video/gspca
+ccflags-y += -Idrivers/media/video/gspca
 
diff --git a/drivers/media/video/gspca/m5602/Makefile b/drivers/media/video/gspca/m5602/Makefile
index bf7a19a..7f52961 100644
--- a/drivers/media/video/gspca/m5602/Makefile
+++ b/drivers/media/video/gspca/m5602/Makefile
@@ -8,4 +8,4 @@ gspca_m5602-objs := m5602_core.o \
 		    m5602_s5k83a.o \
 		    m5602_s5k4aa.o
 
-EXTRA_CFLAGS += -Idrivers/media/video/gspca
+ccflags-y += -Idrivers/media/video/gspca
diff --git a/drivers/media/video/gspca/stv06xx/Makefile b/drivers/media/video/gspca/stv06xx/Makefile
index 2f3c3a6..5b318fa 100644
--- a/drivers/media/video/gspca/stv06xx/Makefile
+++ b/drivers/media/video/gspca/stv06xx/Makefile
@@ -6,5 +6,5 @@ gspca_stv06xx-objs := stv06xx.o \
 		      stv06xx_pb0100.o \
 		      stv06xx_st6422.o
 
-EXTRA_CFLAGS += -Idrivers/media/video/gspca
+ccflags-y += -Idrivers/media/video/gspca
 
diff --git a/drivers/media/video/hdpvr/Makefile b/drivers/media/video/hdpvr/Makefile
index 3baa9f6..52f057f 100644
--- a/drivers/media/video/hdpvr/Makefile
+++ b/drivers/media/video/hdpvr/Makefile
@@ -2,6 +2,6 @@ hdpvr-objs	:= hdpvr-control.o hdpvr-core.o hdpvr-video.o hdpvr-i2c.o
 
 obj-$(CONFIG_VIDEO_HDPVR) += hdpvr.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
+ccflags-y += -Idrivers/media/video
 
-EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
+ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
diff --git a/drivers/media/video/ivtv/Makefile b/drivers/media/video/ivtv/Makefile
index 26ce0d6..71ab76a 100644
--- a/drivers/media/video/ivtv/Makefile
+++ b/drivers/media/video/ivtv/Makefile
@@ -7,8 +7,8 @@ ivtv-objs	:= ivtv-routing.o ivtv-cards.o ivtv-controls.o \
 obj-$(CONFIG_VIDEO_IVTV) += ivtv.o
 obj-$(CONFIG_VIDEO_FB_IVTV) += ivtvfb.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
 
diff --git a/drivers/media/video/omap3isp/Makefile b/drivers/media/video/omap3isp/Makefile
index b1b34477..e8847e7 100644
--- a/drivers/media/video/omap3isp/Makefile
+++ b/drivers/media/video/omap3isp/Makefile
@@ -1,8 +1,6 @@
 # Makefile for OMAP3 ISP driver
 
-ifdef CONFIG_VIDEO_OMAP3_DEBUG
-EXTRA_CFLAGS += -DDEBUG
-endif
+ccflags-$(CONFIG_VIDEO_OMAP3_DEBUG) += -DDEBUG
 
 omap3-isp-objs += \
 	isp.o ispqueue.o ispvideo.o \
diff --git a/drivers/media/video/pvrusb2/Makefile b/drivers/media/video/pvrusb2/Makefile
index de2fc14..c17f37d 100644
--- a/drivers/media/video/pvrusb2/Makefile
+++ b/drivers/media/video/pvrusb2/Makefile
@@ -16,7 +16,7 @@ pvrusb2-objs	:= pvrusb2-i2c-core.o \
 
 obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
diff --git a/drivers/media/video/saa7134/Makefile b/drivers/media/video/saa7134/Makefile
index 8a5ff4d..a646ccf 100644
--- a/drivers/media/video/saa7134/Makefile
+++ b/drivers/media/video/saa7134/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o
 
 obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
diff --git a/drivers/media/video/saa7164/Makefile b/drivers/media/video/saa7164/Makefile
index 6303a8e..ecd5811 100644
--- a/drivers/media/video/saa7164/Makefile
+++ b/drivers/media/video/saa7164/Makefile
@@ -4,9 +4,9 @@ saa7164-objs	:= saa7164-cards.o saa7164-core.o saa7164-i2c.o saa7164-dvb.o \
 
 obj-$(CONFIG_VIDEO_SAA7164) += saa7164.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
 
-EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
+ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
diff --git a/drivers/media/video/tlg2300/Makefile b/drivers/media/video/tlg2300/Makefile
index 81bb7fd..ea09b9a 100644
--- a/drivers/media/video/tlg2300/Makefile
+++ b/drivers/media/video/tlg2300/Makefile
@@ -2,8 +2,8 @@ poseidon-objs := pd-video.o pd-alsa.o pd-dvb.o pd-radio.o pd-main.o
 
 obj-$(CONFIG_VIDEO_TLG2300) += poseidon.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/dvb/dvb-core
+ccflags-y += -Idrivers/media/dvb/frontends
 
diff --git a/drivers/media/video/usbvision/Makefile b/drivers/media/video/usbvision/Makefile
index 3387187..aea1e3b 100644
--- a/drivers/media/video/usbvision/Makefile
+++ b/drivers/media/video/usbvision/Makefile
@@ -2,5 +2,5 @@ usbvision-objs  := usbvision-core.o usbvision-video.o usbvision-i2c.o usbvision-
 
 obj-$(CONFIG_VIDEO_USBVISION) += usbvision.o
 
-EXTRA_CFLAGS += -Idrivers/media/video
-EXTRA_CFLAGS += -Idrivers/media/common/tuners
+ccflags-y += -Idrivers/media/video
+ccflags-y += -Idrivers/media/common/tuners
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 06/11] drivers/net/bna: do not use EXTRA_CFLAGS
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
                   ` (4 preceding siblings ...)
  2011-08-15  5:07 ` [PATCH 05/11] drivers/media: " Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-15  5:16   ` Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 07/11] drivers/pps: " Arnaud Lacombe
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, Rasesh Mody, netdev

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Rasesh Mody <rmody@brocade.com>
Cc: netdev@vger.kernel.org
---
 drivers/net/bna/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bna/Makefile b/drivers/net/bna/Makefile
index a5d604d..babc25f 100644
--- a/drivers/net/bna/Makefile
+++ b/drivers/net/bna/Makefile
@@ -8,4 +8,4 @@ obj-$(CONFIG_BNA) += bna.o
 bna-objs := bnad.o bnad_ethtool.o bna_ctrl.o bna_txrx.o
 bna-objs += bfa_ioc.o bfa_ioc_ct.o bfa_cee.o cna_fwimg.o
 
-EXTRA_CFLAGS := -Idrivers/net/bna
+ccflags-y := -Idrivers/net/bna
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 07/11] drivers/pps: do not use EXTRA_CFLAGS
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
                   ` (5 preceding siblings ...)
  2011-08-15  5:07 ` [PATCH 06/11] drivers/net/bna: " Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-15  5:16   ` Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 08/11] drivers/scsi: " Arnaud Lacombe
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, Rodolfo Giometti, linuxpps

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Rodolfo Giometti <giometti@enneenne.com>
Cc: linuxpps@ml.enneenne.com
---
 drivers/pps/generators/Makefile |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/pps/generators/Makefile b/drivers/pps/generators/Makefile
index 303304a..21e5e3b 100644
--- a/drivers/pps/generators/Makefile
+++ b/drivers/pps/generators/Makefile
@@ -4,6 +4,4 @@
 
 obj-$(CONFIG_PPS_GENERATOR_PARPORT) += pps_gen_parport.o
 
-ifeq ($(CONFIG_PPS_DEBUG),y)
-EXTRA_CFLAGS += -DDEBUG
-endif
+ccflags-$(CONFIG_PPS_DEBUG) += -DDEBUG
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 08/11] drivers/scsi: do not use EXTRA_CFLAGS
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
                   ` (6 preceding siblings ...)
  2011-08-15  5:07 ` [PATCH 07/11] drivers/pps: " Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-15  5:16   ` Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 09/11] drivers/staging: " Arnaud Lacombe
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, kxie, James Bottomley

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

In the same time, do not needlessly reference $(srctree) in the -I argument.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: kxie@chelsio.com
Cc: James Bottomley <James.Bottomley@suse.de>
---
 drivers/scsi/cxgbi/cxgb3i/Kbuild |    2 +-
 drivers/scsi/cxgbi/cxgb4i/Kbuild |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/cxgbi/cxgb3i/Kbuild b/drivers/scsi/cxgbi/cxgb3i/Kbuild
index 09dbf9e..b3197c9 100644
--- a/drivers/scsi/cxgbi/cxgb3i/Kbuild
+++ b/drivers/scsi/cxgbi/cxgb3i/Kbuild
@@ -1,3 +1,3 @@
-EXTRA_CFLAGS += -I$(srctree)/drivers/net/cxgb3
+ccflags-y += -Idrivers/net/cxgb3
 
 obj-$(CONFIG_SCSI_CXGB3_ISCSI) += cxgb3i.o
diff --git a/drivers/scsi/cxgbi/cxgb4i/Kbuild b/drivers/scsi/cxgbi/cxgb4i/Kbuild
index b9f4af7..4873a25 100644
--- a/drivers/scsi/cxgbi/cxgb4i/Kbuild
+++ b/drivers/scsi/cxgbi/cxgb4i/Kbuild
@@ -1,3 +1,3 @@
-EXTRA_CFLAGS += -I$(srctree)/drivers/net/cxgb4
+ccflags-y += -Idrivers/net/cxgb4
 
 obj-$(CONFIG_SCSI_CXGB4_ISCSI) += cxgb4i.o
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 09/11] drivers/staging: do not use EXTRA_CFLAGS
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
                   ` (7 preceding siblings ...)
  2011-08-15  5:07 ` [PATCH 08/11] drivers/scsi: " Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-15  5:15   ` Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 10/11] scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement Arnaud Lacombe
  2011-08-15  5:07 ` [PATCH 11/11] script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
  10 siblings, 1 reply; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, Greg Kroah-Hartman, devel

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: devel@driverdev.osuosl.org
---
 drivers/staging/cxd2099/Makefile   |    6 +++---
 drivers/staging/go7007/Makefile    |    8 ++------
 drivers/staging/rtl8187se/Makefile |    6 +++---
 drivers/staging/rts_pstor/Makefile |    2 +-
 4 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/cxd2099/Makefile b/drivers/staging/cxd2099/Makefile
index 72b1455..64cfc77 100644
--- a/drivers/staging/cxd2099/Makefile
+++ b/drivers/staging/cxd2099/Makefile
@@ -1,5 +1,5 @@
 obj-$(CONFIG_DVB_CXD2099) += cxd2099.o
 
-EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
-EXTRA_CFLAGS += -Idrivers/media/dvb/frontends/
-EXTRA_CFLAGS += -Idrivers/media/common/tuners/
+ccflags-y += -Idrivers/media/dvb/dvb-core/
+ccflags-y += -Idrivers/media/dvb/frontends/
+ccflags-y += -Idrivers/media/common/tuners/
diff --git a/drivers/staging/go7007/Makefile b/drivers/staging/go7007/Makefile
index 60a9185..6ee837c 100644
--- a/drivers/staging/go7007/Makefile
+++ b/drivers/staging/go7007/Makefile
@@ -20,15 +20,11 @@ go7007-y := go7007-v4l2.o go7007-driver.o go7007-i2c.o go7007-fw.o \
 s2250-y := s2250-board.o
 
 # Uncomment when the saa7134 patches get into upstream
-#ifneq ($(CONFIG_VIDEO_SAA7134),)
 #obj-$(CONFIG_VIDEO_SAA7134) += saa7134-go7007.o
-#EXTRA_CFLAGS += -Idrivers/media/video/saa7134 -DSAA7134_MPEG_GO7007=3
-#endif
+#ccflags-$(CONFIG_VIDEO_SAA7134:m=y) += -Idrivers/media/video/saa7134 -DSAA7134_MPEG_GO7007=3
 
 # S2250 needs cypress ezusb loader from dvb-usb
-ifneq ($(CONFIG_VIDEO_GO7007_USB_S2250_BOARD),)
-ccflags-y := -Idrivers/media/dvb/dvb-usb
-endif
+ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += -Idrivers/media/dvb/dvb-usb
 
 ccflags-y += -Idrivers/media/dvb/frontends
 ccflags-y += -Idrivers/media/dvb/dvb-core
diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index 11a9226..72db504 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -1,7 +1,7 @@
 
-#EXTRA_CFLAGS += -DCONFIG_IEEE80211_NOWEP=y
-#EXTRA_CFLAGS += -std=gnu89
-#EXTRA_CFLAGS += -O2
+#ccflags-y += -DCONFIG_IEEE80211_NOWEP=y
+#ccflags-y += -std=gnu89
+#ccflags-y += -O2
 #CC            = gcc
 
 ccflags-y := -DSW_ANTE
diff --git a/drivers/staging/rts_pstor/Makefile b/drivers/staging/rts_pstor/Makefile
index 61609ae..42533d3 100644
--- a/drivers/staging/rts_pstor/Makefile
+++ b/drivers/staging/rts_pstor/Makefile
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS	:= -Idrivers/scsi
+ccflags := -Idrivers/scsi
 
 obj-$(CONFIG_RTS_PSTOR)	:= rts_pstor.o
 
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 10/11] scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
                   ` (8 preceding siblings ...)
  2011-08-15  5:07 ` [PATCH 09/11] drivers/staging: " Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-22 15:50   ` Arnaud Lacombe
  2011-08-31 14:43   ` Michal Marek
  2011-08-15  5:07 ` [PATCH 11/11] script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
  10 siblings, 2 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, linux-kbuild

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Do not advertise for its usage.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kbuild@vger.kernel.org
---
 scripts/Makefile.build |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index a0fd502..d2b366c 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -46,7 +46,7 @@ include $(kbuild-file)
 # If the save-* variables changed error out
 ifeq ($(KBUILD_NOPEDANTIC),)
         ifneq ("$(save-cflags)","$(CFLAGS)")
-                $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use EXTRA_CFLAGS)
+                $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use ccflags-y)
         endif
 endif
 
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 11/11] script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS
  2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
                   ` (9 preceding siblings ...)
  2011-08-15  5:07 ` [PATCH 10/11] scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement Arnaud Lacombe
@ 2011-08-15  5:07 ` Arnaud Lacombe
  2011-08-15  5:10   ` Arnaud Lacombe
  2011-08-31 14:44   ` Michal Marek
  10 siblings, 2 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, Andy Whitcroft

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Warn about their introduction in Makefile or Kbuild files.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andy Whitcroft <apw@canonical.com>
---
 scripts/checkpatch.pl |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9d761c9..955183a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1661,6 +1661,20 @@ sub process {
 			#print "is_end<$is_end> length<$length>\n";
 		}
 
+		if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) &&
+		    ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
+			my $flag = $1;
+			my $replacement = {
+				'EXTRA_AFLAGS' =>   'asflags-y',
+				'EXTRA_CFLAGS' =>   'ccflags-y',
+				'EXTRA_CPPFLAGS' => 'cppflags-y',
+				'EXTRA_LDFLAGS' =>  'ldflags-y',
+			};
+
+			WARN("DEPRECATED_VARIABLE",
+			     "Use of $flag is deprecated, please use \`$replacement->{$flag} instead.\n" . $herecurr) if ($replacement->{$flag});
+		}
+
 # check we are in a valid source file if not then ignore this hunk
 		next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/);
 
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH 11/11] script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS
  2011-08-15  5:07 ` [PATCH 11/11] script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
@ 2011-08-15  5:10   ` Arnaud Lacombe
  2011-08-31 14:44   ` Michal Marek
  1 sibling, 0 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, Andy Whitcroft

Hi,

[of course, I forgot to sign them :(]

On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
>
>    commit f77bf01425b11947eeb3b5b54685212c302741b8
>    Author: Sam Ravnborg <sam@neptun.(none)>
>    Date:   Mon Oct 15 22:25:06 2007 +0200
>
>        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
>
> Warn about their introduction in Makefile or Kbuild files.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

 - Arnaud

> ---
>  scripts/checkpatch.pl |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 9d761c9..955183a 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1661,6 +1661,20 @@ sub process {
>                        #print "is_end<$is_end> length<$length>\n";
>                }
>
> +               if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) &&
> +                   ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
> +                       my $flag = $1;
> +                       my $replacement = {
> +                               'EXTRA_AFLAGS' =>   'asflags-y',
> +                               'EXTRA_CFLAGS' =>   'ccflags-y',
> +                               'EXTRA_CPPFLAGS' => 'cppflags-y',
> +                               'EXTRA_LDFLAGS' =>  'ldflags-y',
> +                       };
> +
> +                       WARN("DEPRECATED_VARIABLE",
> +                            "Use of $flag is deprecated, please use \`$replacement->{$flag} instead.\n" . $herecurr) if ($replacement->{$flag});
> +               }
> +
>  # check we are in a valid source file if not then ignore this hunk
>                next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/);
>
> --
> 1.7.6.153.g78432
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 01/11] arch/m68k: do not use EXTRA_{A,C,LD}FLAGS
  2011-08-15  5:07 ` [PATCH 01/11] arch/m68k: do not use EXTRA_{A,C,LD}FLAGS Arnaud Lacombe
@ 2011-08-15  5:11   ` Arnaud Lacombe
  2011-08-15  7:26   ` Finn Thain
  1 sibling, 0 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, linux-m68k

Hi,

On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
>
>    commit f77bf01425b11947eeb3b5b54685212c302741b8
>    Author: Sam Ravnborg <sam@neptun.(none)>
>    Date:   Mon Oct 15 22:25:06 2007 +0200
>
>        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
>
> Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: linux-m68k@lists.linux-m68k.org
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

 - Arnaud

> ---
>  arch/m68k/fpsp040/Makefile       |    2 +-
>  arch/m68k/ifpsp060/Makefile      |    2 +-
>  arch/m68k/platform/54xx/Makefile |    4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/m68k/fpsp040/Makefile b/arch/m68k/fpsp040/Makefile
> index 9506d88..628a351 100644
> --- a/arch/m68k/fpsp040/Makefile
> +++ b/arch/m68k/fpsp040/Makefile
> @@ -10,6 +10,6 @@ obj-y    := bindec.o binstr.o decbin.o do_func.o gen_except.o get_op.o \
>            x_bsun.o x_fline.o x_operr.o x_ovfl.o x_snan.o x_store.o \
>            x_unfl.o x_unimp.o x_unsupp.o bugfix.o skeleton.o
>
> -EXTRA_LDFLAGS := -x
> +ldflags-y := -x
>
>  $(OS_OBJS): fpsp.h
> diff --git a/arch/m68k/ifpsp060/Makefile b/arch/m68k/ifpsp060/Makefile
> index 43b4350..5ba2d1e 100644
> --- a/arch/m68k/ifpsp060/Makefile
> +++ b/arch/m68k/ifpsp060/Makefile
> @@ -6,4 +6,4 @@
>
>  obj-y := fskeleton.o iskeleton.o os.o
>
> -EXTRA_LDFLAGS := -x
> +ldflags-y := -x
> diff --git a/arch/m68k/platform/54xx/Makefile b/arch/m68k/platform/54xx/Makefile
> index 6cfd090..967b51d 100644
> --- a/arch/m68k/platform/54xx/Makefile
> +++ b/arch/m68k/platform/54xx/Makefile
> @@ -8,8 +8,8 @@
>  # on the console port whenever a DBG interrupt occurs. You have to
>  # set up you HW breakpoints to trigger a DBG interrupt:
>  #
> -# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT
> -# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT
> +# ccflags-y += -DTRAP_DBG_INTERRUPT
> +# ccflags-y += -DTRAP_DBG_INTERRUPT
>  #
>
>  asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
> --
> 1.7.6.153.g78432
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 03/11] arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS
  2011-08-15  5:07 ` [PATCH 03/11] arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS Arnaud Lacombe
@ 2011-08-15  5:13   ` Arnaud Lacombe
  2011-08-18  8:00     ` Guan Xuetao
  0 siblings, 1 reply; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, Guan Xuetao

Hi,

On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
>
>    commit f77bf01425b11947eeb3b5b54685212c302741b8
>    Author: Sam Ravnborg <sam@neptun.(none)>
>    Date:   Mon Oct 15 22:25:06 2007 +0200
>
>        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
>
> Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

 - Arnaud
> ---
>  arch/unicore32/boot/compressed/Makefile |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/unicore32/boot/compressed/Makefile b/arch/unicore32/boot/compressed/Makefile
> index b0954a2..950a9af 100644
> --- a/arch/unicore32/boot/compressed/Makefile
> +++ b/arch/unicore32/boot/compressed/Makefile
> @@ -10,8 +10,8 @@
>  # Copyright (C) 2001~2010 GUAN Xue-tao
>  #
>
> -EXTRA_CFLAGS   := -fpic -fno-builtin
> -EXTRA_AFLAGS   := -Wa,-march=all
> +ccflags-y      := -fpic -fno-builtin
> +asflags-y      := -Wa,-march=all
>
>  OBJS           := misc.o
>
> --
> 1.7.6.153.g78432
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 04/11] arch/x86: do not use EXTRA_CFLAGS
  2011-08-15  5:07 ` [PATCH 04/11] arch/x86: do not use EXTRA_CFLAGS Arnaud Lacombe
@ 2011-08-15  5:14   ` Arnaud Lacombe
  0 siblings, 0 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, x86

Hi,

On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
>
>    commit f77bf01425b11947eeb3b5b54685212c302741b8
>    Author: Sam Ravnborg <sam@neptun.(none)>
>    Date:   Mon Oct 15 22:25:06 2007 +0200
>
>        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
>
> Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: x86@kernel.org
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

 - Arnaud

> ---
>  arch/x86/math-emu/Makefile |    4 ++--
>  arch/x86/pci/Makefile      |    4 +---
>  2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/math-emu/Makefile b/arch/x86/math-emu/Makefile
> index 9b0c63b..60db1b8 100644
> --- a/arch/x86/math-emu/Makefile
> +++ b/arch/x86/math-emu/Makefile
> @@ -5,8 +5,8 @@
>  #DEBUG = -DDEBUGGING
>  DEBUG  =
>  PARANOID = -DPARANOID
> -EXTRA_CFLAGS   := $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
> -EXTRA_AFLAGS   := $(PARANOID)
> +ccflags-y      := $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
> +asflags-y      := $(PARANOID)
>
>  # From 'C' language sources:
>  C_OBJS =fpu_entry.o errors.o \
> diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
> index 6b8759f..aef971f 100644
> --- a/arch/x86/pci/Makefile
> +++ b/arch/x86/pci/Makefile
> @@ -22,6 +22,4 @@ obj-y                         += amd_bus.o bus_numa.o
>
>  obj-$(CONFIG_PCI_CNB20LE_QUIRK)        += broadcom_bus.o
>
> -ifeq ($(CONFIG_PCI_DEBUG),y)
> -EXTRA_CFLAGS += -DDEBUG
> -endif
> +ccflags-$(CONFIG_PCI_DEBUG) += -DDEBUG
> --
> 1.7.6.153.g78432
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 09/11] drivers/staging: do not use EXTRA_CFLAGS
  2011-08-15  5:07 ` [PATCH 09/11] drivers/staging: " Arnaud Lacombe
@ 2011-08-15  5:15   ` Arnaud Lacombe
  0 siblings, 0 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, Greg Kroah-Hartman, devel

Hi,

On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
>
>    commit f77bf01425b11947eeb3b5b54685212c302741b8
>    Author: Sam Ravnborg <sam@neptun.(none)>
>    Date:   Mon Oct 15 22:25:06 2007 +0200
>
>        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
>
> Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Cc: devel@driverdev.osuosl.org
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

 - Arnaud

> ---
>  drivers/staging/cxd2099/Makefile   |    6 +++---
>  drivers/staging/go7007/Makefile    |    8 ++------
>  drivers/staging/rtl8187se/Makefile |    6 +++---
>  drivers/staging/rts_pstor/Makefile |    2 +-
>  4 files changed, 9 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/staging/cxd2099/Makefile b/drivers/staging/cxd2099/Makefile
> index 72b1455..64cfc77 100644
> --- a/drivers/staging/cxd2099/Makefile
> +++ b/drivers/staging/cxd2099/Makefile
> @@ -1,5 +1,5 @@
>  obj-$(CONFIG_DVB_CXD2099) += cxd2099.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends/
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners/
> +ccflags-y += -Idrivers/media/dvb/dvb-core/
> +ccflags-y += -Idrivers/media/dvb/frontends/
> +ccflags-y += -Idrivers/media/common/tuners/
> diff --git a/drivers/staging/go7007/Makefile b/drivers/staging/go7007/Makefile
> index 60a9185..6ee837c 100644
> --- a/drivers/staging/go7007/Makefile
> +++ b/drivers/staging/go7007/Makefile
> @@ -20,15 +20,11 @@ go7007-y := go7007-v4l2.o go7007-driver.o go7007-i2c.o go7007-fw.o \
>  s2250-y := s2250-board.o
>
>  # Uncomment when the saa7134 patches get into upstream
> -#ifneq ($(CONFIG_VIDEO_SAA7134),)
>  #obj-$(CONFIG_VIDEO_SAA7134) += saa7134-go7007.o
> -#EXTRA_CFLAGS += -Idrivers/media/video/saa7134 -DSAA7134_MPEG_GO7007=3
> -#endif
> +#ccflags-$(CONFIG_VIDEO_SAA7134:m=y) += -Idrivers/media/video/saa7134 -DSAA7134_MPEG_GO7007=3
>
>  # S2250 needs cypress ezusb loader from dvb-usb
> -ifneq ($(CONFIG_VIDEO_GO7007_USB_S2250_BOARD),)
> -ccflags-y := -Idrivers/media/dvb/dvb-usb
> -endif
> +ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += -Idrivers/media/dvb/dvb-usb
>
>  ccflags-y += -Idrivers/media/dvb/frontends
>  ccflags-y += -Idrivers/media/dvb/dvb-core
> diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
> index 11a9226..72db504 100644
> --- a/drivers/staging/rtl8187se/Makefile
> +++ b/drivers/staging/rtl8187se/Makefile
> @@ -1,7 +1,7 @@
>
> -#EXTRA_CFLAGS += -DCONFIG_IEEE80211_NOWEP=y
> -#EXTRA_CFLAGS += -std=gnu89
> -#EXTRA_CFLAGS += -O2
> +#ccflags-y += -DCONFIG_IEEE80211_NOWEP=y
> +#ccflags-y += -std=gnu89
> +#ccflags-y += -O2
>  #CC            = gcc
>
>  ccflags-y := -DSW_ANTE
> diff --git a/drivers/staging/rts_pstor/Makefile b/drivers/staging/rts_pstor/Makefile
> index 61609ae..42533d3 100644
> --- a/drivers/staging/rts_pstor/Makefile
> +++ b/drivers/staging/rts_pstor/Makefile
> @@ -1,4 +1,4 @@
> -EXTRA_CFLAGS   := -Idrivers/scsi
> +ccflags := -Idrivers/scsi
>
>  obj-$(CONFIG_RTS_PSTOR)        := rts_pstor.o
>
> --
> 1.7.6.153.g78432
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 05/11] drivers/media: do not use EXTRA_CFLAGS
  2011-08-15  5:07 ` [PATCH 05/11] drivers/media: " Arnaud Lacombe
@ 2011-08-15  5:15   ` Arnaud Lacombe
  2011-08-16  8:15   ` Laurent Pinchart
  1 sibling, 0 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Arnaud Lacombe, Sam Ravnborg, Mauro Carvalho Chehab, linux-media

Hi,

On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
>
>    commit f77bf01425b11947eeb3b5b54685212c302741b8
>    Author: Sam Ravnborg <sam@neptun.(none)>
>    Date:   Mon Oct 15 22:25:06 2007 +0200
>
>        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
>
> Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
> Cc: linux-media@vger.kernel.org
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

 - Arnaud

> ---
>  drivers/media/common/tuners/Makefile       |    4 ++--
>  drivers/media/dvb/b2c2/Makefile            |    4 ++--
>  drivers/media/dvb/bt8xx/Makefile           |    8 ++++----
>  drivers/media/dvb/ddbridge/Makefile        |    8 ++++----
>  drivers/media/dvb/dm1105/Makefile          |    2 +-
>  drivers/media/dvb/dvb-usb/Makefile         |    4 ++--
>  drivers/media/dvb/frontends/Makefile       |    4 ++--
>  drivers/media/dvb/mantis/Makefile          |    2 +-
>  drivers/media/dvb/ngene/Makefile           |    8 ++++----
>  drivers/media/dvb/pluto2/Makefile          |    2 +-
>  drivers/media/dvb/pt1/Makefile             |    2 +-
>  drivers/media/dvb/siano/Makefile           |    4 ++--
>  drivers/media/dvb/ttpci/Makefile           |    4 ++--
>  drivers/media/dvb/ttusb-budget/Makefile    |    2 +-
>  drivers/media/dvb/ttusb-dec/Makefile       |    2 +-
>  drivers/media/radio/Makefile               |    2 +-
>  drivers/media/video/Makefile               |    6 +++---
>  drivers/media/video/au0828/Makefile        |    8 ++++----
>  drivers/media/video/bt8xx/Makefile         |    6 +++---
>  drivers/media/video/cx18/Makefile          |    6 +++---
>  drivers/media/video/cx231xx/Makefile       |   10 +++++-----
>  drivers/media/video/cx23885/Makefile       |   10 +++++-----
>  drivers/media/video/cx25840/Makefile       |    2 +-
>  drivers/media/video/cx88/Makefile          |    8 ++++----
>  drivers/media/video/em28xx/Makefile        |    8 ++++----
>  drivers/media/video/gspca/gl860/Makefile   |    2 +-
>  drivers/media/video/gspca/m5602/Makefile   |    2 +-
>  drivers/media/video/gspca/stv06xx/Makefile |    2 +-
>  drivers/media/video/hdpvr/Makefile         |    4 ++--
>  drivers/media/video/ivtv/Makefile          |    8 ++++----
>  drivers/media/video/omap3isp/Makefile      |    4 +---
>  drivers/media/video/pvrusb2/Makefile       |    8 ++++----
>  drivers/media/video/saa7134/Makefile       |    8 ++++----
>  drivers/media/video/saa7164/Makefile       |   10 +++++-----
>  drivers/media/video/tlg2300/Makefile       |    8 ++++----
>  drivers/media/video/usbvision/Makefile     |    4 ++--
>  36 files changed, 92 insertions(+), 94 deletions(-)
>
> diff --git a/drivers/media/common/tuners/Makefile b/drivers/media/common/tuners/Makefile
> index 20d24fc..196c12a 100644
> --- a/drivers/media/common/tuners/Makefile
> +++ b/drivers/media/common/tuners/Makefile
> @@ -28,5 +28,5 @@ obj-$(CONFIG_MEDIA_TUNER_MAX2165) += max2165.o
>  obj-$(CONFIG_MEDIA_TUNER_TDA18218) += tda18218.o
>  obj-$(CONFIG_MEDIA_TUNER_TDA18212) += tda18212.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
> diff --git a/drivers/media/dvb/b2c2/Makefile b/drivers/media/dvb/b2c2/Makefile
> index b97cf72..3d04a8d 100644
> --- a/drivers/media/dvb/b2c2/Makefile
> +++ b/drivers/media/dvb/b2c2/Makefile
> @@ -12,5 +12,5 @@ obj-$(CONFIG_DVB_B2C2_FLEXCOP_PCI) += b2c2-flexcop-pci.o
>  b2c2-flexcop-usb-objs = flexcop-usb.o
>  obj-$(CONFIG_DVB_B2C2_FLEXCOP_USB) += b2c2-flexcop-usb.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners/
> +ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
> +ccflags-y += -Idrivers/media/common/tuners/
> diff --git a/drivers/media/dvb/bt8xx/Makefile b/drivers/media/dvb/bt8xx/Makefile
> index d98f1d4..0713b3a 100644
> --- a/drivers/media/dvb/bt8xx/Makefile
> +++ b/drivers/media/dvb/bt8xx/Makefile
> @@ -1,6 +1,6 @@
>  obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> -EXTRA_CFLAGS += -Idrivers/media/video/bt8xx
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/video/bt8xx
> +ccflags-y += -Idrivers/media/common/tuners
> diff --git a/drivers/media/dvb/ddbridge/Makefile b/drivers/media/dvb/ddbridge/Makefile
> index de4fe19..cf7214e 100644
> --- a/drivers/media/dvb/ddbridge/Makefile
> +++ b/drivers/media/dvb/ddbridge/Makefile
> @@ -6,9 +6,9 @@ ddbridge-objs := ddbridge-core.o
>
>  obj-$(CONFIG_DVB_DDBRIDGE) += ddbridge.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends/
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners/
> +ccflags-y += -Idrivers/media/dvb/dvb-core/
> +ccflags-y += -Idrivers/media/dvb/frontends/
> +ccflags-y += -Idrivers/media/common/tuners/
>
>  # For the staging CI driver cxd2099
> -EXTRA_CFLAGS += -Idrivers/staging/cxd2099/
> +ccflags-y += -Idrivers/staging/cxd2099/
> diff --git a/drivers/media/dvb/dm1105/Makefile b/drivers/media/dvb/dm1105/Makefile
> index 8ac28b0..95a008b 100644
> --- a/drivers/media/dvb/dm1105/Makefile
> +++ b/drivers/media/dvb/dm1105/Makefile
> @@ -1,3 +1,3 @@
>  obj-$(CONFIG_DVB_DM1105) += dm1105.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends
> diff --git a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile
> index 4bac13d..327613f 100644
> --- a/drivers/media/dvb/dvb-usb/Makefile
> +++ b/drivers/media/dvb/dvb-usb/Makefile
> @@ -94,7 +94,7 @@ obj-$(CONFIG_DVB_USB_LME2510) += dvb-usb-lmedm04.o
>  dvb-usb-technisat-usb2-objs = technisat-usb2.o
>  obj-$(CONFIG_DVB_USB_TECHNISAT_USB2) += dvb-usb-technisat-usb2.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
> +ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
>  # due to tuner-xc3028
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/common/tuners
>
> diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile
> index 6a6ba05..ed91c01 100644
> --- a/drivers/media/dvb/frontends/Makefile
> +++ b/drivers/media/dvb/frontends/Makefile
> @@ -2,8 +2,8 @@
>  # Makefile for the kernel DVB frontend device drivers.
>  #
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners/
> +ccflags-y += -Idrivers/media/dvb/dvb-core/
> +ccflags-y += -Idrivers/media/common/tuners/
>
>  stb0899-objs = stb0899_drv.o stb0899_algo.o
>  stv0900-objs = stv0900_core.o stv0900_sw.o
> diff --git a/drivers/media/dvb/mantis/Makefile b/drivers/media/dvb/mantis/Makefile
> index 98dc5cd..ec8116d 100644
> --- a/drivers/media/dvb/mantis/Makefile
> +++ b/drivers/media/dvb/mantis/Makefile
> @@ -25,4 +25,4 @@ obj-$(CONFIG_MANTIS_CORE)     += mantis_core.o
>  obj-$(CONFIG_DVB_MANTIS)       += mantis.o
>  obj-$(CONFIG_DVB_HOPPER)       += hopper.o
>
> -EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
> +ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
> diff --git a/drivers/media/dvb/ngene/Makefile b/drivers/media/dvb/ngene/Makefile
> index 2bc9687..8987361 100644
> --- a/drivers/media/dvb/ngene/Makefile
> +++ b/drivers/media/dvb/ngene/Makefile
> @@ -6,9 +6,9 @@ ngene-objs := ngene-core.o ngene-i2c.o ngene-cards.o ngene-dvb.o
>
>  obj-$(CONFIG_DVB_NGENE) += ngene.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends/
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners/
> +ccflags-y += -Idrivers/media/dvb/dvb-core/
> +ccflags-y += -Idrivers/media/dvb/frontends/
> +ccflags-y += -Idrivers/media/common/tuners/
>
>  # For the staging CI driver cxd2099
> -EXTRA_CFLAGS += -Idrivers/staging/cxd2099/
> +ccflags-y += -Idrivers/staging/cxd2099/
> diff --git a/drivers/media/dvb/pluto2/Makefile b/drivers/media/dvb/pluto2/Makefile
> index 7ac1287..7008223 100644
> --- a/drivers/media/dvb/pluto2/Makefile
> +++ b/drivers/media/dvb/pluto2/Makefile
> @@ -1,3 +1,3 @@
>  obj-$(CONFIG_DVB_PLUTO2) += pluto2.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
> +ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
> diff --git a/drivers/media/dvb/pt1/Makefile b/drivers/media/dvb/pt1/Makefile
> index a66da17..d80d8e8 100644
> --- a/drivers/media/dvb/pt1/Makefile
> +++ b/drivers/media/dvb/pt1/Makefile
> @@ -2,4 +2,4 @@ earth-pt1-objs := pt1.o va1j5jf8007s.o va1j5jf8007t.o
>
>  obj-$(CONFIG_DVB_PT1) += earth-pt1.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/dvb/dvb-core -Idrivers/media/dvb/frontends
> diff --git a/drivers/media/dvb/siano/Makefile b/drivers/media/dvb/siano/Makefile
> index c54140b..f233b57 100644
> --- a/drivers/media/dvb/siano/Makefile
> +++ b/drivers/media/dvb/siano/Makefile
> @@ -5,7 +5,7 @@ obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o
>  obj-$(CONFIG_SMS_USB_DRV) += smsusb.o
>  obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/dvb-core
>
> -EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
> +ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
>
> diff --git a/drivers/media/dvb/ttpci/Makefile b/drivers/media/dvb/ttpci/Makefile
> index 8a4d5bb..f6e8693 100644
> --- a/drivers/media/dvb/ttpci/Makefile
> +++ b/drivers/media/dvb/ttpci/Makefile
> @@ -17,5 +17,5 @@ obj-$(CONFIG_DVB_BUDGET_CI) += budget-ci.o
>  obj-$(CONFIG_DVB_BUDGET_PATCH) += budget-patch.o
>  obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
> +ccflags-y += -Idrivers/media/common/tuners
> diff --git a/drivers/media/dvb/ttusb-budget/Makefile b/drivers/media/dvb/ttusb-budget/Makefile
> index fbe2b95..8d6c4ac 100644
> --- a/drivers/media/dvb/ttusb-budget/Makefile
> +++ b/drivers/media/dvb/ttusb-budget/Makefile
> @@ -1,3 +1,3 @@
>  obj-$(CONFIG_DVB_TTUSB_BUDGET) += dvb-ttusb-budget.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends
> diff --git a/drivers/media/dvb/ttusb-dec/Makefile b/drivers/media/dvb/ttusb-dec/Makefile
> index 2d70a82..ed28b53 100644
> --- a/drivers/media/dvb/ttusb-dec/Makefile
> +++ b/drivers/media/dvb/ttusb-dec/Makefile
> @@ -1,3 +1,3 @@
>  obj-$(CONFIG_DVB_TTUSB_DEC) += ttusb_dec.o ttusbdecfe.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
> +ccflags-y += -Idrivers/media/dvb/dvb-core/
> diff --git a/drivers/media/radio/Makefile b/drivers/media/radio/Makefile
> index f484a6e..390daf9 100644
> --- a/drivers/media/radio/Makefile
> +++ b/drivers/media/radio/Makefile
> @@ -27,4 +27,4 @@ obj-$(CONFIG_RADIO_TIMBERDALE) += radio-timb.o
>  obj-$(CONFIG_RADIO_WL1273) += radio-wl1273.o
>  obj-$(CONFIG_RADIO_WL128X) += wl128x/
>
> -EXTRA_CFLAGS += -Isound
> +ccflags-y += -Isound
> diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
> index 2723900..c06f515 100644
> --- a/drivers/media/video/Makefile
> +++ b/drivers/media/video/Makefile
> @@ -190,6 +190,6 @@ obj-y       += davinci/
>
>  obj-$(CONFIG_ARCH_OMAP)        += omap/
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/common/tuners
> diff --git a/drivers/media/video/au0828/Makefile b/drivers/media/video/au0828/Makefile
> index 5c7f2f7..bd22223 100644
> --- a/drivers/media/video/au0828/Makefile
> +++ b/drivers/media/video/au0828/Makefile
> @@ -2,8 +2,8 @@ au0828-objs     := au0828-core.o au0828-i2c.o au0828-cards.o au0828-dvb.o au0828-vid
>
>  obj-$(CONFIG_VIDEO_AU0828) += au0828.o
>
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
>
> -EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
> +ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
> diff --git a/drivers/media/video/bt8xx/Makefile b/drivers/media/video/bt8xx/Makefile
> index e415f6f..3f9a2b2 100644
> --- a/drivers/media/video/bt8xx/Makefile
> +++ b/drivers/media/video/bt8xx/Makefile
> @@ -8,6 +8,6 @@ bttv-objs      :=      bttv-driver.o bttv-cards.o bttv-if.o \
>
>  obj-$(CONFIG_VIDEO_BT848) += bttv.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> diff --git a/drivers/media/video/cx18/Makefile b/drivers/media/video/cx18/Makefile
> index 2fadd9d..a86bab5 100644
> --- a/drivers/media/video/cx18/Makefile
> +++ b/drivers/media/video/cx18/Makefile
> @@ -8,6 +8,6 @@ cx18-alsa-objs := cx18-alsa-main.o cx18-alsa-pcm.o
>  obj-$(CONFIG_VIDEO_CX18) += cx18.o
>  obj-$(CONFIG_VIDEO_CX18_ALSA) += cx18-alsa.o
>
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/common/tuners
> diff --git a/drivers/media/video/cx231xx/Makefile b/drivers/media/video/cx231xx/Makefile
> index 2c24843..b334897 100644
> --- a/drivers/media/video/cx231xx/Makefile
> +++ b/drivers/media/video/cx231xx/Makefile
> @@ -8,9 +8,9 @@ obj-$(CONFIG_VIDEO_CX231XX) += cx231xx.o
>  obj-$(CONFIG_VIDEO_CX231XX_ALSA) += cx231xx-alsa.o
>  obj-$(CONFIG_VIDEO_CX231XX_DVB) += cx231xx-dvb.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-usb
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/dvb/dvb-usb
>
> diff --git a/drivers/media/video/cx23885/Makefile b/drivers/media/video/cx23885/Makefile
> index 23293c7..185cc01 100644
> --- a/drivers/media/video/cx23885/Makefile
> +++ b/drivers/media/video/cx23885/Makefile
> @@ -7,9 +7,9 @@ cx23885-objs    := cx23885-cards.o cx23885-video.o cx23885-vbi.o \
>  obj-$(CONFIG_VIDEO_CX23885) += cx23885.o
>  obj-$(CONFIG_MEDIA_ALTERA_CI) += altera-ci.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
>
> -EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
> +ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
> diff --git a/drivers/media/video/cx25840/Makefile b/drivers/media/video/cx25840/Makefile
> index 2ee96d3..dc40dde 100644
> --- a/drivers/media/video/cx25840/Makefile
> +++ b/drivers/media/video/cx25840/Makefile
> @@ -3,4 +3,4 @@ cx25840-objs    := cx25840-core.o cx25840-audio.o cx25840-firmware.o \
>
>  obj-$(CONFIG_VIDEO_CX25840) += cx25840.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/video
> diff --git a/drivers/media/video/cx88/Makefile b/drivers/media/video/cx88/Makefile
> index 5b7e267..c1a2785 100644
> --- a/drivers/media/video/cx88/Makefile
> +++ b/drivers/media/video/cx88/Makefile
> @@ -10,7 +10,7 @@ obj-$(CONFIG_VIDEO_CX88_BLACKBIRD) += cx88-blackbird.o
>  obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o
>  obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
> diff --git a/drivers/media/video/em28xx/Makefile b/drivers/media/video/em28xx/Makefile
> index 38aaa00..2abdf76 100644
> --- a/drivers/media/video/em28xx/Makefile
> +++ b/drivers/media/video/em28xx/Makefile
> @@ -9,8 +9,8 @@ obj-$(CONFIG_VIDEO_EM28XX) += em28xx.o
>  obj-$(CONFIG_VIDEO_EM28XX_ALSA) += em28xx-alsa.o
>  obj-$(CONFIG_VIDEO_EM28XX_DVB) += em28xx-dvb.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
>
> diff --git a/drivers/media/video/gspca/gl860/Makefile b/drivers/media/video/gspca/gl860/Makefile
> index 13c9403..f511ecc 100644
> --- a/drivers/media/video/gspca/gl860/Makefile
> +++ b/drivers/media/video/gspca/gl860/Makefile
> @@ -6,5 +6,5 @@ gspca_gl860-objs := gl860.o \
>                    gl860-ov9655.o \
>                    gl860-mi2020.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video/gspca
> +ccflags-y += -Idrivers/media/video/gspca
>
> diff --git a/drivers/media/video/gspca/m5602/Makefile b/drivers/media/video/gspca/m5602/Makefile
> index bf7a19a..7f52961 100644
> --- a/drivers/media/video/gspca/m5602/Makefile
> +++ b/drivers/media/video/gspca/m5602/Makefile
> @@ -8,4 +8,4 @@ gspca_m5602-objs := m5602_core.o \
>                    m5602_s5k83a.o \
>                    m5602_s5k4aa.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video/gspca
> +ccflags-y += -Idrivers/media/video/gspca
> diff --git a/drivers/media/video/gspca/stv06xx/Makefile b/drivers/media/video/gspca/stv06xx/Makefile
> index 2f3c3a6..5b318fa 100644
> --- a/drivers/media/video/gspca/stv06xx/Makefile
> +++ b/drivers/media/video/gspca/stv06xx/Makefile
> @@ -6,5 +6,5 @@ gspca_stv06xx-objs := stv06xx.o \
>                      stv06xx_pb0100.o \
>                      stv06xx_st6422.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video/gspca
> +ccflags-y += -Idrivers/media/video/gspca
>
> diff --git a/drivers/media/video/hdpvr/Makefile b/drivers/media/video/hdpvr/Makefile
> index 3baa9f6..52f057f 100644
> --- a/drivers/media/video/hdpvr/Makefile
> +++ b/drivers/media/video/hdpvr/Makefile
> @@ -2,6 +2,6 @@ hdpvr-objs      := hdpvr-control.o hdpvr-core.o hdpvr-video.o hdpvr-i2c.o
>
>  obj-$(CONFIG_VIDEO_HDPVR) += hdpvr.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/video
>
> -EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
> +ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
> diff --git a/drivers/media/video/ivtv/Makefile b/drivers/media/video/ivtv/Makefile
> index 26ce0d6..71ab76a 100644
> --- a/drivers/media/video/ivtv/Makefile
> +++ b/drivers/media/video/ivtv/Makefile
> @@ -7,8 +7,8 @@ ivtv-objs       := ivtv-routing.o ivtv-cards.o ivtv-controls.o \
>  obj-$(CONFIG_VIDEO_IVTV) += ivtv.o
>  obj-$(CONFIG_VIDEO_FB_IVTV) += ivtvfb.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
>
> diff --git a/drivers/media/video/omap3isp/Makefile b/drivers/media/video/omap3isp/Makefile
> index b1b34477..e8847e7 100644
> --- a/drivers/media/video/omap3isp/Makefile
> +++ b/drivers/media/video/omap3isp/Makefile
> @@ -1,8 +1,6 @@
>  # Makefile for OMAP3 ISP driver
>
> -ifdef CONFIG_VIDEO_OMAP3_DEBUG
> -EXTRA_CFLAGS += -DDEBUG
> -endif
> +ccflags-$(CONFIG_VIDEO_OMAP3_DEBUG) += -DDEBUG
>
>  omap3-isp-objs += \
>        isp.o ispqueue.o ispvideo.o \
> diff --git a/drivers/media/video/pvrusb2/Makefile b/drivers/media/video/pvrusb2/Makefile
> index de2fc14..c17f37d 100644
> --- a/drivers/media/video/pvrusb2/Makefile
> +++ b/drivers/media/video/pvrusb2/Makefile
> @@ -16,7 +16,7 @@ pvrusb2-objs  := pvrusb2-i2c-core.o \
>
>  obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
> diff --git a/drivers/media/video/saa7134/Makefile b/drivers/media/video/saa7134/Makefile
> index 8a5ff4d..a646ccf 100644
> --- a/drivers/media/video/saa7134/Makefile
> +++ b/drivers/media/video/saa7134/Makefile
> @@ -10,7 +10,7 @@ obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o
>
>  obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
> diff --git a/drivers/media/video/saa7164/Makefile b/drivers/media/video/saa7164/Makefile
> index 6303a8e..ecd5811 100644
> --- a/drivers/media/video/saa7164/Makefile
> +++ b/drivers/media/video/saa7164/Makefile
> @@ -4,9 +4,9 @@ saa7164-objs    := saa7164-cards.o saa7164-core.o saa7164-i2c.o saa7164-dvb.o \
>
>  obj-$(CONFIG_VIDEO_SAA7164) += saa7164.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
>
> -EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
> +ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
> diff --git a/drivers/media/video/tlg2300/Makefile b/drivers/media/video/tlg2300/Makefile
> index 81bb7fd..ea09b9a 100644
> --- a/drivers/media/video/tlg2300/Makefile
> +++ b/drivers/media/video/tlg2300/Makefile
> @@ -2,8 +2,8 @@ poseidon-objs := pd-video.o pd-alsa.o pd-dvb.o pd-radio.o pd-main.o
>
>  obj-$(CONFIG_VIDEO_TLG2300) += poseidon.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
> -EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/dvb/dvb-core
> +ccflags-y += -Idrivers/media/dvb/frontends
>
> diff --git a/drivers/media/video/usbvision/Makefile b/drivers/media/video/usbvision/Makefile
> index 3387187..aea1e3b 100644
> --- a/drivers/media/video/usbvision/Makefile
> +++ b/drivers/media/video/usbvision/Makefile
> @@ -2,5 +2,5 @@ usbvision-objs  := usbvision-core.o usbvision-video.o usbvision-i2c.o usbvision-
>
>  obj-$(CONFIG_VIDEO_USBVISION) += usbvision.o
>
> -EXTRA_CFLAGS += -Idrivers/media/video
> -EXTRA_CFLAGS += -Idrivers/media/common/tuners
> +ccflags-y += -Idrivers/media/video
> +ccflags-y += -Idrivers/media/common/tuners
> --
> 1.7.6.153.g78432
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 08/11] drivers/scsi: do not use EXTRA_CFLAGS
  2011-08-15  5:07 ` [PATCH 08/11] drivers/scsi: " Arnaud Lacombe
@ 2011-08-15  5:16   ` Arnaud Lacombe
  0 siblings, 0 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, kxie, James Bottomley

Hi,

On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
>
>    commit f77bf01425b11947eeb3b5b54685212c302741b8
>    Author: Sam Ravnborg <sam@neptun.(none)>
>    Date:   Mon Oct 15 22:25:06 2007 +0200
>
>        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
>
> Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
>
> In the same time, do not needlessly reference $(srctree) in the -I argument.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: kxie@chelsio.com
> Cc: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

 - Arnaud

> ---
>  drivers/scsi/cxgbi/cxgb3i/Kbuild |    2 +-
>  drivers/scsi/cxgbi/cxgb4i/Kbuild |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/cxgbi/cxgb3i/Kbuild b/drivers/scsi/cxgbi/cxgb3i/Kbuild
> index 09dbf9e..b3197c9 100644
> --- a/drivers/scsi/cxgbi/cxgb3i/Kbuild
> +++ b/drivers/scsi/cxgbi/cxgb3i/Kbuild
> @@ -1,3 +1,3 @@
> -EXTRA_CFLAGS += -I$(srctree)/drivers/net/cxgb3
> +ccflags-y += -Idrivers/net/cxgb3
>
>  obj-$(CONFIG_SCSI_CXGB3_ISCSI) += cxgb3i.o
> diff --git a/drivers/scsi/cxgbi/cxgb4i/Kbuild b/drivers/scsi/cxgbi/cxgb4i/Kbuild
> index b9f4af7..4873a25 100644
> --- a/drivers/scsi/cxgbi/cxgb4i/Kbuild
> +++ b/drivers/scsi/cxgbi/cxgb4i/Kbuild
> @@ -1,3 +1,3 @@
> -EXTRA_CFLAGS += -I$(srctree)/drivers/net/cxgb4
> +ccflags-y += -Idrivers/net/cxgb4
>
>  obj-$(CONFIG_SCSI_CXGB4_ISCSI) += cxgb4i.o
> --
> 1.7.6.153.g78432
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 07/11] drivers/pps: do not use EXTRA_CFLAGS
  2011-08-15  5:07 ` [PATCH 07/11] drivers/pps: " Arnaud Lacombe
@ 2011-08-15  5:16   ` Arnaud Lacombe
  0 siblings, 0 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, Rodolfo Giometti, linuxpps

On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
>
>    commit f77bf01425b11947eeb3b5b54685212c302741b8
>    Author: Sam Ravnborg <sam@neptun.(none)>
>    Date:   Mon Oct 15 22:25:06 2007 +0200
>
>        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
>
> Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Rodolfo Giometti <giometti@enneenne.com>
> Cc: linuxpps@ml.enneenne.com
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

 - Arnaud

> ---
>  drivers/pps/generators/Makefile |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pps/generators/Makefile b/drivers/pps/generators/Makefile
> index 303304a..21e5e3b 100644
> --- a/drivers/pps/generators/Makefile
> +++ b/drivers/pps/generators/Makefile
> @@ -4,6 +4,4 @@
>
>  obj-$(CONFIG_PPS_GENERATOR_PARPORT) += pps_gen_parport.o
>
> -ifeq ($(CONFIG_PPS_DEBUG),y)
> -EXTRA_CFLAGS += -DDEBUG
> -endif
> +ccflags-$(CONFIG_PPS_DEBUG) += -DDEBUG
> --
> 1.7.6.153.g78432
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 06/11] drivers/net/bna: do not use EXTRA_CFLAGS
  2011-08-15  5:07 ` [PATCH 06/11] drivers/net/bna: " Arnaud Lacombe
@ 2011-08-15  5:16   ` Arnaud Lacombe
  0 siblings, 0 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15  5:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, Rasesh Mody, netdev

Hi,

On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
>
>    commit f77bf01425b11947eeb3b5b54685212c302741b8
>    Author: Sam Ravnborg <sam@neptun.(none)>
>    Date:   Mon Oct 15 22:25:06 2007 +0200
>
>        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
>
> Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Rasesh Mody <rmody@brocade.com>
> Cc: netdev@vger.kernel.org
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

 - Arnaud

> ---
>  drivers/net/bna/Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/bna/Makefile b/drivers/net/bna/Makefile
> index a5d604d..babc25f 100644
> --- a/drivers/net/bna/Makefile
> +++ b/drivers/net/bna/Makefile
> @@ -8,4 +8,4 @@ obj-$(CONFIG_BNA) += bna.o
>  bna-objs := bnad.o bnad_ethtool.o bna_ctrl.o bna_txrx.o
>  bna-objs += bfa_ioc.o bfa_ioc_ct.o bfa_cee.o cna_fwimg.o
>
> -EXTRA_CFLAGS := -Idrivers/net/bna
> +ccflags-y := -Idrivers/net/bna
> --
> 1.7.6.153.g78432
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 01/11] arch/m68k: do not use EXTRA_{A,C,LD}FLAGS
  2011-08-15  5:07 ` [PATCH 01/11] arch/m68k: do not use EXTRA_{A,C,LD}FLAGS Arnaud Lacombe
  2011-08-15  5:11   ` Arnaud Lacombe
@ 2011-08-15  7:26   ` Finn Thain
  2011-08-15 14:45     ` Arnaud Lacombe
  1 sibling, 1 reply; 35+ messages in thread
From: Finn Thain @ 2011-08-15  7:26 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kernel, Sam Ravnborg, linux-m68k


On Mon, 15 Aug 2011, Arnaud Lacombe wrote:

> -# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT
> -# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT
> +# ccflags-y += -DTRAP_DBG_INTERRUPT
> +# ccflags-y += -DTRAP_DBG_INTERRUPT

asflags-y?

Finn

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 02/11] arch/mips: do not use EXTRA_CFLAGS
  2011-08-15  5:07 ` [PATCH 02/11] arch/mips: do not use EXTRA_CFLAGS Arnaud Lacombe
@ 2011-08-15  9:45   ` Sergei Shtylyov
  2011-08-15 13:55     ` Ralf Baechle
  0 siblings, 1 reply; 35+ messages in thread
From: Sergei Shtylyov @ 2011-08-15  9:45 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kernel, Sam Ravnborg, linux-mips

Hello.

On 15-08-2011 9:07, Arnaud Lacombe wrote:

> Usage of these flags has been deprecated for nearly 4 years by:

>      commit f77bf01425b11947eeb3b5b54685212c302741b8
>      Author: Sam Ravnborg<sam@neptun.(none)>
>      Date:   Mon Oct 15 22:25:06 2007 +0200

>          kbuild: introduce ccflags-y, asflags-y and ldflags-y

> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.

> Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

> Cc: Sam Ravnborg<sam@ravnborg.org>
> Cc: linux-mips@linux-mips.org

    You didn't sign off.

WBR, Sergei

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 02/11] arch/mips: do not use EXTRA_CFLAGS
  2011-08-15  9:45   ` Sergei Shtylyov
@ 2011-08-15 13:55     ` Ralf Baechle
  2011-08-15 16:19       ` Arnaud Lacombe
  0 siblings, 1 reply; 35+ messages in thread
From: Ralf Baechle @ 2011-08-15 13:55 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Arnaud Lacombe, linux-kernel, Sam Ravnborg, linux-mips

On Mon, Aug 15, 2011 at 01:45:04PM +0400, Sergei Shtylyov wrote:

>    You didn't sign off.

True - but I won't make a big fuzz about that for a one-line.  I'm sure
Arnaud will vow to do right the next time :-)

Applied.  Thanks, Arnaud!

  Ralf

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 01/11] arch/m68k: do not use EXTRA_{A,C,LD}FLAGS
  2011-08-15  7:26   ` Finn Thain
@ 2011-08-15 14:45     ` Arnaud Lacombe
  0 siblings, 0 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15 14:45 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-kernel, Sam Ravnborg, linux-m68k

Hi,

On Mon, Aug 15, 2011 at 3:26 AM, Finn Thain <fthain@telegraphics.com.au> wrote:
>
> On Mon, 15 Aug 2011, Arnaud Lacombe wrote:
>
>> -# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT
>> -# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT
>> +# ccflags-y += -DTRAP_DBG_INTERRUPT
>> +# ccflags-y += -DTRAP_DBG_INTERRUPT
>
> asflags-y?
>
yes, indeed. I'll resend later on.

 - Arnaud

> Finn
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 02/11] arch/mips: do not use EXTRA_CFLAGS
  2011-08-15 13:55     ` Ralf Baechle
@ 2011-08-15 16:19       ` Arnaud Lacombe
  2011-08-15 17:28         ` Jayachandran C.
  0 siblings, 1 reply; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-15 16:19 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Sergei Shtylyov, linux-kernel, Sam Ravnborg, linux-mips

Hi,

On Mon, Aug 15, 2011 at 9:55 AM, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Mon, Aug 15, 2011 at 01:45:04PM +0400, Sergei Shtylyov wrote:
>
>>    You didn't sign off.
>
> True - but I won't make a big fuzz about that for a one-line.  I'm sure
> Arnaud will vow to do right the next time :-)
>
You are welcome to slap me. If it's not too late:

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

  - Arnaud

> Applied.  Thanks, Arnaud!
>
>  Ralf
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 02/11] arch/mips: do not use EXTRA_CFLAGS
  2011-08-15 16:19       ` Arnaud Lacombe
@ 2011-08-15 17:28         ` Jayachandran C.
  2011-08-16 10:05           ` Ralf Baechle
  0 siblings, 1 reply; 35+ messages in thread
From: Jayachandran C. @ 2011-08-15 17:28 UTC (permalink / raw)
  To: Arnaud Lacombe
  Cc: Ralf Baechle, Sergei Shtylyov, linux-kernel, Sam Ravnborg, linux-mips

On Mon, Aug 15, 2011 at 9:49 PM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Hi,
>
> On Mon, Aug 15, 2011 at 9:55 AM, Ralf Baechle <ralf@linux-mips.org> wrote:
>> On Mon, Aug 15, 2011 at 01:45:04PM +0400, Sergei Shtylyov wrote:
>>
>>>    You didn't sign off.
>>
>> True - but I won't make a big fuzz about that for a one-line.  I'm sure
>> Arnaud will vow to do right the next time :-)
>>
> You are welcome to slap me. If it's not too late:
>
> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

Thanks for fixing this up.   Looks like an acked-by is not needed :)

JC   (Netlogic XLR/XLS maintainer)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 05/11] drivers/media: do not use EXTRA_CFLAGS
  2011-08-15  5:07 ` [PATCH 05/11] drivers/media: " Arnaud Lacombe
  2011-08-15  5:15   ` Arnaud Lacombe
@ 2011-08-16  8:15   ` Laurent Pinchart
  1 sibling, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2011-08-16  8:15 UTC (permalink / raw)
  To: Arnaud Lacombe
  Cc: linux-kernel, Sam Ravnborg, Mauro Carvalho Chehab, linux-media

Hi Arnaud,

On Monday 15 August 2011 07:07:08 Arnaud Lacombe wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
> 
>     commit f77bf01425b11947eeb3b5b54685212c302741b8
>     Author: Sam Ravnborg <sam@neptun.(none)>
>     Date:   Mon Oct 15 22:25:06 2007 +0200
> 
>         kbuild: introduce ccflags-y, asflags-y and ldflags-y
> 
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for
> command line use. By default, gmake(1) do not override command line
> setting, so this is likely to result in build failure or unexpected
> behavior.
> 
> Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
> Cc: linux-media@vger.kernel.org

For drivers/media/video/omap3isp/Makefile,

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 02/11] arch/mips: do not use EXTRA_CFLAGS
  2011-08-15 17:28         ` Jayachandran C.
@ 2011-08-16 10:05           ` Ralf Baechle
  0 siblings, 0 replies; 35+ messages in thread
From: Ralf Baechle @ 2011-08-16 10:05 UTC (permalink / raw)
  To: Jayachandran C.
  Cc: Arnaud Lacombe, Sergei Shtylyov, linux-kernel, Sam Ravnborg, linux-mips

On Mon, Aug 15, 2011 at 10:58:27PM +0530, Jayachandran C. wrote:

> On Mon, Aug 15, 2011 at 9:49 PM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> > Hi,
> >
> > On Mon, Aug 15, 2011 at 9:55 AM, Ralf Baechle <ralf@linux-mips.org> wrote:
> >> On Mon, Aug 15, 2011 at 01:45:04PM +0400, Sergei Shtylyov wrote:
> >>
> >>>    You didn't sign off.
> >>
> >> True - but I won't make a big fuzz about that for a one-line.  I'm sure
> >> Arnaud will vow to do right the next time :-)
> >>
> > You are welcome to slap me. If it's not too late:
> >
> > Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> 
> Thanks for fixing this up.   Looks like an acked-by is not needed :)

No - but generally an Acked-by: a maintainer or Reviewed-by: or Tested-by:
somebody else is always welcome.  The more eyeballs, the better :-)

  Ralf

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 03/11] arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS
  2011-08-15  5:13   ` Arnaud Lacombe
@ 2011-08-18  8:00     ` Guan Xuetao
  2011-08-18 16:37       ` Arnaud Lacombe
  0 siblings, 1 reply; 35+ messages in thread
From: Guan Xuetao @ 2011-08-18  8:00 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kernel, Sam Ravnborg

It looks good for me.

Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>

Do I need to push the patch into unicore32 repo?

Thanks & Regards

Guan Xuetao


On Mon, 2011-08-15 at 01:13 -0400, Arnaud Lacombe wrote:
> Hi,
> 
> On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> > Usage of these flags has been deprecated for nearly 4 years by:
> >
> >    commit f77bf01425b11947eeb3b5b54685212c302741b8
> >    Author: Sam Ravnborg <sam@neptun.(none)>
> >    Date:   Mon Oct 15 22:25:06 2007 +0200
> >
> >        kbuild: introduce ccflags-y, asflags-y and ldflags-y
> >
> > Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> > line use. By default, gmake(1) do not override command line setting, so this is
> > likely to result in build failure or unexpected behavior.
> >
> > Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
> >
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> 
>  - Arnaud
> > ---
> >  arch/unicore32/boot/compressed/Makefile |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/unicore32/boot/compressed/Makefile b/arch/unicore32/boot/compressed/Makefile
> > index b0954a2..950a9af 100644
> > --- a/arch/unicore32/boot/compressed/Makefile
> > +++ b/arch/unicore32/boot/compressed/Makefile
> > @@ -10,8 +10,8 @@
> >  # Copyright (C) 2001~2010 GUAN Xue-tao
> >  #
> >
> > -EXTRA_CFLAGS   := -fpic -fno-builtin
> > -EXTRA_AFLAGS   := -Wa,-march=all
> > +ccflags-y      := -fpic -fno-builtin
> > +asflags-y      := -Wa,-march=all
> >
> >  OBJS           := misc.o
> >
> > --
> > 1.7.6.153.g78432
> >
> >



^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 03/11] arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS
  2011-08-18  8:00     ` Guan Xuetao
@ 2011-08-18 16:37       ` Arnaud Lacombe
  2011-08-19  6:54         ` Guan Xuetao
  0 siblings, 1 reply; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-18 16:37 UTC (permalink / raw)
  To: gxt; +Cc: linux-kernel, Sam Ravnborg

Hi,

On Thu, Aug 18, 2011 at 4:00 AM, Guan Xuetao <gxt@mprc.pku.edu.cn> wrote:
> It looks good for me.
>
> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
>
> Do I need to push the patch into unicore32 repo?
>
All patches in the series are fully independent from one another, so
yes, you can just pick it in the unicore32 tree.

Thanks,
 - Arnaud

> Thanks & Regards
>
> Guan Xuetao
>
>
> On Mon, 2011-08-15 at 01:13 -0400, Arnaud Lacombe wrote:
>> Hi,
>>
>> On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
>> > Usage of these flags has been deprecated for nearly 4 years by:
>> >
>> >    commit f77bf01425b11947eeb3b5b54685212c302741b8
>> >    Author: Sam Ravnborg <sam@neptun.(none)>
>> >    Date:   Mon Oct 15 22:25:06 2007 +0200
>> >
>> >        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>> >
>> > Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
>> > line use. By default, gmake(1) do not override command line setting, so this is
>> > likely to result in build failure or unexpected behavior.
>> >
>> > Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
>> >
>> > Cc: Sam Ravnborg <sam@ravnborg.org>
>> > Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
>> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
>>
>>  - Arnaud
>> > ---
>> >  arch/unicore32/boot/compressed/Makefile |    4 ++--
>> >  1 files changed, 2 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/arch/unicore32/boot/compressed/Makefile b/arch/unicore32/boot/compressed/Makefile
>> > index b0954a2..950a9af 100644
>> > --- a/arch/unicore32/boot/compressed/Makefile
>> > +++ b/arch/unicore32/boot/compressed/Makefile
>> > @@ -10,8 +10,8 @@
>> >  # Copyright (C) 2001~2010 GUAN Xue-tao
>> >  #
>> >
>> > -EXTRA_CFLAGS   := -fpic -fno-builtin
>> > -EXTRA_AFLAGS   := -Wa,-march=all
>> > +ccflags-y      := -fpic -fno-builtin
>> > +asflags-y      := -Wa,-march=all
>> >
>> >  OBJS           := misc.o
>> >
>> > --
>> > 1.7.6.153.g78432
>> >
>> >
>
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 03/11] arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS
  2011-08-18 16:37       ` Arnaud Lacombe
@ 2011-08-19  6:54         ` Guan Xuetao
  0 siblings, 0 replies; 35+ messages in thread
From: Guan Xuetao @ 2011-08-19  6:54 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kernel, Sam Ravnborg

On Thu, 2011-08-18 at 12:37 -0400, Arnaud Lacombe wrote:
> Hi,
> 
> On Thu, Aug 18, 2011 at 4:00 AM, Guan Xuetao <gxt@mprc.pku.edu.cn> wrote:
> > It looks good for me.
> >
> > Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
> >
> > Do I need to push the patch into unicore32 repo?
> >
> All patches in the series are fully independent from one another, so
> yes, you can just pick it in the unicore32 tree.
> 
> Thanks,
>  - Arnaud

I see, thanks for your explanation.

Guan Xuetao



^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 10/11] scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement
  2011-08-15  5:07 ` [PATCH 10/11] scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement Arnaud Lacombe
@ 2011-08-22 15:50   ` Arnaud Lacombe
  2011-08-31 14:43   ` Michal Marek
  1 sibling, 0 replies; 35+ messages in thread
From: Arnaud Lacombe @ 2011-08-22 15:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Lacombe, Sam Ravnborg, linux-kbuild

Hi Michal,

On Mon, Aug 15, 2011 at 1:07 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
>
>    commit f77bf01425b11947eeb3b5b54685212c302741b8
>    Author: Sam Ravnborg <sam@neptun.(none)>
>    Date:   Mon Oct 15 22:25:06 2007 +0200
>
>        kbuild: introduce ccflags-y, asflags-y and ldflags-y
>
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
>
> Do not advertise for its usage.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: linux-kbuild@vger.kernel.org
>
ping ?

 - Arnaud

> ---
>  scripts/Makefile.build |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index a0fd502..d2b366c 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -46,7 +46,7 @@ include $(kbuild-file)
>  # If the save-* variables changed error out
>  ifeq ($(KBUILD_NOPEDANTIC),)
>         ifneq ("$(save-cflags)","$(CFLAGS)")
> -                $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use EXTRA_CFLAGS)
> +                $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use ccflags-y)
>         endif
>  endif
>
> --
> 1.7.6.153.g78432
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 10/11] scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement
  2011-08-15  5:07 ` [PATCH 10/11] scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement Arnaud Lacombe
  2011-08-22 15:50   ` Arnaud Lacombe
@ 2011-08-31 14:43   ` Michal Marek
  1 sibling, 0 replies; 35+ messages in thread
From: Michal Marek @ 2011-08-31 14:43 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kernel, Sam Ravnborg, linux-kbuild

On Mon, Aug 15, 2011 at 01:07:13AM -0400, Arnaud Lacombe wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
> 
>     commit f77bf01425b11947eeb3b5b54685212c302741b8
>     Author: Sam Ravnborg <sam@neptun.(none)>
>     Date:   Mon Oct 15 22:25:06 2007 +0200
> 
>         kbuild: introduce ccflags-y, asflags-y and ldflags-y
> 
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
> 
> Do not advertise for its usage.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: linux-kbuild@vger.kernel.org

Thanks, I applied this to kbuild-2.6.git#kbuild with your signoff
assumed.

Michal

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 11/11] script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS
  2011-08-15  5:07 ` [PATCH 11/11] script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
  2011-08-15  5:10   ` Arnaud Lacombe
@ 2011-08-31 14:44   ` Michal Marek
  1 sibling, 0 replies; 35+ messages in thread
From: Michal Marek @ 2011-08-31 14:44 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kernel, Sam Ravnborg, Andy Whitcroft

On Mon, Aug 15, 2011 at 01:07:14AM -0400, Arnaud Lacombe wrote:
> Usage of these flags has been deprecated for nearly 4 years by:
> 
>     commit f77bf01425b11947eeb3b5b54685212c302741b8
>     Author: Sam Ravnborg <sam@neptun.(none)>
>     Date:   Mon Oct 15 22:25:06 2007 +0200
> 
>         kbuild: introduce ccflags-y, asflags-y and ldflags-y
> 
> Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
> line use. By default, gmake(1) do not override command line setting, so this is
> likely to result in build failure or unexpected behavior.
> 
> Warn about their introduction in Makefile or Kbuild files.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Andy Whitcroft <apw@canonical.com>
> ---
>  scripts/checkpatch.pl |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)

Applied to kbuild-2.6.git#misc with your signoff assumed.

Michal

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2011-08-31 14:44 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-15  5:07 [PATCH 00/11] Fix in-tree usage of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
2011-08-15  5:07 ` [PATCH 01/11] arch/m68k: do not use EXTRA_{A,C,LD}FLAGS Arnaud Lacombe
2011-08-15  5:11   ` Arnaud Lacombe
2011-08-15  7:26   ` Finn Thain
2011-08-15 14:45     ` Arnaud Lacombe
2011-08-15  5:07 ` [PATCH 02/11] arch/mips: do not use EXTRA_CFLAGS Arnaud Lacombe
2011-08-15  9:45   ` Sergei Shtylyov
2011-08-15 13:55     ` Ralf Baechle
2011-08-15 16:19       ` Arnaud Lacombe
2011-08-15 17:28         ` Jayachandran C.
2011-08-16 10:05           ` Ralf Baechle
2011-08-15  5:07 ` [PATCH 03/11] arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS Arnaud Lacombe
2011-08-15  5:13   ` Arnaud Lacombe
2011-08-18  8:00     ` Guan Xuetao
2011-08-18 16:37       ` Arnaud Lacombe
2011-08-19  6:54         ` Guan Xuetao
2011-08-15  5:07 ` [PATCH 04/11] arch/x86: do not use EXTRA_CFLAGS Arnaud Lacombe
2011-08-15  5:14   ` Arnaud Lacombe
2011-08-15  5:07 ` [PATCH 05/11] drivers/media: " Arnaud Lacombe
2011-08-15  5:15   ` Arnaud Lacombe
2011-08-16  8:15   ` Laurent Pinchart
2011-08-15  5:07 ` [PATCH 06/11] drivers/net/bna: " Arnaud Lacombe
2011-08-15  5:16   ` Arnaud Lacombe
2011-08-15  5:07 ` [PATCH 07/11] drivers/pps: " Arnaud Lacombe
2011-08-15  5:16   ` Arnaud Lacombe
2011-08-15  5:07 ` [PATCH 08/11] drivers/scsi: " Arnaud Lacombe
2011-08-15  5:16   ` Arnaud Lacombe
2011-08-15  5:07 ` [PATCH 09/11] drivers/staging: " Arnaud Lacombe
2011-08-15  5:15   ` Arnaud Lacombe
2011-08-15  5:07 ` [PATCH 10/11] scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement Arnaud Lacombe
2011-08-22 15:50   ` Arnaud Lacombe
2011-08-31 14:43   ` Michal Marek
2011-08-15  5:07 ` [PATCH 11/11] script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS Arnaud Lacombe
2011-08-15  5:10   ` Arnaud Lacombe
2011-08-31 14:44   ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).