All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Josef Schlehofer <pepe.schlehofer@gmail.com>
Cc: u-boot@lists.u-boot-project.org, "Simon Glass" <sjg@chromium.org>,
	"Marek Behún" <kabel@kernel.org>
Subject: Re: [PATCH 2/2] Makefile: Set LTO_ENABLE before including config.mk
Date: Tue, 20 Oct 2026 15:28:19 -0600	[thread overview]
Message-ID: <20261020212819.GK720525@bill-the-cat> (raw)
In-Reply-To: <6b1531855e6557a015d83d97ebd0e80417f2e15d.1791877299.git.pepe.schlehofer@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

On Tue, Oct 13, 2026 at 09:43:22AM +0200, Josef Schlehofer wrote:

> Commit a55014d09b29 ("Makefile: Allow LTO to be disabled for a build")
> made the condition in arch/arm/config.mk that leaves out
> -ffunction-sections -fdata-sections with LTO test LTO_ENABLE. The top
> Makefile, however, sets LTO_ENABLE only after it has included config.mk,
> which reads arch/$(ARCH)/config.mk, so for U-Boot proper the condition
> has seen an empty LTO_ENABLE since then. The xPL builds are not
> affected, as scripts/Makefile.xpl adds these flags for them anyway.
> 
> Set LTO_ENABLE before config.mk is included.
> 
> Fixes: a55014d09b29 ("Makefile: Allow LTO to be disabled for a build")
> Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Marek Behún <kabel@kernel.org>

This breaks, among other platforms, am64x_evm_r5
+(am64x_evm_r5) /home/trini/.buildman-toolchains/gcc-14.2.0-nolibc/arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/14.2.0/../../../../arm-linux-gnueabi/bin/ld: arch/arm/lib/cache-cp15.o: in function `mmu_set_region_dcache_behaviour':
+(am64x_evm_r5) arch/arm/lib/cache-cp15.c:331:(.text+0x8c): undefined reference to `mmu_set_region_dcache_behaviour_phys'
+(am64x_evm_r5) collect2: error: ld returned 1 exit status
+(am64x_evm_r5) make[1]: *** [Makefile:2131: u-boot] Error 1
+(am64x_evm_r5) make: *** [Makefile:189: __sub-make] Error 2

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-10-20 21:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13  7:43 [PATCH 0/2] arm: Make the LTO conditions in arch/arm/config.mk take effect Josef Schlehofer
2026-10-13  7:43 ` [PATCH 1/2] arm: Keep --gc-sections with LTO Josef Schlehofer
2026-10-13  7:43 ` [PATCH 2/2] Makefile: Set LTO_ENABLE before including config.mk Josef Schlehofer
2026-10-20 21:28   ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261020212819.GK720525@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=kabel@kernel.org \
    --cc=pepe.schlehofer@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.u-boot-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.