Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8112107imu; Tue, 4 Dec 2018 03:12:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/WQSM2C0zxoAuq7KqXnK4FriNSbtgWmnv35wUCbRHMIUugZrwPF7CqV1j92cT/E2hzB2WFc X-Received: by 2002:aa7:868f:: with SMTP id d15mr19303739pfo.225.1543921948883; Tue, 04 Dec 2018 03:12:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543921948; cv=none; d=google.com; s=arc-20160816; b=YW4H9dsUMC20y86ZMx040NvE2qjvDxOGADNS455IffsbdBi1AXeBeWhVBeirZUkAwQ VRSVTOmUfGmku30uWimmUg3G0sO/0yxQLiy3sV0uPy1nfOlpmsHhRvrk8hUsXs+gORyr tT8ZBVWbx7t866AAtZH2YdxqeKb+cEcTDIyRmvcT5JYJ28jeaL5F0pN7xnAn5IGO6jJJ YCFZzvkcgUsfRe7FKSBCxDL7E3oOEa87TTCqI5hfwT39twbRjrHdEIGLvwEJ6okGVK8b HOpdH8z4iWqeqY5h1b2LHoUXYfcbLV2BedhaJp0xKu09edqLhol2vvM2oPn+CXuAiAyJ rfbQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2fZJZtcOjBhsZmC9xY6vMbu1Ln5CQZcY04ICKD37RbY=; b=PqO+zhqfdu7wNunzgpr2ZKXcoOS7JEsyW/FyheNpJyU1Beepi56Rgdlw7indW9K9pz O2mAgK9sG7zvMIwcuig5ZrblVxLA8/cBVYi4CEhbN3dv49RIbRcNVQ9kkpMMOvm7v8X2 srOZGuH35kHvOX75Z4S54zsGxGsmaU1t6+FoD2ZpCKGuzHtyWpSuBsDG+Q7Y8QT+G5e7 lmx1qp1Ng7RG1OF4HWKYsSdZl2Oy1G7x1SghTPcA0MMoYAkCtKd7LXcDBwWb2YXUt64+ rf42axMzpWryOVCEqvgMtZm7Kh/jnb1aXdkS5A6xJkMqzMBa9rnEYD3vo6JyCwVG+Gyg RrHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IkaHll6f; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si15355053pgh.172.2018.12.04.03.12.13; Tue, 04 Dec 2018 03:12:28 -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=IkaHll6f; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728178AbeLDLK1 (ORCPT + 99 others); Tue, 4 Dec 2018 06:10:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:59440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727774AbeLDLJd (ORCPT ); Tue, 4 Dec 2018 06:09:33 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E7C1C2146D; Tue, 4 Dec 2018 11:09:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543921772; bh=GYj5TomYszyqPvo9DjJKUhHthdEskvscHjAC0/27suo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IkaHll6f/Hw9R4IInaML7uPSN5gQZfUljPAtU4Kc6CB0l0XpAHNIM4nNvjLAM1Bpk Ek7iuHZkwwIk3kAuZdQKoQkoq7Hb+uLfzjAMZppe48ZJfW67XjVyLALP25AoF+wHU3 iixFcRjYcaR97if6jLFr3zu4ic1/+6JNhNrmtOhY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alistair Strachan , Stefan Agner , Ard Biesheuvel , Nick Desaulniers Subject: [PATCH 4.9 43/50] efi/libstub: arm: support building with clang Date: Tue, 4 Dec 2018 11:50:38 +0100 Message-Id: <20181204103716.659675370@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181204103714.485546262@linuxfoundation.org> References: <20181204103714.485546262@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alistair Strachan (commit 41f1c48420709470c51ee0e54b6fb28b956bb4e0 upstream) 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 [ND: adjusted due to missing commit ce279d374ff3 ("efi/libstub: Only disable stackleak plugin for arm64")] Signed-off-by: Nick Desaulniers Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/efi/libstub/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -12,7 +12,8 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__K 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