aboutsummaryrefslogtreecommitdiff
path: root/system/dahdi-complete/patches/11-dahdi-3.1.0-r3-clang.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/dahdi-complete/patches/11-dahdi-3.1.0-r3-clang.patch')
-rw-r--r--system/dahdi-complete/patches/11-dahdi-3.1.0-r3-clang.patch115
1 files changed, 115 insertions, 0 deletions
diff --git a/system/dahdi-complete/patches/11-dahdi-3.1.0-r3-clang.patch b/system/dahdi-complete/patches/11-dahdi-3.1.0-r3-clang.patch
new file mode 100644
index 0000000000000..8b0cf18ec17ad
--- /dev/null
+++ b/system/dahdi-complete/patches/11-dahdi-3.1.0-r3-clang.patch
@@ -0,0 +1,115 @@
+From d55a2e89b74f752bb1b7a06ab57cebcc3f258d56 Mon Sep 17 00:00:00 2001
+From: Jaco Kroon <jaco@iewc.co.za>
+Date: Fri, 8 Jan 2021 14:27:30 +0200
+Subject: [PATCH] Enable building with CC=clang
+
+This requires that the host kernel also be built with CC=clang.
+
+Signed-off-by: Jaco Kroon <jaco@iewc.co.za>
+---
+ drivers/dahdi/Kbuild | 2 +-
+ drivers/dahdi/oct612x/Kbuild | 2 +-
+ drivers/dahdi/voicebus/Kbuild | 2 +-
+ drivers/dahdi/wcb4xxp/Kbuild | 2 +-
+ drivers/dahdi/wct4xxp/Kbuild | 4 ++--
+ drivers/dahdi/wctc4xxp/Kbuild | 2 +-
+ drivers/dahdi/wctdm24xxp/Kbuild | 2 +-
+ 7 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/dahdi/Kbuild b/drivers/dahdi/Kbuild
+index c7144b6..a41021f 100644
+--- a/drivers/dahdi/Kbuild
++++ b/drivers/dahdi/Kbuild
+@@ -59,7 +59,7 @@ obj-m += dahdi_echocan_oslec.o
+ obj-m += ../staging/echo/echo.o
+ endif
+
+-CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) -Wno-format-truncation
++CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) $(call cc-disable-warning, format-truncation)
+
+ ifndef HOTPLUG_FIRMWARE
+ ifneq (,$(filter y m,$(CONFIG_FW_LOADER)))
+diff --git a/drivers/dahdi/oct612x/Kbuild b/drivers/dahdi/oct612x/Kbuild
+index ac53fe7..9ff971c 100644
+--- a/drivers/dahdi/oct612x/Kbuild
++++ b/drivers/dahdi/oct612x/Kbuild
+@@ -27,6 +27,6 @@ octapi_files = octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.o \
+ # TODO: ccflags was added in 2.6.24 in commit f77bf01425b11947eeb3b5b54. This
+ # should be changed to a conditional compilation based on the Kernel Version.
+ # ccflags-y := -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
+-EXTRA_CFLAGS = -I$(src)/.. -Wno-undef -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
++EXTRA_CFLAGS = -I$(src)/.. $(call cc-disable-warning,undef) -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
+ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OCT612X) := oct612x.o
+ oct612x-objs := $(octapi_files)
+diff --git a/drivers/dahdi/voicebus/Kbuild b/drivers/dahdi/voicebus/Kbuild
+index 3bf9640..4052515 100644
+--- a/drivers/dahdi/voicebus/Kbuild
++++ b/drivers/dahdi/voicebus/Kbuild
+@@ -11,7 +11,7 @@ else
+ EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
+ endif
+
+-EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
++EXTRA_CFLAGS += -I$(src)/.. $(call cc-disable-warning, undef)
+
+ $(obj)/$(FIRM_DIR)/dahdi-fw-vpmoct032.o: $(obj)/voicebus.o
+ $(MAKE) -C $(obj)/$(FIRM_DIR) dahdi-fw-vpmoct032.o
+diff --git a/drivers/dahdi/wcb4xxp/Kbuild b/drivers/dahdi/wcb4xxp/Kbuild
+index 80606bf..306e986 100644
+--- a/drivers/dahdi/wcb4xxp/Kbuild
++++ b/drivers/dahdi/wcb4xxp/Kbuild
+@@ -1,6 +1,6 @@
+ obj-m += wcb4xxp.o
+
+-EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
++EXTRA_CFLAGS += -I$(src)/.. $(call cc-disable-warning, undef)
+
+ wcb4xxp-objs := base.o
+
+diff --git a/drivers/dahdi/wct4xxp/Kbuild b/drivers/dahdi/wct4xxp/Kbuild
+index cf01ccf..d4578da 100644
+--- a/drivers/dahdi/wct4xxp/Kbuild
++++ b/drivers/dahdi/wct4xxp/Kbuild
+@@ -2,13 +2,13 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT4XXP) += wct4xxp.o
+
+ FIRM_DIR := ../firmware
+
+-EXTRA_CFLAGS += -I$(src)/.. -I$(src)/../oct612x/ $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) -Wno-undef
++EXTRA_CFLAGS += -I$(src)/.. -I$(src)/../oct612x/ $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) $(call cc-disable-warning, undef)
+
+ # The OCT612X source files are from a vendor drop and we do not want to edit
+ # them to make this warning go away. Therefore, turn off the
+ # unused-but-set-variable warning for this driver.
+
+-EXTRA_CFLAGS += $(call cc-option, -Wno-unused-but-set-variable)
++#EXTRA_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
+
+ ifeq ($(HOTPLUG_FIRMWARE),yes)
+ EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
+diff --git a/drivers/dahdi/wctc4xxp/Kbuild b/drivers/dahdi/wctc4xxp/Kbuild
+index 9f97498..451f380 100644
+--- a/drivers/dahdi/wctc4xxp/Kbuild
++++ b/drivers/dahdi/wctc4xxp/Kbuild
+@@ -2,7 +2,7 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP) += wctc4xxp.o
+
+ FIRM_DIR := ../firmware
+
+-EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
++EXTRA_CFLAGS += -I$(src)/.. $(call cc-disable-warning,undef)
+
+ ifeq ($(HOTPLUG_FIRMWARE),yes)
+ EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
+diff --git a/drivers/dahdi/wctdm24xxp/Kbuild b/drivers/dahdi/wctdm24xxp/Kbuild
+index 22cc71a..98b99a9 100644
+--- a/drivers/dahdi/wctdm24xxp/Kbuild
++++ b/drivers/dahdi/wctdm24xxp/Kbuild
+@@ -1,5 +1,5 @@
+ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp.o
+
+-EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
++EXTRA_CFLAGS += -I$(src)/.. $(call cc-disable-warning, undef)
+
+ wctdm24xxp-objs := base.o xhfc.o
+--
+2.26.2
+