Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1722450ybb; Sun, 29 Mar 2020 11:44:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv820ukRr9ag0sfqXwfwef+5WbCsJlIWQDlVtoGXdOk2gmjpARNHf6u5XGNAFFRG+kAq/wO X-Received: by 2002:aca:37c3:: with SMTP id e186mr5626445oia.155.1585507474384; Sun, 29 Mar 2020 11:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585507474; cv=none; d=google.com; s=arc-20160816; b=H8EK9J9sIPZtDBbpHDgpI5edIly4SLQKmtDTUmZSZFiHFBiI+I30Ry1C0D3lBr8NEe AjS6HVFzgEy1zpjryzZb8r0+YPfU3JRwspNJOrNK+b8zvalyi+dZpGlS7njHvdr2o6Iu 3/jfyTpO6jMbh16bRklcJVCIxc3A374jXkXQWOXZxADBaWFzY/kEaYN7ZJjSrZoZW/i8 vg8AgF5pfuDHKyr05WfeuGZjRKulRDYXH9qQbq1Qific7wCnMMJ1JHNtdsasrsO9hR8+ 289Ik35vZnM9+gASKUbX4hwuYIjQkTGO12FZy9Z6qie5brpAweYIIUcwPc3/zio7OUtx g4jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lnu+KMdllhKFSlzHplG4kJn5iW0F84lGeX1xzZIYAts=; b=NnhqMKl5wzxQuSwVQlMpVTU2DUhyZki9ctFbJC/xgOXTxQUNvAXiLr2n2imYeALDxA my65usjKd0vY1Awbu1PS1H5Nt8WK+Ht8C8WngfhGvQLhc8pp6h31BZWicdaaaqN1uAwn nwe843T+sbEAbmk4leyXP6uyLSXL3VawnrXwdAhnsNi/eVeyiXSf84Kl6RG1PzT6jWsP /Ixw8TyTCCj2DJ5t/Bl4s2eAWML51iV8VTGQmPlxVHldXTrpvLHm8j17JmOxeUjnfXhN J4uPm5+kUTzlyKPRUhxzNaFYrNy1aQQ1kVfBjvZDL6D3FDSHib+HSZJ7g8dhmfmdXgMA MJ3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=foiZtoQO; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t12si5375227oth.0.2020.03.29.11.44.22; Sun, 29 Mar 2020 11:44: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=@agner.ch header.s=dkim header.b=foiZtoQO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728451AbgC2SnK (ORCPT + 99 others); Sun, 29 Mar 2020 14:43:10 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:34786 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727606AbgC2SnK (ORCPT ); Sun, 29 Mar 2020 14:43:10 -0400 Received: from zyt.lan (unknown [IPv6:2a02:169:3df5::564]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 3EF795C0870; Sun, 29 Mar 2020 20:43:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1585507388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=lnu+KMdllhKFSlzHplG4kJn5iW0F84lGeX1xzZIYAts=; b=foiZtoQOanmpdsMLM7SK+Zq7g/PZANc15HdoUTRqh11ZXs6xG/hcNgTzKX9K3M3dzSQl+B E0s3+n6Y6SAAYDbC7tfRDGKSsqrApx10VlZuX4uqzEm8WNv4VqtqZg0ZcwHiKOqCWC9+Q+ BGbSPocVZYMxBX8j6qjL6Jd9Be7VxT8= From: Stefan Agner To: linux@armlinux.org.uk Cc: arnd@arndb.de, ard.biesheuvel@linaro.org, robin.murphy@arm.com, yamada.masahiro@socionext.com, ndesaulniers@google.com, manojgupta@google.com, jiancai@google.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Stefan Agner Subject: [PATCH v2] ARM: warn if pre-UAL assembler syntax is used Date: Sun, 29 Mar 2020 20:43:04 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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