From patchwork Tue Mar 20 23:02:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10298143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD2B1600F6 for ; Tue, 20 Mar 2018 23:02:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFCF327FA3 for ; Tue, 20 Mar 2018 23:02:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE7A228920; Tue, 20 Mar 2018 23:02:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 170BF27FA3 for ; Tue, 20 Mar 2018 23:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=E0MJNaCVvKbhZwihJNAidVCmyJMfQajPAtpBAUWa9rA=; b=uzvGZzMBTBPgWrhwaBTp0MiDOd 40VcKmsKEp0Xq4ET/zhcf8yUB/PsGrr5GPNQQQpHWgCH2a7cNUZu3z15Oi+mbexzHlNZ3MvBCVbv7 JorMZBQ0XZNPShwbc6IBV+wCQzjHYKCFZEAI6nmPvW1OXac1hkRp4VqhqiJezJPnWJLcEJ77lmIbg Tw3ytixEuZT+2fUaT0SbcgvbIfhVyM3uzKZQOfI2ihKZH6HgX+KASQNO8mVDzT93U82mO3sK552rp 96qG5radQc/V2n2Wbxg8S+Wb6fvJuLPV/vVxcKfIRXKYzQM2aUrziUb8xu7+bYiE0cfsIz522XbiG ilfqN4zw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyQH8-00016j-3j; Tue, 20 Mar 2018 23:02:38 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyQH3-00012C-97 for linux-arm-kernel@lists.infradead.org; Tue, 20 Mar 2018 23:02:35 +0000 Received: from trochilidae.lan (unknown [IPv6:2001:1620:c6e::587]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 066FF5C1E98; Wed, 21 Mar 2018 00:01:57 +0100 (CET) From: Stefan Agner To: linux@armlinux.org.uk, ard.biesheuvel@linaro.org, arnd@arndb.de Subject: [PATCH 2/5] efi/libstub/arm: add support for building with clang Date: Wed, 21 Mar 2018 00:02:03 +0100 Message-Id: <20180320230206.25289-3-stefan@agner.ch> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180320230206.25289-1-stefan@agner.ch> References: <20180320230206.25289-1-stefan@agner.ch> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1521586917; bh=FYUREkuYv5sk1RFCaEmXqnY8S469ERoOHMQV9jck9gU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=RkxDoiwqfKZ1SN4rnO577b+XnxteH+gP8z7xIYuFAIHhK0f7dUPXSi5tEJd4nEZNDv8z3YCcJbErytFfo7qKNYLJCt09XR31bqf5LczLmiDUOP5KhGz7fj+EHtka7byxNPgG8Q2/fWCqIMgB0LXB5nRtf0gtgBZZWoHlaN4XXp0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180320_160233_508410_7EEB0F3E X-CRM114-Status: GOOD ( 13.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolas.pitre@linaro.org, keescook@chromium.org, marc.zyngier@arm.com, linux-kernel@vger.kernel.org, Stefan Agner , mka@chromium.org, linux-arm-kernel@lists.infradead.org, Bernhard.Rosenkranzer@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use cc-options call for -mno-single-pic-base since the option is not available in clang. LLVM/clang always assumes a fixed displacement between text/data and hence uses PC relative addressing. Signed-off-by: Stefan Agner --- 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 7b3ba40f0745..2bf69cca0d87 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