build system - How to pass compiler options during Linux kernel compilation? -


for reasons, need compile linux kernel (currently 4.7.10) passing simple , innocent additional command line options (e.g. -pipe -wsomething etc) c compiler.

how do it?

more specifically, how enforce these compiler flags during plain make during make menuconfig , similar, i.e. passed c compiler whenever latter executed.

ps: beg please not ask me details why need stupid this. satisfactory explanation take me several hours write, not 1 of best skills.

from linux kernel's makefile:

# add arch overrides , user supplied cppflags, aflags , cflags # last assignments kbuild_cppflags += $(arch_cppflags) $(kcppflags) kbuild_aflags   += $(arch_aflags)   $(kaflags) kbuild_cflags   += $(arch_cflags)   $(kcflags) 

so, passing additional options kbuild uses usual environment/makefile variables k prefix:

make "kcflags=-pipe -wsomething" 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -