From patchwork Mon Dec 13 22:49:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 12674781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9D27C433EF for ; Mon, 13 Dec 2021 22:49:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243745AbhLMWtr (ORCPT ); Mon, 13 Dec 2021 17:49:47 -0500 Received: from aposti.net ([89.234.176.197]:34516 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243841AbhLMWtr (ORCPT ); Mon, 13 Dec 2021 17:49:47 -0500 From: Paul Cercueil To: Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers Cc: list@opendingux.net, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Paul Cercueil Subject: [PATCH 3/3] MIPS: Add support for LTO Date: Mon, 13 Dec 2021 22:49:14 +0000 Message-Id: <20211213224914.1501303-4-paul@crapouillou.net> In-Reply-To: <20211213224914.1501303-1-paul@crapouillou.net> References: <20211213224914.1501303-1-paul@crapouillou.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Allow CONFIG_LTO_CLANG to be enabled. The ThinLTO variant is not yet supported. While this option allows to build a LTO'd kernel, the result kernel file ends up being *bigger* than the non-LTO variant (about 3.6 MiB with LTO vs. 3.1 MiB without with a ZSTD-compressed kernel). Signed-off-by: Paul Cercueil Reviewed-by: Nathan Chancellor --- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 0215dc1529e9..6987db8d5f64 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -22,6 +22,7 @@ config MIPS select ARCH_USE_QUEUED_RWLOCKS select ARCH_USE_QUEUED_SPINLOCKS select ARCH_SUPPORTS_HUGETLBFS if CPU_SUPPORTS_HUGEPAGES + select ARCH_SUPPORTS_LTO_CLANG if CPU_LITTLE_ENDIAN select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_LD_ORPHAN_WARN