From: Peter Korsgaard <peter@korsgaard.com>
To: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
Cc: "Köry Maincent" <kory.maincent@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [PATCH] boot/at91bootstrap: disable PIE and stack-protector build flags
Date: Fri, 13 Oct 2023 12:24:13 +0200 [thread overview]
Message-ID: <87r0ly6cs2.fsf@48ers.dk> (raw)
In-Reply-To: <20231001110422.0810c899@windsurf> (Thomas Petazzoni via buildroot's message of "Sun, 1 Oct 2023 11:04:22 +0200")
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:
> Hello Köry,
> On Tue, 4 Oct 2022 14:52:41 +0200
> Köry Maincent via buildroot <buildroot@buildroot.org> wrote:
>> From: Kory Maincent <kory.maincent@bootlin.com>
>>
>> The toolchain wrapper add automatically Position Independent Execution
>> and stack protector flags in the build process when selected in the
>> configuration. at91bootstrap does not support these, therefore I added a
>> patch to disable them in the Makefiles
>>
>> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
>> ---
>> ...ck-protector-and-the-PIE-build-flags.patch | 502 ++++++++++++++++++
>> 1 file changed, 502 insertions(+)
>> create mode 100644 boot/at91bootstrap/0004-ensure-the-stack-protector-and-the-PIE-build-flags.patch
> Thanks for the patch. However, the at91bootstrap patch was highly
> repetitive, and we have no chance of merging it upstream since upstream
> is essentially dead. So instead, I committed this:
> +# The at91bootstrap Makefile doesn't support customizing
> +# CFLAGS/LDFLAGS, so we cheat and pass our custom flags through CC and
> +# LD.
> define AT91BOOTSTRAP_BUILD_CMDS
> - $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C $(@D)/$(AT91BOOTSTRAP_MAKE_SUBDIR)
> + $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) \
> + CC="$(TARGET_CC) -fno-stack-protector" \
> + LD="$(TARGET_CC) -fno-PIE" \
> + -C $(@D)/$(AT91BOOTSTRAP_MAKE_SUBDIR)
> endef
> which achieves exactly the same, but is more concise.
Committed to 2023.02.x and 2023.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2023-10-13 10:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 12:52 [Buildroot] [PATCH] boot/at91bootstrap: disable PIE and stack-protector build flags Köry Maincent via buildroot
2023-10-01 9:04 ` Thomas Petazzoni via buildroot
2023-10-13 10:24 ` Peter Korsgaard [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=87r0ly6cs2.fsf@48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@buildroot.org \
--cc=kory.maincent@bootlin.com \
--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