From patchwork Thu Sep 27 08:50:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 147686 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1726253lji; Thu, 27 Sep 2018 01:51:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV62VLRHZmWJk6xIsJkoXgmSAbqJeIkrP+7bhh98AtmKuZFOgXRwl5lvo1EOQmoyDHau8768O X-Received: by 2002:a17:902:28a4:: with SMTP id f33-v6mr9812700plb.297.1538038265410; Thu, 27 Sep 2018 01:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538038265; cv=none; d=google.com; s=arc-20160816; b=0uftYjvRmPhfIFVpNWiKC/FjanWRfg89emFa+kMgkp49YwRcLXPUh8ViORdKKBiStT ulF7AInIFF+pqrGNjDAKIq+zYmxyzoLAemlQNf2X1f/3Q660E6LOUGMTjH8WGCFtokmL YBWZlGKnaT4lObd++nQctAMUECyMugeavgJWgKxxirryZFJWcQyilLJRsYzgn5AGOACQ oQqbitEiu9I1oEMzBd37E0xEdacvFVR04GUvMUPD2+Pe1EzZgtvKomALz7UF0nSlt5eR 6QSQPU/EnlCzFmJG05cJ9oHJ4isKKXzyL2JIoxlc+nGc1vaqXEm+li3QqlhdNGs9vII7 Y66w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=VxRTYSwbB2m9KxrX9xxpY79O1ZkMCQToVtuc67/7tNk=; b=KJj9WZRgiyAID9OHb5W8gISHkgvcDQEAkOmKZFscwIqL9NsXRui6oCe2LVJ3UJDhs9 SwT/8qFKY8cUQvMCiftZd30GqGHT1H4TWws1XjaFfEM9txU5jwrYAmI5p+tY3RELZGY1 kKYOE1juoGvCXY4KYzTUbCeK1gpUGsOd69wCawpVuQmoJp/lr1v/8FNqWvknAt0gTMTt oo44ElFpZ43ki0BuK39DLnVTpFREAeOg+mUVHBiRVjvQ1vDpq5YK9bswQW3wTxMlaHR3 qUN31PtTtW7fA3NQFRrGzQWA7WAuE1krFpWObHhbAx9seqnbjhq+HoVGTT/00d9jcpDM myew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MvJ+Bt0I; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9-v6si1608734pfg.46.2018.09.27.01.51.05; Thu, 27 Sep 2018 01:51:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-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=@linaro.org header.s=google header.b=MvJ+Bt0I; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727343AbeI0PIN (ORCPT + 3 others); Thu, 27 Sep 2018 11:08:13 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:52007 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727255AbeI0PIM (ORCPT ); Thu, 27 Sep 2018 11:08:12 -0400 Received: by mail-wm1-f66.google.com with SMTP id y25-v6so5009664wmi.1 for ; Thu, 27 Sep 2018 01:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VxRTYSwbB2m9KxrX9xxpY79O1ZkMCQToVtuc67/7tNk=; b=MvJ+Bt0IuUYpPBLf2pOUOmlZ0MQuENxD1uRruMePcdsJmL8hGYmL6UneFZ/CsBNYVh NYde3rKDpTTKsXN0rDQwX77izbJfu87TsLs0/bivhuzH+Ob5J3hJRRGw3Mh6nLKfeVxp YtW7B/XsTPc/BGZ7Xey9v5ZvZgSawN3GWVH/4= 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:in-reply-to :references; bh=VxRTYSwbB2m9KxrX9xxpY79O1ZkMCQToVtuc67/7tNk=; b=D/7Ts5JZ5lxrScTRU3v3JnDOND7MGiOkdB4TEAWHDHuOh5Jzjnntt+lakdK4U4QYDW ZTelylld/a7hpC+NLQSPqoHJb5KGJAYG5dYpnZFdBawC29A+5yksiBCa4cwrfoFZQWOf cNdPaQw3jsHSWT7KZ86Sm2BcU1Yj5LgjWFbYKS70KkxUjur+rSeKZqNDYYAvTNtKnein ecSZT78pYfh5UGt3EZzg5ZJ6vHfw1AdGMuPvp9fAPxfW+bTwvA2GJonl+pnzI/qAxilE 3xRcz1dllO0zqcH3h0Yq/CauCDrJWygEtwJBRyIBer20RZj6bVGkNleokK1/yZ1umDmP 5Mxw== X-Gm-Message-State: ABuFfojVBnIvO3H4StPA59+1FujtVlsr8chXRHzpBdWwBEQogYewZkkM VSGRfYB0rjDRy+qAAMzsQ8mZ4Q== X-Received: by 2002:a1c:5505:: with SMTP id j5-v6mr1031824wmb.146.1538038261852; Thu, 27 Sep 2018 01:51:01 -0700 (PDT) Received: from rev03.home ([2a01:cb1d:112:6f00:546e:3c44:5966:2f5e]) by smtp.gmail.com with ESMTPSA id p11-v6sm1304055wrd.74.2018.09.27.01.51.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 01:51:01 -0700 (PDT) From: Ard Biesheuvel To: linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-efi@vger.kernel.org, Aaron Ma , Alistair Strachan , Ben Hutchings , Bhupesh Sharma , Hans de Goede , Ivan Hu , Jeremy Linton , Marc Zyngier , Matt Fleming , Peter Robinson , Sai Praneeth Prakhya , Sebastian Andrzej Siewior , Stefan Agner Subject: [PATCH 04/11] efi/libstub: arm: support building with clang Date: Thu, 27 Sep 2018 10:50:31 +0200 Message-Id: <20180927085039.8391-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180927085039.8391-1-ard.biesheuvel@linaro.org> References: <20180927085039.8391-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org From: Alistair Strachan When building with CONFIG_EFI and CONFIG_EFI_STUB on ARM, the libstub Makefile would use -mno-single-pic-base without checking it was supported by the compiler. As the ARM (32-bit) clang backend does not support this flag, the build would fail. This changes the Makefile to check the compiler's support for -mno-single-pic-base before using it, similar to c1c386681bd7 ("ARM: 8767/1: add support for building ARM kernel with clang"). Signed-off-by: Alistair Strachan Reviewed-by: Stefan Agner Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.18.0 diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index 14c40a7750d1..c51627660dbb 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -16,7 +16,8 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -O2 \ cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) -fpie \ $(DISABLE_STACKLEAK_PLUGIN) cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) \ - -fno-builtin -fpic -mno-single-pic-base + -fno-builtin -fpic \ + $(call cc-option,-mno-single-pic-base) cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt