Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5907833ybf; Thu, 5 Mar 2020 09:16:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vt8JFaCVHt+6YfjI3z0z0vBMc8hCDF8QF1ekziJBSFZx+uM5HLX5V3c8/fxVyehQLp74VYw X-Received: by 2002:a05:6830:1245:: with SMTP id s5mr4021874otp.43.1583428564870; Thu, 05 Mar 2020 09:16:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583428564; cv=none; d=google.com; s=arc-20160816; b=Le+aqC7W4lSjIP0Qfrv1cfDcugVS2z0Ei98v1KJYdrXtp/Ac+U9Fzx524M7yVc2/g6 13atLe2N8ZZJaHOiUMA1HlPGrA3WeVEwyWGMsNovFEqpZ4ibEwmvOGI0VOvoX5THQe9X QTrGDI0EUMOjPcBvNz+o09wJKDQiKmGX1GIKRxB9greEsVCFVlh7FY1euIjO0tqDBaGj SXN5fxWSCZpFr9KMN1isPY1+l78K+hvtNiPGTm5L2FpBQftZItCEV8Mz2FfbW/awQ7gM Zq4bWjOvqn2TL66OhZxxz+xzoapTHbymsODrcf2Ombdk//TQkdCFjkoZtfVLvuc6HgOb pK2Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BWcupW7xgCbv/dbP7KL2Mg/5Ir6XcpddHRhwEX9trIw=; b=kiBvBtLNnnUeMfz9BBFB4Il7vPxcqE2+cf9EW/IhamOGdRzGP9wJtwnqDP24xrEQkz +7d4YYGEFMcA9U+EaYpRhxenIwqlvI3SuDTvhT8fV8i/7RW68VqrphvkS5fpH9zvmvDp KBwR+q4xnnSGcco5ZqTrFynBwOGWCH0ejAlqaG6HcYenv9SbhUWbk++utVD4lhtqa1Lb HxsXd104ZSiHi5FfUoctxSNxbLXdfD1u/82GyfzFoVKJDKWHH+6y1Y7f4X7BiIpV6CuI h1zx6s2SxpGznGP1HvO0kpvo+vTqi/+p0pnRC182WwuctpNAlZutdbDAWZTPbBxSpJAV uNaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lXi2eyLm; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e81si3453683ote.13.2020.03.05.09.15.52; Thu, 05 Mar 2020 09:16:04 -0800 (PST) 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=@kernel.org header.s=default header.b=lXi2eyLm; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727919AbgCERPC (ORCPT + 99 others); Thu, 5 Mar 2020 12:15:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:41042 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727764AbgCEROm (ORCPT ); Thu, 5 Mar 2020 12:14:42 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC84C24654; Thu, 5 Mar 2020 17:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583428481; bh=9g2gIbbLljcopMLsa1wpkRfrnY5cLA9djOVfX6VbqYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lXi2eyLm8+51IMgjiFx9RjLWEwcP3KlcOJkkVTzsSLnACEh2rxQjsZ/p4Bj2NLy5g l7UxP+LYSQOjQkU+sJp24H1hU7ObcN3+ajn/J0IaMgZor7sEzwBrOdkiYottghIJkc nmsg2XM0kTgAMueqs+aWUaSkJUT5Ct5683Uy9tMQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , Nick Desaulniers , Paul Burton , Ralf Baechle , linux-mips@vger.kernel.org, clang-built-linux@googlegroups.com, Sasha Levin Subject: [PATCH AUTOSEL 5.4 17/58] MIPS: vdso: Wrap -mexplicit-relocs in cc-option Date: Thu, 5 Mar 2020 12:13:38 -0500 Message-Id: <20200305171420.29595-17-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200305171420.29595-1-sashal@kernel.org> References: <20200305171420.29595-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit 72cf3b3df423c1bbd8fa1056fed009d3a260f8a9 ] Clang does not support this option and errors out: clang-11: error: unknown argument: '-mexplicit-relocs' Clang does not appear to need this flag like GCC does because the jalr check that was added in commit 976c23af3ee5 ("mips: vdso: add build time check that no 'jalr t9' calls left") passes just fine with $ make ARCH=mips CC=clang CROSS_COMPILE=mipsel-linux-gnu- malta_defconfig arch/mips/vdso/ even before commit d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in vdso code"). -mrelax-pic-calls has been supported since clang 9, which is the earliest version that could build a working MIPS kernel, and it is the default for clang so just leave it be. Fixes: d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in vdso code") Link: https://github.com/ClangBuiltLinux/linux/issues/890 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: clang-built-linux@googlegroups.com Signed-off-by: Sasha Levin --- arch/mips/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile index 08c835d48520b..3dcfdee678fb9 100644 --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -29,7 +29,7 @@ endif cflags-vdso := $(ccflags-vdso) \ $(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \ -O3 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \ - -mrelax-pic-calls -mexplicit-relocs \ + -mrelax-pic-calls $(call cc-option, -mexplicit-relocs) \ -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ $(call cc-option, -fno-asynchronous-unwind-tables) \ $(call cc-option, -fno-stack-protector) -- 2.20.1