From patchwork Fri Feb 2 20:38:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 10198109 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 B2C0760388 for ; Fri, 2 Feb 2018 20:38:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A338A28EE7 for ; Fri, 2 Feb 2018 20:38:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96FC928F79; Fri, 2 Feb 2018 20:38:38 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1ACE828EE7 for ; Fri, 2 Feb 2018 20:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752088AbeBBUih (ORCPT ); Fri, 2 Feb 2018 15:38:37 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:34782 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964AbeBBUig (ORCPT ); Fri, 2 Feb 2018 15:38:36 -0500 Received: by mail-qt0-f193.google.com with SMTP id a27so32575499qtd.1 for ; Fri, 02 Feb 2018 12:38:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=K6gYz1sb3twWgfkuIuRT7tOfq4Sqi8gP8/GeAopYDSo=; b=ORoT191euNTx44A9v3dxf7l9yn2TUlBPhXoD+D2hzzhsHgKNNgzHnUFiy/6pYdWrCi sU+aXzLTb95p4alRnOjth3CQqNR4c5nqVjzjAM2qtpJnAZkn98SVIdpAFS+T7ed8JXv6 2T7WEn9HjK40FJ0ata1A7MpWqGKbTJvmPkikE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=K6gYz1sb3twWgfkuIuRT7tOfq4Sqi8gP8/GeAopYDSo=; b=YaaKymMCtix6E9aP9sDbgvSKSTTn2SobyqYgenWikhX/xcZM3LdDxh63KuFKS0y264 1URjlxiFq0DVXwIuYbZojRxYQhUlJfecQYAMvBAmNbd3Ah0ns/wN3CFlaT+Oqv+EpRMJ mOCpMrCEwqx9T1SSYtFVIZkw2iUddw0nqBJMK5udWR4keKCEsuJZYQ623ydcCPt0XIsf QpinEy6AvACEzW8FQjOFt4YWkwQoAk6dmqUqdInpTuhTAPty0J+jOvAoaekbsywimovo wSLYKYREdNPPLf+D35fVkDpOIsqti8Ydubj+xVHPVCFaghvrIxYWh2fvavsYo1cd4v30 GtLA== X-Gm-Message-State: AKwxytf7T1YI4WeO7HuSVk63uI6fxFFsqMLd72ltk7JPyAB1svU+4MfT 2UJD9/Ck4P/+rDIE8lOoDRPT2Q== X-Google-Smtp-Source: AH8x224HmxbnKiGKq8zZv/qtG7G3UIW2pxUC5fb8FnyAfILxkiFvlavDknUxrfCZpa8McFTkL4sZGg== X-Received: by 10.200.61.90 with SMTP id u26mr11410667qtf.168.1517603915954; Fri, 02 Feb 2018 12:38:35 -0800 (PST) Received: from xanadu.home (modemcable228.104-82-70.mc.videotron.ca. [70.82.104.228]) by smtp.gmail.com with ESMTPSA id 61sm1886902qta.74.2018.02.02.12.38.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Feb 2018 12:38:35 -0800 (PST) Date: Fri, 2 Feb 2018 15:38:34 -0500 (EST) From: Nicolas Pitre To: Arnd Bergmann cc: Andi Kleen , Linux Kernel Mailing List , Linux Kbuild mailing list Subject: Re: [PATCH 7/7] Kbuild: lto: pass -m32/-m64 to to LDFINAL In-Reply-To: Message-ID: References: <20180202161550.2106846-1-arnd@arndb.de> <20180202162104.2300532-7-arnd@arndb.de> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 2 Feb 2018, Arnd Bergmann wrote: > Do you have a git tree with other changes for LTO on ARM? I'd > like to try that as well. I currently have only 2 other patches. You need commit 75fea300d73a that just hit mainline (you may cherry-pick it easily if necessary). Then the following: ----- >8 Subject: [PATCH] HACK: enable LTO on ARM Without the ${KBUILD_VMLINUX_LIBS} move the build fails with missing memcpy all over the place. Didn't figure it out yet. > > Arnd > --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 4382315005..84450843ed 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -17,6 +17,7 @@ config ARM select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if CPU_V7 select ARCH_SUPPORTS_ATOMIC_RMW + select ARCH_SUPPORTS_LTO select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_CMPXCHG_LOCKREF select ARCH_WANT_IPC_PARSE_VERSION @@ -101,6 +102,7 @@ config ARM select PERF_USE_VMALLOC select RTC_LIB select SYS_SUPPORTS_APM_EMULATION + select THIN_ARCHIVES if LTO # Above selects are sorted alphabetically; please add new ones # according to that. Thanks. help diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 45a6b9b7af..39ac0a9639 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -97,7 +97,7 @@ targets := vmlinux vmlinux.lds piggy_data piggy.o \ clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S \ $(libfdt) $(libfdt_hdrs) hyp-stub.S -KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING +KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING $(DISABLE_LTO) ifeq ($(CONFIG_FUNCTION_TRACER),y) ORIG_CFLAGS := $(KBUILD_CFLAGS) diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 964b2ee855..0774a87788 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -99,9 +99,9 @@ vmlinux_link() if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then objects="--whole-archive \ built-in.o \ + ${KBUILD_VMLINUX_LIBS} \ --no-whole-archive \ --start-group \ - ${KBUILD_VMLINUX_LIBS} \ --end-group \ ${1}" else