Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2253211imm; Thu, 9 Aug 2018 09:42:33 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyLxZ55hA+7a5yuLVZ/ZzOVgYO7MjLt277zL8Iyt0aYTFbRcD6y2G1rFxRVJ6CtPgOnqd50 X-Received: by 2002:a65:52cc:: with SMTP id z12-v6mr2895888pgp.69.1533832953064; Thu, 09 Aug 2018 09:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533832953; cv=none; d=google.com; s=arc-20160816; b=E4kmrBPEOYcjtUYffmMF0YGN8EQS8VopDVKyeUbNOjoeNHEQ3DXiwcefb5Y9FF5ub2 ABNt26+jVldu2e8J9/jE4bdT+FOutzDDfhhLUpBcLvd9/6Jn6ZxLhm0KSMIKyjyqfdzB jl/WmccjJ8jZENmxjkhoFWsjoYsQk380OENHsNTLcrQpxjvNqN24TakPKNi17Ehag2k9 xAsrzm0qmKNd+4fnz6bZkovzMXF+X18uyNzMNmaCWHMQaVai29cEBATQHY9s6YlhmsGE S54ugR2TzERL4/VLYH5wrss4PIvtGEBjFk738534/tx+vziq+3WOS4F3kuH69pJef8ai vcLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature:arc-authentication-results; bh=TjA5wnEFuRDk/CXAWSG8FBrlJT0B776bpMTiXw/12KI=; b=bmRUmjDZcTfw//cqJn2hyrcXxmL0X649mBdC7r5sNCXhx4UsOoTjTByDM3szG6i0Jw WlIzfcaKIPtwRMnz4oPfygdkBMJjlp1UpYNS1vYCM1vR6P0l1Wa8JcaTRTnWerIpkxOg 52CD8wMqoBjGCCie6AljEaOwtNPNGbMKPc3I+/II7WRnUUPEPzZLPPrdGtK/FuurR/QG x6ncsJM47Xr+prp7XpKVsK8lOjFJ39KKijDkMGDC+YatJBeY9NaADRHPm/2wwNT5epYN LKZTfmrd0bdSvjVVRHdJNKP4CvqElxQBqru4zzjGSxba8rGiww/l4V61KMyTBLlt01tY rYcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=k+lSTCXy; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6-v6si8191184pfu.143.2018.08.09.09.42.18; Thu, 09 Aug 2018 09:42:33 -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=@google.com header.s=20161025 header.b=k+lSTCXy; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732530AbeHITGc (ORCPT + 99 others); Thu, 9 Aug 2018 15:06:32 -0400 Received: from mail-qk0-f201.google.com ([209.85.220.201]:34159 "EHLO mail-qk0-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732384AbeHITGc (ORCPT ); Thu, 9 Aug 2018 15:06:32 -0400 Received: by mail-qk0-f201.google.com with SMTP id y130-v6so6337597qka.1 for ; Thu, 09 Aug 2018 09:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=TjA5wnEFuRDk/CXAWSG8FBrlJT0B776bpMTiXw/12KI=; b=k+lSTCXy/3lN31gyL+j1l5uBeUGDwrVfUENi8nmOITfzYrjgK/JOzdiOPxk0fe1vnc w0lFu2wtW2u1SJRfuoz29CnuA0ula/mk480UHMyqX+O/ja9V0gdEYtXvZ13Wc9YDz+HI Cp6sKgLxcAGrWO7itByv3UJ8Sk+LGXh0c+HLDbxbzf0suBgGW+A4gqVkUvgKe4zOHeTZ F+0JiwuX0SKUrxSCnzrCR0CqdMClyufeykqmAbx4o8O3KNkGOibjAzSFb78WEjQs2Hc8 zZzsxh1SHuqbToQ+Ghx+QJ5iQ8hx/XdfC2p7VW39v5yJJnSq+/rlUYEcKw1P2+XZQZ2E lQoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=TjA5wnEFuRDk/CXAWSG8FBrlJT0B776bpMTiXw/12KI=; b=IahHRTSs5M6/3yONqvTamuyn/CC7G3jDI3+y8bSF0EEZ58bs3LRUh8xSOIBCNepRah 7Z4DX0e9TOZKNpzaWUOImyNCSq30wIRj31y65O+ILnE0QcOTcDRzvrbkdZRf10kAbH06 Igke/6oong3Dik5LYc6FPa4+a5lJh/EMMfhZT/4zNPVXaBTLMJmiH3PXczgDyFlaBUee /VS08RtfqjJeTEWTLDx3MdOs0E5lx+gF35xx9KM2j7l02rd7xi6VHK3WRpcLQpLw1/XU OYwcdSPjpz/kmmdYkmRnfLSlWquJA5LBB46Xl/AumRQfsMTBtXDLsV4rmh5S48t2FWuc cr1A== X-Gm-Message-State: AOUpUlEzrjCdWktUq71YuX4njKN68HFndcyLAZH0z4LsKhvZq0uYmL6A ZbaaKWD+7HYico+f8n1GiJclaSTVwYqwg5Xwh/tbIcL15+lRzl/mYDT8+BkSFyx5USvSP4rpK8j hWTb2ME02/PU/lQH718lhfN6F6HawVHJTW0Mfr9ALKD9Tzqr6MBFoX0MZsGMnSjHuyRQJbLaraG 18EA== X-Received: by 2002:a0c:c306:: with SMTP id f6-v6mr1426877qvi.14.1533832850183; Thu, 09 Aug 2018 09:40:50 -0700 (PDT) Date: Thu, 9 Aug 2018 09:40:42 -0700 Message-Id: <20180809164042.210675-1-astrachan@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.18.0.597.ga71716f1ad-goog Subject: [PATCH] efi/libstub: arm: support building with clang From: Alistair Strachan To: linux-kernel@vger.kernel.org Cc: Stefan Agner , Ard Biesheuvel , Will Deacon , Greg Kroah-Hartman , Russell King , linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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"). Cc: Stefan Agner Cc: Ard Biesheuvel Cc: Will Deacon Cc: Greg Kroah-Hartman Cc: Russell King Cc: linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Alistair Strachan --- drivers/firmware/efi/libstub/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index a34e9290a699..91339d13f2a1 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -13,7 +13,8 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -O2 \ cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) -fpie 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 -- 2.18.0.597.ga71716f1ad-goog