Skip to content

Commit ec88adb

Browse files
committed
Kbuild: Use ccflags-y instead of EXTRA_CFLAGS.
ccflags-y was added to the kernel back in 2007, in commit f77bf01425b11947eeb3b5b54. Recent kernel commit dbd83ea09699390892e5efecddd74ae43a00f071 has now completely removed the deprecated EXTRA_CFLAGS. Comments in Kbuild and the Makefile for the oct612x library were added back when it was created in 2013 in commit f65299e to use the newer ccflags-y based on the kernel version, but the change was never made to conditionally move away from the EXTRA_CFLAGS. Now that the older way no longer exists, always use ccflags-y. Resolves: #76
1 parent d932d9f commit ec88adb

File tree

11 files changed

+19
-25
lines changed

11 files changed

+19
-25
lines changed

drivers/dahdi/Kbuild

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) -Wno-format-truncation
8383
BAD_KERNELS_VERS := 22 34 34.0.1 34.0.2
8484
BAD_KERNELS := $(foreach ver,$(BAD_KERNELS_VERS),2.6.9-$(ver).EL 2.6.9-$(ver).ELsmp)
8585
ifneq (,$(filter $(KVERS),$(BAD_KERNELS)))
86-
EXTRA_CFLAGS+=-Drw_lock_t=rwlock_t
86+
ccflags-y+=-Drw_lock_t=rwlock_t
8787
endif
8888

8989
# A number of Fedora 10 (9 also?) kernels backported hrtimer to 2.6.27
9090
# as part of an ALSA backport. TODO: Any better way to detect that?
9191
ifeq (1,$(shell fgrep -q ' hrtimer_set_expires' include/linux/hrtimer.h 2>/dev/null && echo 1))
92-
EXTRA_CFLAGS+=-DHAVE_HRTIMER_ACCESSORS=1
92+
ccflags-y+=-DHAVE_HRTIMER_ACCESSORS=1
9393
endif
9494

9595
ifeq (1,$(shell fgrep -q 'wait_for_completion_timeout' include/linux/completion.h 2>/dev/null && echo 1))

drivers/dahdi/oct612x/Kbuild

+1-4
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ octapi_files = octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.o \
2424
apilib/llman/octapi_llman.o \
2525
oct612x-user.o
2626

27-
# TODO: ccflags was added in 2.6.24 in commit f77bf01425b11947eeb3b5b54. This
28-
# should be changed to a conditional compilation based on the Kernel Version.
29-
# ccflags-y := -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
30-
EXTRA_CFLAGS = -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
27+
ccflags-y := -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
3128
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OCT612X) := oct612x.o
3229
oct612x-objs := $(octapi_files)

drivers/dahdi/oct612x/Makefile

+1-4
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,5 @@ octapi_files = octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.o \
2323
apilib/largmath/octapi_largmath.o \
2424
apilib/llman/octapi_llman.o
2525

26-
# TODO: ccflags was added in 2.6.24 in commit f77bf01425b11947eeb3b5b54. This
27-
# should be changed to a conditional compilation based on the Kernel Version.
28-
# ccflags-y := -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
29-
EXTRA_CFLAGS = -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
26+
ccflags-y := -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
3027
lib-y := $(octapi_files)

drivers/dahdi/opvxa1200/Kbuild

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OPVXA1200) += opvxa1200.o
22

3-
EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
3+
ccflags-y += -I$(src)/.. -Wno-undef
44

55
opvxa1200-objs := base.o
66

@@ -10,10 +10,10 @@ ifneq ($(DAHDI_KERNEL_H_PATH),)
1010
DAHDI_SPAN_MODULE:=$(shell if grep -C 5 "struct dahdi_span {" $(DAHDI_KERNEL_H_PATH) | grep -q "struct module \*owner"; then echo "yes"; else echo "no"; fi)
1111
DAHDI_SPAN_OPS:=$(shell if grep -q "struct dahdi_span_ops {" $(DAHDI_KERNEL_H_PATH); then echo "yes"; else echo "no"; fi)
1212
ifeq ($(DAHDI_SPAN_MODULE),yes)
13-
EXTRA_CFLAGS+=-DDAHDI_SPAN_MODULE
13+
ccflags-y+=-DDAHDI_SPAN_MODULE
1414
else
1515
ifeq ($(DAHDI_SPAN_OPS),yes)
16-
EXTRA_CFLAGS+=-DDAHDI_SPAN_OPS
16+
ccflags-y+=-DDAHDI_SPAN_OPS
1717
endif
1818
endif
1919
endif

drivers/dahdi/voicebus/Kbuild

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ ifneq ($(HOTPLUG_FIRMWARE),yes)
88
dahdi_voicebus-objs += $(FIRM_DIR)/dahdi-fw-vpmoct032.o
99
$(warning WARNING: You are compiling firmware into voicebus.ko which is not available under the terms of the GPL. It may be a violation of the GPL to distribute the resulting image since it combines both GPL and non-GPL work. You should consult a lawyer of your own before distributing such an image.)
1010
else
11-
EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
11+
ccflags-y+=-DHOTPLUG_FIRMWARE
1212
endif
1313

14-
EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
14+
ccflags-y += -I$(src)/.. -Wno-undef
1515

1616
$(obj)/$(FIRM_DIR)/dahdi-fw-vpmoct032.o: $(obj)/voicebus.o
1717
$(MAKE) -C $(obj)/$(FIRM_DIR) dahdi-fw-vpmoct032.o

drivers/dahdi/wcb4xxp/Kbuild

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
obj-m += wcb4xxp.o
22

3-
EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
3+
ccflags-y += -I$(src)/.. -Wno-undef
44

55
wcb4xxp-objs := base.o
66

drivers/dahdi/wct4xxp/Kbuild

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT4XXP) += wct4xxp.o
22

33
FIRM_DIR := ../firmware
44

5-
EXTRA_CFLAGS += -I$(src)/.. -I$(src)/../oct612x/ $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) -Wno-undef
5+
ccflags-y += -I$(src)/.. -I$(src)/../oct612x/ $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) -Wno-undef
66

77
# The OCT612X source files are from a vendor drop and we do not want to edit
88
# them to make this warning go away. Therefore, turn off the
99
# unused-but-set-variable warning for this driver.
1010

11-
EXTRA_CFLAGS += $(call cc-option, -Wno-unused-but-set-variable)
11+
ccflags-y += $(call cc-option, -Wno-unused-but-set-variable)
1212

1313
ifeq ($(HOTPLUG_FIRMWARE),yes)
14-
EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
14+
ccflags-y+=-DHOTPLUG_FIRMWARE
1515
endif
1616

1717
wct4xxp-objs := base.o vpm450m.o

drivers/dahdi/wctc4xxp/Kbuild

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP) += wctc4xxp.o
22

33
FIRM_DIR := ../firmware
44

5-
EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
5+
ccflags-y += -I$(src)/.. -Wno-undef
66

77
ifeq ($(HOTPLUG_FIRMWARE),yes)
8-
EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
8+
ccflags-y+=-DHOTPLUG_FIRMWARE
99
endif
1010

1111
wctc4xxp-objs := base.o

drivers/dahdi/wctdm24xxp/Kbuild

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp.o
22

3-
EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
3+
ccflags-y += -I$(src)/.. -Wno-undef
44

55
wctdm24xxp-objs := base.o xhfc.o

drivers/dahdi/wcte12xp/Kbuild

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE12XP) += wcte12xp.o
22

3-
EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
3+
ccflags-y += -I$(src)/.. -Wno-undef
44

55
wcte12xp-objs := base.o

drivers/dahdi/xpp/Kbuild

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
EXTRA_CFLAGS = $(XPP_LOCAL_CFLAGS) \
1+
ccflags-y = $(XPP_LOCAL_CFLAGS) \
22
-DDEBUG \
33
-DPOLL_DIGITAL_INPUTS \
44
-DDEBUG_PCMTX \
@@ -32,7 +32,7 @@ xpd_echo-objs += card_echo.o
3232
xpp_mmap-objs += mmapbus.o mmapdrv.o
3333

3434
ifeq (y,$(PARPORT_DEBUG))
35-
EXTRA_CFLAGS += -DDEBUG_SYNC_PARPORT
35+
ccflags-y += -DDEBUG_SYNC_PARPORT
3636
obj-m += parport_debug.o
3737
endif
3838

0 commit comments

Comments
 (0)