Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5120279imm; Tue, 21 Aug 2018 06:39:04 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxX9bppVdIB20dN2T92qJHCxYD46qEBdIayQitlwSPlSZSnVfreeOS1no1bOOOiXbOvS5kJ X-Received: by 2002:a63:1e08:: with SMTP id e8-v6mr46765374pge.281.1534858744121; Tue, 21 Aug 2018 06:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534858744; cv=none; d=google.com; s=arc-20160816; b=ovrRTzkSQKQ7psIGqsfK0nh0Jhj2uLvyv3XJcmzuA+3Tq0xxHIqNOYtGi6A0Fz7gss FYW2favjOKe3MPU3w6/tUPa11iSzPuxeW9NdtlrqtPXdPjgDCp2hhXA2CYBE1dcF0Dqx 5JP+m/Lrsh903hQml1xf1n4zUtm7R7175N+iwJiUR+uJ9Q6yQ2mYxr/+dtBxfYlokHL2 u4iYKjxIxLutc0Bs3ARX9JrZbcil7Cz1mSBdVh/Y/Cod01IAsmxGkPUMSeBKV+HG+HyD LwKQSGc/EYiD1uUbS/8GeTX6/eKx9rDWzpx4ZnzTEJkJx6BoOsxC03bwdlNR6gdfdseG vtWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=owYj+wA6q6BW0VEPf/GnEXcBMz3KtF7dsCOFP2/Hm2Q=; b=onj5xGz59f/v3ONehlEoyt3CvvvLsu6HxsioPXEoW88622ZgFgazAU8XG5cKbdjbjY S2arX2K7wPRR1ELOrWHl9u/Ki/8MkH4/FgDIEzQX5mVinzo3RZthD2rN8X75tVDNmt6H eV6EvTHG/VC1mCbAM9xUueTwS2QOwwtKG9rz0lcctnAAW+JepRAlUOaMoGp4RVFBLNfd NBADPm0Do8N4M/jCxOX+E1SYpwEih8YItYs3ORCvsPgdt1CogLaGJfRShBtZ678ePiOG 5uUgoBmLGKy8s1SoBQrsmHk2N+F3dZU2GQIlrJ07NBvQ9z/sqQ9K1vrvmq7dJ3NtYtlx 5GcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QUBHFbXK; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t30-v6si8821566pgm.66.2018.08.21.06.38.49; Tue, 21 Aug 2018 06:39:04 -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=@linaro.org header.s=google header.b=QUBHFbXK; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727433AbeHUQzF (ORCPT + 99 others); Tue, 21 Aug 2018 12:55:05 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:36855 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727148AbeHUQzF (ORCPT ); Tue, 21 Aug 2018 12:55:05 -0400 Received: by mail-io0-f195.google.com with SMTP id m4-v6so15397294iop.3 for ; Tue, 21 Aug 2018 06:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=owYj+wA6q6BW0VEPf/GnEXcBMz3KtF7dsCOFP2/Hm2Q=; b=QUBHFbXKSpna98TR9hyEoqh5MpJNdmKKNPyIF8K2fdKOxsjs8W7XuO16iAsVOs+ZF9 nrFSfQ1Dommph53NdMVr8SmLeuj1GENc5QlPsPP3F7JJvee6KZEz/ZxtPKhMP+Ga8xfj oQ/XewBnmxhDz7AI9/S/MyXRHVAc2FxKKAg0E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=owYj+wA6q6BW0VEPf/GnEXcBMz3KtF7dsCOFP2/Hm2Q=; b=UHXEBXYUZALI1O7UrwBCJIyhrPCbD3C6X7792fOWWWRutV5WYV7EPPr+qkQpaU9V4q 2aqQA7X09RUR9mcmmWQ6Ad9Mp2nxnDaDpFRsdtOki+0p0xottnAV7HYB7lAi0L7uT5n/ ARpbpuBIIb3N+dXBI2HLdi493ruwt7atfhKP2I557Xleh05Yvx6J934OkVeuPiySalnM 3p2YmbFUf5ZQi+x/IhTaIGGU/qmjz6Q0rwdTPECSSyKKg/kOIgSYcoqywSd20Z0gvW7X hAjEgoEmku9NwfQxJxe6zuRTIG7iSgK15QHICDDiBtcDfwA1iJhY5UTPGISDV3NJFWYV aGkg== X-Gm-Message-State: APzg51CW62Hk/TMUcGocT9aezPwmTBjxqGFtel24trqnXDUaul/X7grF edOfc6ZOdbDhKSbnkOSiAOgoPooJU/YPiShwsryYrA== X-Received: by 2002:a6b:450f:: with SMTP id s15-v6mr6346041ioa.60.1534858494229; Tue, 21 Aug 2018 06:34:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:ac05:0:0:0:0:0 with HTTP; Tue, 21 Aug 2018 06:34:53 -0700 (PDT) In-Reply-To: <32f5ce9b26a386e81857afcd7d135bad@agner.ch> References: <20180809164042.210675-1-astrachan@google.com> <32f5ce9b26a386e81857afcd7d135bad@agner.ch> From: Ard Biesheuvel Date: Tue, 21 Aug 2018 15:34:53 +0200 Message-ID: Subject: Re: [PATCH] efi/libstub: arm: support building with clang To: Stefan Agner Cc: Alistair Strachan , Linux Kernel Mailing List , Will Deacon , Greg Kroah-Hartman , Russell King , linux-efi , linux-arm-kernel 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 On 11 August 2018 at 10:49, Stefan Agner wrote: > On 09.08.2018 18:40, Alistair Strachan wrote: >> 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"). > > Looks good to me: > > Reviewed-by: Stefan Agner > Thanks. I will queue this after the merge window closes >> >> 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