From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/mdadm: do not hardcode -fpie
Date: Sun, 5 May 2024 15:17:04 +0200 [thread overview]
Message-ID: <20240505151704.624b571b@windsurf> (raw)
In-Reply-To: <20240412164017.3574-1-fontaine.fabrice@gmail.com>
On Fri, 12 Apr 2024 18:40:17 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Set LDLIBS to -ldl to remove -fpie and fix the following build failure
> raised since bump to version 4.3 in commit
> 99e9ff08d0705279532ca0cf3de22ea54660cbdc and
> https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=55a1150c7438afcb7756fccd49713ede20a58e4a:
>
> /home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/or1k-buildroot-linux-gnu/12.3.0/../../../../or1k-buildroot-linux-gnu/bin/ld: mdmon.o: non-pic relocation against symbol
>
> Fixes: 99e9ff08d0705279532ca0cf3de22ea54660cbdc
> - http://autobuild.buildroot.org/results/827b714deeaf091b368d59791e4306b85a8f7f26
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/mdadm/mdadm.mk | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to master, even though I must admit the proposed fix is not
ideal. Indeed, it overrides LDLIBS from the package Makefile, which
means that if we update mdadm and they change their Makefile with a
different LDLIBS value, it will no longer work. Some other options
would have been:
- An upstreamable patch that allows to explicitly disable using PIE
- An upstreamable patch that detects if PIE works before using it, a
bit like what they're doing with other gcc flag detection:
FALLTHROUGH := $(shell gcc -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l)
But well, what you did is good enough, so I've applied as-is. Thanks!
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
prev parent reply other threads:[~2024-05-05 13:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 16:40 [Buildroot] [PATCH 1/1] package/mdadm: do not hardcode -fpie Fabrice Fontaine
2024-05-05 13:17 ` Thomas Petazzoni via buildroot [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=20240505151704.624b571b@windsurf \
--to=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.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 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.