Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: kconfig: add recommended way to describe compiler support

It would be nice if the source code is written in the same style.
This proposes the convention for describing the compiler capability
in Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

+18
+18
Documentation/kbuild/kconfig-language.txt
··· 473 473 The dependencies are moved to the symbol GENERIC_IOMAP and we avoid the 474 474 situation where select forces a symbol equals to 'y'. 475 475 476 + Adding features that need compiler support 477 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 478 + 479 + There are several features that need compiler support. The recommended way 480 + to describe the dependency on the compiler feature is to use "depends on" 481 + followed by a test macro. 482 + 483 + config CC_STACKPROTECTOR 484 + bool "Stack Protector buffer overflow detection" 485 + depends on $(cc-option,-fstack-protector) 486 + ... 487 + 488 + If you need to expose a compiler capability to makefiles and/or C source files, 489 + CC_HAS_ is the recommended prefix for the config option. 490 + 491 + config CC_HAS_STACKPROTECTOR_NONE 492 + def_bool $(cc-option,-fno-stack-protector) 493 + 476 494 Build as module only 477 495 ~~~~~~~~~~~~~~~~~~~~ 478 496 To restrict a component build to module-only, qualify its config symbol