From patchwork Fri Feb 28 00:19:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 11411187 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E71C114BC for ; Fri, 28 Feb 2020 00:19:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C4E28246A6 for ; Fri, 28 Feb 2020 00:19:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L06qgsOM"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=agner.ch header.i=@agner.ch header.b="aTYpnGkw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4E28246A6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=agner.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Q9uG1RfLcmwvGX+zHyITuRP0Vx6uY5+eR/qYLRq/llE=; b=L06qgsOML7Kms4 rNmp5lOdT1m1WNonDSle4Y/fHNIvSdmD8JOJIABE9Ghm8q94YOz8vXxxmA8SrtS+b/QEjpM4t3o1D dFWi1Bz7ZiP2vPPMkBe74/cVw+YSCEw+GmPS23IfMpW+lJEI9N1ZcC51m3TBmJZs157Q/wZte2lPa RACsmBUbkXjI58zse5i4rL4TWfzLRe3mXBG27LI8iriHHCoyvhYaOm4jKWHGcWeSMqS8MMQk7uN+7 So3ZQB/QjcXC8pDgX2cF3jkqH1O4jIBH64MsPFpLxNY345JRsUdtvZGeOmFr0JX+4mg7EccoETnNc j50S1GaP2MOTc4MwC4fw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7TNX-0007QS-DJ; Fri, 28 Feb 2020 00:19:43 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7TNU-0007PO-Bk for linux-arm-kernel@lists.infradead.org; Fri, 28 Feb 2020 00:19:42 +0000 Received: from zyt.lan (unknown [IPv6:2a02:169:3df5::564]) by mail.kmu-office.ch (Postfix) with ESMTPSA id DA5AB5C0103; Fri, 28 Feb 2020 01:19:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1582849170; 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=TIjae1yYHkhLUHlgAhQROPT7jyNpin+f5lZbY7zzkps=; b=aTYpnGkw3RWTSB31SifTZL0yjsMbDJz69Z0gy8uGkXyuSWk6m/KKz7XX5WmjZXgckfOZ3M qIfbPbE+1/RTZLIaVEfUpJjmSnl73LlsKSG/up6bKoNJ6bIsy76oDV/pLXp/hZbQhPn/QZ OPQzYoE5HuJItobQd5M3WVtI/aC/aIA= From: Stefan Agner To: linux@armlinux.org.uk Subject: [PATCH] ARM: warn if pre-UAL assembler syntax is used Date: Fri, 28 Feb 2020 01:19:22 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200227_161940_552091_028AF839 X-CRM114-Status: GOOD ( 10.64 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd@arndb.de, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, Stefan Agner , jiancai@google.com, yamada.masahiro@socionext.com, manojgupta@google.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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. 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"). Signed-off-by: Stefan Agner --- 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) - 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