Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2527839imu; Thu, 29 Nov 2018 06:26:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vde7D0nyUpzDqauhnEL1CpoCfuEuT11BGTgQ0BLW1KeYiFRdZ6egooKrFbrb2dlSqZpWf3 X-Received: by 2002:a17:902:824:: with SMTP id 33-v6mr1708649plk.107.1543501596342; Thu, 29 Nov 2018 06:26:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543501596; cv=none; d=google.com; s=arc-20160816; b=Uj0Yqyn+i/tNhiIcGvpD7AryZlA5/VeKXfYLkM1TigXMR6T+EHwdrVInxm9Ik37hnh ewjGR+P++BGNZMlGeSUq8PvDnN4iidcvSYkyoGCR47Z+bFzk3c1hi2DKWPJvSlBHGrt+ LEOVvIN2I48I7PqLBP/siNNUh6rjQJutIAI/5brvHao8axmEeV16Cc3zeKnLX9BMye3U EcB1Boiq3N5+FaxampmhExQRxpsOgY/P0qrZOhVd+cv2U+6hMPAPxHvskeej0qXxniMU zJs4RAmS488h33IXtwXoEQ79ZO+0GgNV9klAe2u2lmaTUZnWp/iasIwG1SXk1aq5bIUk R3VA== 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=+OrG4uVLmnyoS+/BU3MfG9BQWD22o1w4P2osfX6PKAU=; b=KhdwHBH1CIgLA8ZiAx7fZOUlJ07h76LQKeZTPP1mAl9qSP3huGcSB/V7MAFtXZx+Fk TrtiWxHrZ6LarodCGEqi3Dd17cCu0AM0RijEWsxXo8N9gjXy1odS5hhsOIucb33Le2R3 drWyZn5rbhnTWA6S7WT6cK3N8OtRhcWMz1QPGBBD620RwyxOxOkOOF6FPD8EFKxQbGY6 tdELyEpPKbSDgSinAih7xm77eunnQXw6Fs9M1SgQiR0hQzdl4Hrdb4hCyS9hX7UwlgZd xk10/dt+aCk0AopgrddRe9pYtRud1bAtfoFEbY4OBMjAf/8igY35ytWErtR0NSGboJnE o8iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xwta1Shz; 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 t69si2168777pgb.365.2018.11.29.06.26.21; Thu, 29 Nov 2018 06:26:36 -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=xwta1Shz; 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 S1732640AbeK3B36 (ORCPT + 99 others); Thu, 29 Nov 2018 20:29:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:56730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731418AbeK3B35 (ORCPT ); Thu, 29 Nov 2018 20:29:57 -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 DEEA7205C9; Thu, 29 Nov 2018 14:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501465; bh=U0KSf7bPBBNnULXympvGCEAHkHfd/HbxM7Sbc2eyjRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xwta1Shz0HVcD5tzVHDTVkG34JOhcYMFO0rV9LeRPy+Mh5X1zR4OgJ/ShExmg/8+j IxmPnYN/OTtl7sXXWH0OXXC7BErsDPkgSPddf4QiZlO1/wE5U/cD9VaXPukJfm8YRZ 1ww61EWMFw6CYBKTJWMKVpyjT/KHVIesbI3tHwVU= 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.14 001/100] efi/libstub: arm: support building with clang Date: Thu, 29 Nov 2018 15:11:31 +0100 Message-Id: <20181129140058.885348315@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140058.768942700@linuxfoundation.org> References: <20181129140058.768942700@linuxfoundation.org> User-Agent: quilt/0.65 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.14-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 @@ -13,7 +13,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