From patchwork Sun Mar 25 18:09:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10306839 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 C9DF2600CC for ; Sun, 25 Mar 2018 22:19:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF5D42933D for ; Sun, 25 Mar 2018 22:19:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A233F2934A; Sun, 25 Mar 2018 22:19: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 50EE62933D for ; Sun, 25 Mar 2018 22:19:42 +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=/Xf+oRp/JkgC0TdEnvSpXmhElsRwuwuCdanJlhjcO1g=; b=Nccb7kLvx8ZoZGTZSXJHwYLqLo F55LaLSoztNOjdDm2UsHohDiHkCMZ3XU0GBUm6nRijceqpOabzQ1HAi45zM/MZu3Y5Yhnc+N96wLF PpiV8rCcLtbJ3z3shUDZaThKZg1MCYFcNLubCF4qZ5CuJBw3NZ8C3PcoLwml1R0NkTyxpNkbw8/oF F/4HBEMy+G5wPaIUrpyAK1CZDm+YLz/EL08atAZI475UOFGtJr3CKrngKO/sCArFPQazpTtavaV9/ kMobsxyIGQd/eWiHPPd+eFRAeccQS9e9ZLZLUnY5JKRjbsXkJTfOpLvE9kdM96wB4/InyGYGfaKBH DbifHQ4Q==; 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 1f0DzE-0002xI-W4; Sun, 25 Mar 2018 22:19:37 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0Dpu-0000d6-EP for linux-arm-kernel@bombadil.infradead.org; Sun, 25 Mar 2018 22:09:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tOeYBOOVf1WdQSIz4AUMg8ZbdZvMFrEd+hQGsYFPC9Q=; b=tzm3S7zCYtXmUq37QvVfiiK5k bOFhApJYZ9In9ZGsNBQHRflsgIZ5P/QLGLGgnoRsNLjg0yz97OkCombe2MHLXb9ZQE7jn40Ygj5MC GoLm/PBm0YxNFiwy+MG9kkxEZawfuqiHAKnst05uqZnZjxvRt6eP2DMaQwvb77clbtLqvl7LU66N+ hAHt5QHLAJkm9I+bWxJNh0sLA181C7kCCSwPbZOfygF0/JEpShZ1KSxwKzKYRFxJ6f+dAsp2sS29v +utiZByQJD2tDg7nJDtlP4CkoEPLW8NFqpkGnRTWV19PGs0eC3z5+7Gjsi87Ak4pTkm/cu46JCezR u/S3YfhHQ==; Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0A7Y-0002sI-92 for linux-arm-kernel@lists.infradead.org; Sun, 25 Mar 2018 18:11:57 +0000 Received: from trochilidae.lan (unknown [IPv6:2001:1620:c6e:0:814c:3584:bd88:6cb6]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 1424C5C1FBA; Sun, 25 Mar 2018 20:09:37 +0200 (CEST) From: Stefan Agner To: linux@armlinux.org.uk, ard.biesheuvel@linaro.org, arnd@arndb.de Subject: [PATCH v2 5/6] ARM: add support for building ARM kernel with clang Date: Sun, 25 Mar 2018 20:09:58 +0200 Message-Id: <20180325180959.28008-6-stefan@agner.ch> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180325180959.28008-1-stefan@agner.ch> References: <20180325180959.28008-1-stefan@agner.ch> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1522001377; bh=tOeYBOOVf1WdQSIz4AUMg8ZbdZvMFrEd+hQGsYFPC9Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=FkPhYx/Qq2Mdv85zHLDLS1QjMUB08qMUW3m8PMnTs666TZdqn4S8rG91odIR9diUYJMDvVw518SOVuDf6QwIskaOZp3X+KpBtmAOxO6vVfDGwZb7GihLUOIdN+4BtLIRG8my5ZAHL/IQq4Gx8F66DOanghonq96GdIuDd8ukwC4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180325_191156_336509_0639288B X-CRM114-Status: GOOD ( 11.15 ) 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, robin.murphy@arm.com, 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 compiler options which are not available in clang. With this patch an ARMv7 multi platform kernel can be successfully build using clang (tested with version 5.0.1). Based-on-patches-by: Behan Webster Signed-off-by: Stefan Agner --- Changes in v2: - Drop cc-options in CONFIG_FRAME_POINTER=y case arch/arm/boot/compressed/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 45a6b9b7af2a..6a5c4ac97703 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -113,7 +113,7 @@ CFLAGS_fdt_ro.o := $(nossp_flags) CFLAGS_fdt_rw.o := $(nossp_flags) CFLAGS_fdt_wip.o := $(nossp_flags) -ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj) +ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj) asflags-y := -DZIMAGE # Supply kernel BSS size to the decompressor via a linker symbol.