Linus Torvalds writes: (Summary) In the presense of
multiple defaults, the first is picked, so this _automatically_ does
that whole priority ordering.
that whole priority ordering.
And then the Makefile can just have
And then the Makefile can just have
KBUILD_CFLAGS += $(CONFIG_STACKPROTECTOR_FLAGS)
KBUILD_CFLAGS += $(CONFIG_STACKPROTECTOR_FLAGS)
which seems much simpler.
which seems much simpler.
It also makes more complex conditionals easier (ie different compilers with different flags, since clang sometimes does the same thing with another flag name), so I'd rather see this pattern in general.
that whole priority ordering.
And then the Makefile can just have
And then the Makefile can just have
KBUILD_CFLAGS += $(CONFIG_STACKPROTECTOR_FLAGS)
KBUILD_CFLAGS += $(CONFIG_STACKPROTECTOR_FLAGS)
which seems much simpler.
which seems much simpler.
It also makes more complex conditionals easier (ie different compilers with different flags, since clang sometimes does the same thing with another flag name), so I'd rather see this pattern in general.