aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-adsl/patches/020-not-leak-cflags.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-03-03 01:38:50 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2018-03-03 12:58:55 +0100
commit4d90887496b43b1db9f48ccdc9fe823b5371e323 (patch)
tree89d9b519a21732e1a16b74a360d14d30a44515fb /package/kernel/lantiq/ltq-adsl/patches/020-not-leak-cflags.patch
parentb5c5f7d203aae4b9531e423f593f80f7c9445ea3 (diff)
downloadupstream-4d90887496b43b1db9f48ccdc9fe823b5371e323.tar.gz
upstream-4d90887496b43b1db9f48ccdc9fe823b5371e323.tar.bz2
upstream-4d90887496b43b1db9f48ccdc9fe823b5371e323.zip
lantiq: ltq-adsl: Do not leak user space CFLAGS into kernel space
Do not leak the user space CFLAGS into the kernel space any more, this allows us to activate the MIPS16 build. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/kernel/lantiq/ltq-adsl/patches/020-not-leak-cflags.patch')
-rw-r--r--package/kernel/lantiq/ltq-adsl/patches/020-not-leak-cflags.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-adsl/patches/020-not-leak-cflags.patch b/package/kernel/lantiq/ltq-adsl/patches/020-not-leak-cflags.patch
new file mode 100644
index 0000000000..b3f20dbbbc
--- /dev/null
+++ b/package/kernel/lantiq/ltq-adsl/patches/020-not-leak-cflags.patch
@@ -0,0 +1,32 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -253,10 +253,7 @@ else
+ drv_dsl_cpe_api_common_mod_cflags =
+ endif
+
+-drv_dsl_cpe_api_common_cflags = -DLINUX -D__LINUX__ -D__KERNEL__ -DEXPORT_SYMTAB \
+- -pipe -Wall -Wformat -Wimplicit -Wunused -Wswitch -Wcomment -Winline \
+- -Wuninitialized -Wparentheses -Wsign-compare -Wreturn-type \
+- -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
++drv_dsl_cpe_api_common_cflags = -DLINUX -D__LINUX__ -D__KERNEL__ -DEXPORT_SYMTAB
+
+ if DSL_DBG_MAX_LEVEL_SET
+ drv_dsl_cpe_api_common_cflags += -DDSL_DBG_MAX_LEVEL=$(DSL_DBG_MAX_LEVEL_PRE)
+@@ -266,7 +263,7 @@ endif
+ drv_dsl_cpe_api_target_cflags = $(ADD_DRV_CFLAGS)
+
+ # compile cflags
+-drv_dsl_cpe_api_compile_cflags = $(EXTRA_DRV_CFLAGS)
++drv_dsl_cpe_api_compile_cflags =
+
+ if !KERNEL_2_6
+ # the headerfile of linux kernels 2.6.x contain to much arithmetic
+@@ -314,7 +311,7 @@ drv_dsl_cpe_api.ko: $(drv_dsl_cpe_api_SO
+ @echo -e "# drv_dsl_cpe_api: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
+ @echo -e "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild
+ @echo -e "$(subst .ko,,$@)-y := $(drv_dsl_cpe_api_OBJS)" >> $(PWD)/Kbuild
+- @echo -e "EXTRA_CFLAGS := $(CFLAGS) -DHAVE_CONFIG_H $(drv_dsl_cpe_api_CFLAGS) $(DSL_DRIVER_INCL_PATH) $(IFXOS_INCLUDE_PATH) -I@abs_srcdir@/include -I$(PWD)/include" >> $(PWD)/Kbuild
++ @echo -e "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(drv_dsl_cpe_api_CFLAGS) $(DSL_DRIVER_INCL_PATH) $(IFXOS_INCLUDE_PATH) -I@abs_srcdir@/include -I$(PWD)/include" >> $(PWD)/Kbuild
+ $(MAKE) ARCH=@KERNEL_ARCH@ -C @KERNEL_BUILD_PATH@ O=@KERNEL_BUILD_PATH@ M=$(PWD) modules
+
+ clean-generic: