Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2631354ybb; Mon, 30 Mar 2020 09:49:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtT1o6h4/acp22qOzUGu71W0B7iuYXSt+LCTxYaWx63LRF05xuXp0viCYRPF7eO8Ia2Bmww X-Received: by 2002:aca:3b85:: with SMTP id i127mr136872oia.123.1585586974054; Mon, 30 Mar 2020 09:49:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585586974; cv=none; d=google.com; s=arc-20160816; b=TAUTWm/qNMtTDo2xk2tlV8yhT9PWVQGPKhQ6RHdn/7GNpT1PeTGDlKCLdnnUc7JxGp DXg98L+ZRAszIggTj0joHWMRKttmUEqAtPpHy4J58QnRk/EJyJjbWov3BhFzLzk/rE8s hvf1p1o9dwaA3MuDc/mAN/XEI9ezvOOR/0OSst5N2hpt+b/146vZqdunl0EzyF5I3ZMd ee36VoSodfwyARg5n3Cl7ooIqhETXnQr15zDCAXR3Nn/DV45bFtEKfTQuL5rBvsI/YBG EhI5gYMVmkc1lXC/Hk3IzXu9B+6YqF6FUiAnfqKfFk0zXSxOrJq3eqVN1jKwNGH9wcg9 eF9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xILmCXBrlxgCXlypA1VxqpUiVu1uQ5MP80zGKCZ/XFo=; b=WAE2KtNoeyHHssLsG5z1Iqquuf+kqq1L6OhfbuswTNNF0chP47DZOocFGkFyUnLhJZ weFK8n9q4ufOBNpQwkGtNbFu6SHnz78DyZYMHhmxnqWVKkrh1CFWCUFSUvTRGVyMn2b6 fn/mlRGwFsR4fqpboW+8ez1VLCllTc+yOjTwAIsz7WADjMfp1sYjj8XQVsTI6B57L9zn vrKh3smO5AQCwVYv4Pop35pm4IMiy4An7vTBzRPAm0SA4Y98B21JV6m7A+sP2dIZYXbI p9DeIAwx0eWSmOUcnZ9VAGYun4kWHjyfKr/1jUGY2qiEISEyfVTuuAHPPDUthaSBtcAy uSpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=EfJ05alJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z22si6466902oto.237.2020.03.30.09.49.19; Mon, 30 Mar 2020 09:49:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=EfJ05alJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728428AbgC3QsV (ORCPT + 99 others); Mon, 30 Mar 2020 12:48:21 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:38870 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbgC3QsU (ORCPT ); Mon, 30 Mar 2020 12:48:20 -0400 Received: by mail-pg1-f196.google.com with SMTP id x7so8925472pgh.5 for ; Mon, 30 Mar 2020 09:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xILmCXBrlxgCXlypA1VxqpUiVu1uQ5MP80zGKCZ/XFo=; b=EfJ05alJ+PSOBVvnx/SndsN/62Lik+lUYdgqoSbZm1dfE4FuIESt6rxZHaxGXjH/U9 +d4l7cVHmOjuD4J1o3mjDNAKHB3ToTh41KtnFF37XPu06WUI/Iw83xS3w5cJeXenY3rX uS/72YpxbbrJB/T9eo4LEZm4ebLSiI47xcAogZpS8iufGqlLGddOUHPq9l5Cs09jWxQW S4g8U4KV5y0IdNUvJGwaAbWKRJSI34pQFZAVT7EVrdzNEIrphgEGVmcuLw+mgdje+B20 V37vak2nUZbO8RraT8fSZtYeItV70ljo0es3rOjE085Mu4d6l2aYmA58ScNmr5odYjbP foxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xILmCXBrlxgCXlypA1VxqpUiVu1uQ5MP80zGKCZ/XFo=; b=m3BEI9Lo4uQgi7SBEWADG2bSNziebNjWb6V5b+ospYqdGKMC+0UmL7tkeWu1gABrQb nJUuE5MapUlG8/5Ale9YrAHqA1OG+1C66PkRHMsJ27zviUWjhleO1/9L4QH0tgyESXmH TpC8s3sdwoWsKJuwm3r+I/xREvk7tX3dOry958W1x8Jdo9360o8LUmO5q0WX+DCwXfNF l4lim7YOcOGbh5XQ5zLKwHzCl6S0rXQTqs8fbfhbf3uUF++l8h7irAgqnkDSZRPvsZy5 3Jhnv9lB9kPuh0al6BAg9CgPf6QGGyP8mI1jmzFrXetbICsufP/cXz9aclt/QW6hm8VA b1qg== X-Gm-Message-State: ANhLgQ2Ph+EaHCKrIHfYu+Z6QXczTQkvCZVePTLLwza5ySGiWIg4xDua q8lpo0R/BA+ZIPFxyHjLk+dG+3Zdppw8wKZSBvbjGQ== X-Received: by 2002:a63:4e22:: with SMTP id c34mr13917544pgb.263.1585586898655; Mon, 30 Mar 2020 09:48:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nick Desaulniers Date: Mon, 30 Mar 2020 09:48:07 -0700 Message-ID: Subject: Re: [PATCH v2] ARM: warn if pre-UAL assembler syntax is used To: Stefan Agner Cc: Russell King , Arnd Bergmann , Ard Biesheuvel , Robin Murphy , Masahiro Yamada , Manoj Gupta , Jian Cai , Linux ARM , LKML , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 29, 2020 at 11:43 AM Stefan Agner wrote: > > Remove the -mno-warn-deprecated assembler flag to make sure the GNU > assembler warns in case non-unified syntax is used. > > 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,' > > GCC before 5.1 emits pre-UAL assembler. This can lead to warnings if > inline assembler explicitly switches to unified syntax by using the > ".syntax unified" directive (e.g. arch/arm/include/asm/unified.h). > Hence keep the flag for GCC versions before 5.1. > > This is a second attempt of commit e8c24bbda7d5 ("ARM: 8846/1: warn if > divided syntax assembler is used") which has subsequently been reverted > with commit b752bb405a13 ("Revert "ARM: 8846/1: warn if divided syntax > assembler is used""). > > Signed-off-by: Stefan Agner Thanks for the added context. Reviewed-by: Nick Desaulniers > --- > Changes in v2: > - Reference revert commit b752bb405a13 ("Revert "ARM: 8846/1: warn if > divided syntax assembler is used"") > - Reword commit message > > arch/arm/Makefile | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile > index 1fc32b611f8a..b37bb985a3c2 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) > - > 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 > -- > 2.25.1 > -- Thanks, ~Nick Desaulniers