From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v1 2/2] dhcp: disable isc assertions (reproducible builds)
Date: Tue, 30 Jan 2018 18:54:02 +0100 [thread overview]
Message-ID: <20180130175402.GA3468@scaer> (raw)
In-Reply-To: <20180108211857.2166f95e@windsurf>
Thomas, Peter S., All,
On 2018-01-08 21:18 +0100, Thomas Petazzoni spake thusly:
> On Fri, 27 Oct 2017 21:24:24 +0200, Peter Seiderer wrote:
> > The isc assertions from the bundled bind dns library are
> > using the __FILE__ macro for debug messages (see
> > dhcp-4.3.5/bind/bind-9.9.9-P3/lib/isc/include/isc/assertions.h).
> >
> > Disabling the assertions gains:
> >
> > - reproducible builds (no built time pathes in the executable)
> > - space saving on the target:
> > dhcpd: 1.9M -> 1.6M
> > dhcrelay: 1.6M -> 1.3M
> >
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> > package/dhcp/dhcp.mk | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk
> > index 45cae087aa..0bae61283a 100644
> > --- a/package/dhcp/dhcp.mk
> > +++ b/package/dhcp/dhcp.mk
> > @@ -11,7 +11,9 @@ DHCP_LICENSE = ISC
> > DHCP_LICENSE_FILES = LICENSE
> > DHCP_CONF_ENV = \
> > CPPFLAGS='-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \
> > - -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"'
> > + -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"' \
> > + CFLAGS='$(TARGET_CFLAGS) -DISC_CHECK_NONE=1'
>
> I'm not sure about this one.
>
> Do we want to remove assertions from production code ?
>
> Regarding the __FILE__ problem, I think this is going to bite us on a
> large number of packages. So instead of a per-package solution, we
> should perhaps have a look at:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268, proposal for a
> -ffile-map-prefix option to gcc
>
> https://wiki.debian.org/ReproducibleBuilds/BuildPathProposal, also
> discussing a similar idea
>
> Peter, Arnout, Yann, what do you think, especially about the
> assertions ?
Assertions are supposed to be usefull during development, not during
production use, so I would be fine with disabling them, yes.
At least, I would hope that no sane developer uses assertions to check
for normal error conditions in normal operation mode... ;-]
Now, about reproducibility... We could at least pass -DFILE=\"\" and so
on from inside our gcc-wrapper, like we already do for __DATE__ and
__TIME__. Yes, that would give an empty filename in assertions and the
likes, but do we care in the end?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2018-01-30 17:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 19:24 [Buildroot] [PATCH v1 1/2] libopenssl: do not leak the compiler path (reproducible builds) Peter Seiderer
2017-10-27 19:24 ` [Buildroot] [PATCH v1 2/2] dhcp: disable isc assertions " Peter Seiderer
2018-01-08 20:18 ` Thomas Petazzoni
2018-01-15 21:46 ` Peter Seiderer
2018-01-30 17:54 ` Yann E. MORIN [this message]
2018-02-03 21:54 ` Peter Korsgaard
2018-02-04 9:54 ` Yann E. MORIN
2018-02-04 21:50 ` Peter Korsgaard
2018-01-08 20:10 ` [Buildroot] [PATCH v1 1/2] libopenssl: do not leak the compiler path " Thomas Petazzoni
2018-01-30 23:15 ` Peter Seiderer
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=20180130175402.GA3468@scaer \
--to=yann.morin.1998@free.fr \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox