From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/domoticz: fix build with RELRO
Date: Mon, 4 Nov 2019 23:12:37 +0100 [thread overview]
Message-ID: <20191104231237.1954d080@windsurf.home> (raw)
In-Reply-To: <CAPi7W81G6kXj_ueiGDq2ocz_Q8HesGVDpp5g7BgXJ1qpqpu6WQ@mail.gmail.com>
Hello,
I'm adding a few more people in Cc: Matt, Yann, Arnout, Peter.
On Thu, 31 Oct 2019 14:01:33 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> > What is the relationship between using precompiled headers and relro
> > build problems ?
> I took me some time to understand the issue.
> It seems that linker flag such as -Wl,-z,relro should not be used when
> building a precompiled header.
> I discovered this through this domoticz commit message:
> https://github.com/domoticz/domoticz/commit/68698e7a5dce80dea5a9b997d7e171b80bf566ac
>
> However, this commit does not fix the issue on buildroot as
> -Wl,-z,relro is not passed through CXXFLAGS but through our
> toolchain-wrapper.
> Updating toolchain/toolchain-wrapper.c to add the logic to manage
> precompiled header seems more complicated than adding an option to
> disable this feature from domoticz.
So, I looked into this, found
https://lists.fedoraproject.org/pipermail/devel/2011-July/153664.html
and https://bugzilla.redhat.com/show_bug.cgi?id=718719.
So it really seems like -Wl,-z,relzo should not be passed when
compiling. But our compiler wrapper passes it unconditionally when
RELRO is enabled.
Do we have a way to detect that the wrapper is called to compile or to
link ? I don't think we do.
So is Fabrice's patch an acceptable work-around, or do we want to fix
this more globally ?
Thanks for your feedback,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-11-04 22:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-31 10:23 [Buildroot] [PATCH 1/1] package/domoticz: fix build with RELRO Fabrice Fontaine
2019-10-31 12:43 ` Thomas Petazzoni
2019-10-31 13:01 ` Fabrice Fontaine
2019-11-04 22:12 ` Thomas Petazzoni [this message]
2019-11-05 20:19 ` Matthew Weber
2019-11-06 13:07 ` Arnout Vandecappelle
2019-11-06 13:46 ` [Buildroot] [External] " Matthew Weber
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=20191104231237.1954d080@windsurf.home \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/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.