Re: [PATCH 3/7] powerpc: replace cc-option-yn uses with cc-option
From: Masahiro Yamada <masahiroy@kernel.org>
Date: 2021-08-19 20:06:04
Also in:
linuxppc-dev
On Tue, Aug 17, 2021 at 11:31 AM Michael Ellerman [off-list ref] wrote:
Nick Desaulniers [off-list ref] writes:quoted
cc-option-yn can be replaced with cc-option. ie. Checking for support: ifeq ($(call cc-option-yn,$(FLAG)),y) becomes: ifneq ($(call cc-option,$(FLAG)),) Checking for lack of support: ifeq ($(call cc-option-yn,$(FLAG)),n) becomes: ifeq ($(call cc-option,$(FLAG)),) This allows us to pursue removing cc-option-yn. Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <redacted> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Nick Desaulniers <redacted> --- arch/powerpc/Makefile | 12 ++++++------ arch/powerpc/boot/Makefile | 5 +---- 2 files changed, 7 insertions(+), 10 deletions(-)diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 9aaf1abbc641..85e224536cf7 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile@@ -12,12 +12,12 @@ # Rewritten by Cort Dougan and Paul Mackerras # -HAS_BIARCH := $(call cc-option-yn, -m32) +HAS_BIARCH := $(call cc-option,-m32) # Set default 32 bits cross compilers for vdso and boot wrapper CROSS32_COMPILE ?= -ifeq ($(HAS_BIARCH),y) +ifeq ($(HAS_BIARCH),-m32)I don't love that we have to repeat "-m32" in each check. I'm pretty sure you can use ifdef here, because HAS_BIARCH is a simple variable (assigned with ":="). ie, this can be: ifdef HAS_BIARCH And that avoids having to spell out "-m32" everywhere. cheers
Yes. Comments from Nathan and Michael both sound good. -- Best Regards Masahiro Yamada