[OpenWrt-Devel] [PATCH] lantiq: don't unnecessarily disable gcc's format-security

Felix Fietkau nbd at openwrt.org
Sat Dec 5 04:38:26 EST 2015


On 2015-11-30 20:02, Andre Heider wrote:
> ltq-adsl-mei as well as ltq-adsl build just fine with these compiler
> flags, there's no need to disable it.
> 
> Signed-off-by: Andre Heider <a.heider at gmail.com>
I don't know about ltq-adsl-mei, but ltq-adsl does not build with
this patch:

Applications/Xcode.app/Contents/Developer/usr/bin/make ARCH=mips -C /Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/linux-4.1.13 O=/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/linux-4.1.13 M=/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src modules
egrep: empty (sub)expression
  CC [M]  /Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_api.o
  CC [M]  /Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_fifo.o
  CC [M]  /Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_autoboot.o
  CC [M]  /Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_debug.o
  CC [M]  /Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.o
/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c: In function 'DSL_DRV_debug_printf':
/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c:364:21: error: format not a string literal and no format arguments [-Werror=format-security]
       nRet = printk(msg);
                     ^
In file included from /Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c:14:0:
/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c: In function 'DSL_DRV_ThreadInit':
/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c:619:87: error: format not a string literal and no format arguments [-Werror=format-security]
          pThrCntrl->pid = kthread_run(DSL_DRV_KernelThreadStartup, (void *)pThrCntrl, pThrCntrl->thrParams.pName);
                                                                                       ^
/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/linux-4.1.13/include/linux/kthread.h:14:45: note: in definition of macro 'kthread_create'
  kthread_create_on_node(threadfn, data, -1, namefmt, ##arg)
                                             ^
/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c:619:27: note: in expansion of macro 'kthread_run'
          pThrCntrl->pid = kthread_run(DSL_DRV_KernelThreadStartup, (void *)pThrCntrl, pThrCntrl->thrParams.pName);
                           ^
cc1: some warnings being treated as errors
make[7]: *** [/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.o] Error 1
make[6]: *** [_module_/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/src] Error 2
make[5]: *** [sub-make] Error 2
make[4]: *** [drv_dsl_cpe_api.ko] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [/Users/nbd/openwrt/build_dir/target-mips_34kc+dsp_musl-1.1.11/linux-lantiq_xrx200/ltq-dsl-ar9/drv_dsl_cpe_api-3.24.4.4/.built] Error 2
make[2]: Leaving directory `/Users/nbd/openwrt/package/kernel/lantiq/ltq-adsl'
make[1]: *** [package/kernel/lantiq/ltq-adsl/compile] Error 2
make[1]: Leaving directory `/Users/nbd/openwrt'
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list