From: Nathan Chancellor <nathan@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>,
Arnd Bergmann <arnd@arndb.de>, Ard Biesheuvel <ardb@kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH v4 1/4] ARM: remove lazy evaluation in Makefile
Date: Fri, 14 Oct 2022 14:18:06 -0700 [thread overview]
Message-ID: <Y0nSDuEumerVwyHT@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20221014201354.3190007-2-ndesaulniers@google.com>
On Fri, Oct 14, 2022 at 01:13:51PM -0700, Nick Desaulniers wrote:
> arch-y and tune-y used lazy evaluation since they used to contain
> cc-option checks. They don't any longer, so just eagerly evaluate these
> command line flags.
>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> ---
> No change from v3.
>
> arch/arm/Makefile | 60 +++++++++++++++++++++--------------------------
> 1 file changed, 27 insertions(+), 33 deletions(-)
>
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index c846119c448f..8dd943b50b7d 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -63,44 +63,38 @@ KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra)
> # Note that GCC does not numerically define an architecture version
> # macro, but instead defines a whole series of macros which makes
> # testing for a specific architecture or later rather impossible.
> -arch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m
> -arch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 -march=armv7-a
> -arch-$(CONFIG_CPU_32v6) =-D__LINUX_ARM_ARCH__=6 -march=armv6
> -# Only override the compiler option if ARMv6. The ARMv6K extensions are
> +arch-$(CONFIG_CPU_32v7M) :=-D__LINUX_ARM_ARCH__=7 -march=armv7-m
> +arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 -march=armv7-a
> +arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 -march=armv6
> +# Only override the compiler opt:ion if ARMv6. The ARMv6K extensions are
> # always available in ARMv7
> ifeq ($(CONFIG_CPU_32v6),y)
> -arch-$(CONFIG_CPU_32v6K) =-D__LINUX_ARM_ARCH__=6 -march=armv6k
> +arch-$(CONFIG_CPU_32v6K) :=-D__LINUX_ARM_ARCH__=6 -march=armv6k
> endif
> -arch-$(CONFIG_CPU_32v5) =-D__LINUX_ARM_ARCH__=5 -march=armv5te
> -arch-$(CONFIG_CPU_32v4T) =-D__LINUX_ARM_ARCH__=4 -march=armv4t
> -arch-$(CONFIG_CPU_32v4) =-D__LINUX_ARM_ARCH__=4 -march=armv4
> -arch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3m
> -
> -# Evaluate arch cc-option calls now
> -arch-y := $(arch-y)
> +arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 -march=armv5te
> +arch-$(CONFIG_CPU_32v4T) :=-D__LINUX_ARM_ARCH__=4 -march=armv4t
> +arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4
> +arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3m
>
> # This selects how we optimise for the processor.
> -tune-$(CONFIG_CPU_ARM7TDMI) =-mtune=arm7tdmi
> -tune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi
> -tune-$(CONFIG_CPU_ARM740T) =-mtune=arm7tdmi
> -tune-$(CONFIG_CPU_ARM9TDMI) =-mtune=arm9tdmi
> -tune-$(CONFIG_CPU_ARM940T) =-mtune=arm9tdmi
> -tune-$(CONFIG_CPU_ARM946E) =-mtune=arm9e
> -tune-$(CONFIG_CPU_ARM920T) =-mtune=arm9tdmi
> -tune-$(CONFIG_CPU_ARM922T) =-mtune=arm9tdmi
> -tune-$(CONFIG_CPU_ARM925T) =-mtune=arm9tdmi
> -tune-$(CONFIG_CPU_ARM926T) =-mtune=arm9tdmi
> -tune-$(CONFIG_CPU_FA526) =-mtune=arm9tdmi
> -tune-$(CONFIG_CPU_SA110) =-mtune=strongarm110
> -tune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100
> -tune-$(CONFIG_CPU_XSCALE) =-mtune=xscale
> -tune-$(CONFIG_CPU_XSC3) =-mtune=xscale
> -tune-$(CONFIG_CPU_FEROCEON) =-mtune=xscale
> -tune-$(CONFIG_CPU_V6) =-mtune=arm1136j-s
> -tune-$(CONFIG_CPU_V6K) =-mtune=arm1136j-s
> -
> -# Evaluate tune cc-option calls now
> -tune-y := $(tune-y)
> +tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi
> +tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi
> +tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi
> +tune-$(CONFIG_CPU_ARM9TDMI) :=-mtune=arm9tdmi
> +tune-$(CONFIG_CPU_ARM940T) :=-mtune=arm9tdmi
> +tune-$(CONFIG_CPU_ARM946E) :=-mtune=arm9e
> +tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi
> +tune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmi
> +tune-$(CONFIG_CPU_ARM925T) :=-mtune=arm9tdmi
> +tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi
> +tune-$(CONFIG_CPU_FA526) :=-mtune=arm9tdmi
> +tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110
> +tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
> +tune-$(CONFIG_CPU_XSCALE) :=-mtune=xscale
> +tune-$(CONFIG_CPU_XSC3) :=-mtune=xscale
> +tune-$(CONFIG_CPU_FEROCEON) :=-mtune=xscale
> +tune-$(CONFIG_CPU_V6) :=-mtune=arm1136j-s
> +tune-$(CONFIG_CPU_V6K) :=-mtune=arm1136j-s
>
> ifeq ($(CONFIG_AEABI),y)
> CFLAGS_ABI :=-mabi=aapcs-linux -mfpu=vfp
> --
> 2.38.0.413.g74048e4d9e-goog
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-14 21:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 20:13 [PATCH v4 0/4] pass -march= only to compiler Nick Desaulniers
2022-10-14 20:13 ` [PATCH v4 1/4] ARM: remove lazy evaluation in Makefile Nick Desaulniers
2022-10-14 21:18 ` Nathan Chancellor [this message]
2022-10-14 20:13 ` [PATCH v4 2/4] ARM: use .arch directives instead of assembler command line flags Nick Desaulniers
2022-10-14 21:19 ` Nathan Chancellor
2022-11-08 18:30 ` Nathan Chancellor
2022-11-08 18:37 ` Russell King (Oracle)
2022-11-08 18:40 ` Nathan Chancellor
2022-10-14 20:13 ` [PATCH v4 3/4] ARM: only use -mtp=cp15 for the compiler Nick Desaulniers
2022-10-14 21:20 ` Nathan Chancellor
2022-10-14 20:13 ` [PATCH v4 4/4] ARM: pass -march= only to compiler Nick Desaulniers
2022-10-14 21:21 ` Nathan Chancellor
2022-10-14 20:16 ` [PATCH v4 0/4] " Nick Desaulniers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y0nSDuEumerVwyHT@dev-arch.thelio-3990X \
--to=nathan@kernel.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=ndesaulniers@google.com \
--cc=rmk+kernel@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox