[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdneF5nXgx3Rh6=NhPK+q93VRhs7mDCcK2eGY0e2rOqqnQ@mail.gmail.com>
Date: Mon, 16 Mar 2020 17:00:57 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Stefan Agner <stefan@...er.ch>
Cc: Russell King <linux@...linux.org.uk>,
Arnd Bergmann <arnd@...db.de>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Manoj Gupta <manojgupta@...gle.com>,
Jian Cai <jiancai@...gle.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
LKML <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] ARM: warn if pre-UAL assembler syntax is used
Revert "ARM: 8846/1: warn if divided syntax assembler is used"On Thu,
Feb 27, 2020 at 4:19 PM Stefan Agner <stefan@...er.ch> wrote:
>
> Remove the -mno-warn-deprecated assembler flag for GCC versions newer
> than 5.1 to make sure the GNU assembler warns in case non-unified
> syntax is used.
Hi Stefan, sorry for the late reply from me; digging out my backlog.
Do you happen to have a godbolt link perhaps that demonstrates this?
It sounds like GCC itself is emitting pre-UAL?
>
> This also prevents a warning when building with Clang and enabling
> its integrated assembler:
> clang-10: error: unsupported argument '-mno-warn-deprecated' to option 'Wa,'
>
> This is a second attempt of commit e8c24bbda7d5 ("ARM: 8846/1: warn if
> divided syntax assembler is used").
Would it be helpful to also make note of
commit b752bb405a13 ("Revert "ARM: 8846/1: warn if divided syntax
assembler is used"")?
>
> Signed-off-by: Stefan Agner <stefan@...er.ch>
> ---
> arch/arm/Makefile | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index db857d07114f..a6c8c9f39185 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -119,21 +119,25 @@ ifeq ($(CONFIG_CC_IS_CLANG),y)
> CFLAGS_ABI += -meabi gnu
> endif
>
> -# Accept old syntax despite ".syntax unified"
> -AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
This existing code is quite bad for Clang, which doesn't support
`-Wa,-mno-warn-deprecated`, so this falls back to `-Wa,-W`, which
disables all warnings from the assembler, which we definitely do not
want. That alone is worth putting in the GCC guard. But I would like
more info about GCC above before signing off.
> -
> ifeq ($(CONFIG_THUMB2_KERNEL),y)
> -CFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN)
> +CFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always
> AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb
> # Work around buggy relocation from gas if requested:
> ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y)
> KBUILD_CFLAGS_MODULE +=-fno-optimize-sibling-calls
> endif
> else
> -CFLAGS_ISA :=$(call cc-option,-marm,) $(AFLAGS_NOWARN)
> +CFLAGS_ISA :=$(call cc-option,-marm,)
> AFLAGS_ISA :=$(CFLAGS_ISA)
> endif
>
> +ifeq ($(CONFIG_CC_IS_GCC),y)
> +ifeq ($(call cc-ifversion, -lt, 0501, y), y)
> +# GCC <5.1 emits pre-UAL code and causes assembler warnings, suppress them
> +CFLAGS_ISA +=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
> +endif
> +endif
> +
> # Need -Uarm for gcc < 3.x
> KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
> KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
> --
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists