Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5141763ybv; Mon, 17 Feb 2020 13:12:18 -0800 (PST) X-Google-Smtp-Source: APXvYqya9H7ByoChMGb98glwZoL1WpiNXi1TEYnjVR7q0isli/gnPbgyte11G4tbKCdlKGAXkYtf X-Received: by 2002:a9d:6e8e:: with SMTP id a14mr12812285otr.109.1581973938421; Mon, 17 Feb 2020 13:12:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581973938; cv=none; d=google.com; s=arc-20160816; b=t4Mdo6OisbRGqNdhwiUCYjsxK/3iU19zuZ2KEPDSJ/As7I6gbNBJjngeMSLERaITcn mOypsMsqHqspJ6/MvGBZFZWZ0EsmdkbXu5dLRZY6FpI/jvdH9+8yA+qhBncOZEindodc dJYdAObgiYtkJwXfruMCFmD1ccXtfxOHfWPlLPhInVSCuJIv4SHiE/5YcouTCFbS+Gnc KuRuFjT+YPs8TeW43SbqHnFGozFy1MZFJMdNMiobQTG20l9pyCie8gEtffmH4oNctheI MJxVvNY3fYgSB1IkFnNXRnTw35ZMhbTtbm9Sm8k2iLawxd5oOhMgr7ePPagk18/+GPk3 rm5A== 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=xK3Q/4PcpI8MJ4XOzIXcS+rMbt29+yBpzx5WYzRqjFw=; b=DOOwNqIawMed6ihczXaDemWayfncB/wER/E+L+7FcV4tPw3P8i4nRnCiMpcohpRbXu uhrFXL5dK5eDuw37T+pG5GVY/MC30KjVKMBvk7TW4vUWud0wfnM8mFWvVVQ9Im3OuAJu 9vZrI+a5wCT64PMvXcvMu9V1yEwCYMWKr3quxeVVGkP2Pf9UYszbrVNAmtNkw5ct7AHf Q94hLgskp+itp4p9jhVYVOf9tR3mTH0GJ2sJxLngkLmQPD6KKFoQvZ7iBHIBFRXbAVt0 lM3+F/8ToO/EBwYQVWBubs43N+PpK8oVh8xXLKA35nFoZVFdJyhK0vXJ+oSMlOKhX1+j uJ/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C+Y9J3F7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si716468otn.118.2020.02.17.13.12.06; Mon, 17 Feb 2020 13:12:18 -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=@gmail.com header.s=20161025 header.b=C+Y9J3F7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729913AbgBQVLz (ORCPT + 99 others); Mon, 17 Feb 2020 16:11:55 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:39797 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729894AbgBQVLz (ORCPT ); Mon, 17 Feb 2020 16:11:55 -0500 Received: by mail-oi1-f196.google.com with SMTP id z2so18011728oih.6; Mon, 17 Feb 2020 13:11:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xK3Q/4PcpI8MJ4XOzIXcS+rMbt29+yBpzx5WYzRqjFw=; b=C+Y9J3F7hCeKE2UrdmV5oEk9QN3EPirr6aTHNd7poyqXHlPKK0tSfnv8fze2AX1BY2 TSxFrowQQmKkCsMjI2alVDrL7Z/IicYi+n1DK5INEURwPLEBxOLOFitzwDoYfFqDmk0c z+GjPV3fzt+pBQkgMbaxrRVIvP1cRqs85fTSVT5yf/oWkqaGnCLpZTWNXblvcC5V34fX Lw/xJV+jl/1q8vgoyvZ91EiSlWMWc97IHzVFvgigvOxSUwsZ0h5co2CCnM5/NeaCKhr/ 7xiW9rcrq6IK7yaqbaydtaoyysWcKutcn5Lzudod/ILf45eQCzMykFBSw4l3p+QkCXUZ +WnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xK3Q/4PcpI8MJ4XOzIXcS+rMbt29+yBpzx5WYzRqjFw=; b=gJdIvMu0k9mrRPVc5B5R084n2oxTk9Kq37vaknPSB+TPYplE4nRAhK+nNA8jHvplvr dgZrucF2TeCfmGUxoGHSW2sHXTtt779GPdlcy+2vQa32z7HjHEwwT9i5ZczcYAWfKlOi fPSp/LUznjm8nT5wjMvVfrGmWmeZiZt2TU+wHuJQOzgo09GxgtXkHDpUPYn/vvwWvkOh JX4pY2wBDZXwNPA2P++cxEBKC5oepQRgh3yjlvBcC4IzkBBWIb8G84VzLdRHNqoZrvCE 1XYGmC/m/51UcR9RPDAzcGqyAIe3FrYetSy51osA2rsRtM/hA1MdkNL4SPCr8q5vXNkF giFQ== X-Gm-Message-State: APjAAAVNNp43R5zEb4sqmtZKuSv6/jnRd/Vtv6aQZEDMHelPYunGGnzP WGoZCn2GN6ZFMk95AcWtCjY= X-Received: by 2002:aca:3354:: with SMTP id z81mr602935oiz.129.1581973914489; Mon, 17 Feb 2020 13:11:54 -0800 (PST) Received: from localhost.localdomain ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id v14sm579927oto.16.2020.02.17.13.11.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 13:11:53 -0800 (PST) From: Nathan Chancellor To: Ralf Baechle Cc: Paul Burton , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH] MIPS: vdso: Wrap -mexplicit-relocs in cc-option Date: Mon, 17 Feb 2020 14:11:49 -0700 Message-Id: <20200217211149.44132-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 77374c1f0c77..d7fe8408603e 100644 --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -33,7 +33,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.25.1