From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Julien Olivain <ju.o@free.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH next 1/1] package/kexec: fix link error when BR2_OPTIMIZE_0=y
Date: Tue, 22 Aug 2023 21:35:39 +0200 [thread overview]
Message-ID: <20230822213539.331878ec@windsurf> (raw)
In-Reply-To: <20230822192315.8180-1-ju.o@free.fr>
On Tue, 22 Aug 2023 21:23:14 +0200
Julien Olivain <ju.o@free.fr> wrote:
> When BR2_OPTIMIZE_0, -O0 is passed in compiler CFLAGS. This means no
> code optimization will be performed.
>
> kexec code uses a trick to detect unaligned accesses at link time
> which needs at least dead-code-removal to work. See
> put/get_unaligned() macros in kexec/kexec.h. This code was re-enabled
> in upstream commit [1].
>
> This commit sets at least -O1 (which include the sufficient
> dead-code-removal) when BR2_OPTIMIZE_0=y, to fix those issues.
>
> Fixes:
> - http://autobuild.buildroot.org/results/8f8/8f8532f1dfbd71e52c51c00118934af9fa45e7cb
> - http://autobuild.buildroot.org/results/528/528fd7baf9b0ad5549d22ec8e0623c5fa1f2d117
> - http://autobuild.buildroot.org/results/499/499115439680adfb4b40042468e5bbb65d91ce6c
> - ...and many others
>
> [1] https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=0723defb5308ac7fce296f8b596bff4df6803f01
>
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
> Patch tested on branch next at commit bfa4a7c with commands:
Thanks for the research, but why is this tagged for next? You're saying
the issue was introduced in kexec-tools commit
0723defb5308ac7fce296f8b596bff4df6803f01, and this commit was initially
part of the 2.0.1 release of kexec-tools, which we have in Buildroot
since February 2010.
Based on that, I would have expected this patch to be relevant for our
master branch, but you explicitly say it should be merged in next,
which to me doesn't make sense. Could you clarify?
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-08-22 19:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 19:23 [Buildroot] [PATCH next 1/1] package/kexec: fix link error when BR2_OPTIMIZE_0=y Julien Olivain
2023-08-22 19:35 ` Thomas Petazzoni via buildroot [this message]
2023-08-22 20:08 ` Julien Olivain
2023-08-22 20:35 ` Thomas Petazzoni via buildroot
2023-08-22 20:42 ` Julien Olivain
2024-07-12 19:09 ` Arnout Vandecappelle via buildroot
2024-08-06 22:44 ` Peter Korsgaard
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=20230822213539.331878ec@windsurf \
--to=buildroot@buildroot.org \
--cc=ju.o@free.fr \
--cc=thomas.petazzoni@bootlin.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox