On Wed, Aug 11, 2021 at 2:58 AM Nick Desaulniers <ndesaulniers@xxxxxxxxxx> wrote: > > Masahiro, > I was looking through the uses of cc-option, cc-option-yn, and > cc-disable-warning to see what we're missing support for in Clang. > > I have a short list of places where cc-option can be removed at > https://github.com/ClangBuiltLinux/linux/issues/1436#issuecomment-895557491 > because all supported versions of supported toolchains support these > flags. These should remove a few unnecessary compiler invocations. > > There are also a few cc-option tests that are very compiler specific, > so those might be convertible to just check CC_IS_* rather than > cc-option (I'll have to verify). > > Another thing I noticed is that it seems that most uses of > cc-option-yn are replaceable with simply cc-option when they use > cc-option-yn but check that the result is equal to y. I think even the > cases that check against n could be converted to: > > Examples: > arch/x86/Makefile > From: > ifeq ($(call cc-option-yn, -mfentry), n) > To: > ifeq ($(call cc-option,-mfentry),) > (Though technically, all supported versions of gcc and clang support > -mfentry, so this block should just be deleted) > > arch/powerpc/Makefile > From: > ifeq ($(call cc-option-yn,-mcmodel=medium),y) > To: > ifneq ($(call cc-option,-mcmodel=medium),) > > Then perhaps we could consolidate cc-option-yn into cc-option? What > are your thoughts? Should I start sending you patches for all of the > above? Yes, I think it is a nice clean-up. Patches are welcome. -- Best Regards Masahiro Yamada