All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Norbert Lange <nolange79@gmail.com>,
	Fabrice Fontaine <fontaine.fabrice@gmail.com>,
	Sen Hastings <sen@phobosdpl.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/systemd: disable with -Ofast
Date: Tue, 21 Feb 2023 21:08:57 +0100	[thread overview]
Message-ID: <20230221200857.GG2718518@scaer> (raw)
In-Reply-To: <20230221154827.7e737960@windsurf>

Fabrice, all,

On 2023-02-21 15:48 +0100, Thomas Petazzoni spake thusly:
> Hello Fabrice,
> 
> On Tue, 21 Feb 2023 15:21:44 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> 
> > systemd can't be built with -Ofast since version 252 and
> > https://github.com/systemd/systemd/commit/60f97fee2d2f948c8e8963ea8ff767008cb93cae
> > resulting in the following build failure since bump to version 252.4 in
> > commit a2c823d1f548d5a0120d27d6c000603192360f7b:
> > 
> > ../output-1/build/systemd-252.4/meson.build:397:8: ERROR: Problem encountered: -Ofast, -ffast-math, or -ffinite-math-only is specified in c_args.
> > 
> > While at it, revert changes made by commit 9cd084b54e2223e49c37962b0cbefae7bea26ef5
> > 
> > Fixes:
> >  - http://autobuild.buildroot.org/results/8f41c4984b645851724e554c3162b83bc312bee7
> > 
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  package/systemd/Config.in  | 1 +
> >  package/systemd/systemd.mk | 5 -----
> >  system/Config.in           | 4 ++++
> >  3 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/package/systemd/Config.in b/package/systemd/Config.in
> > index 9f4d933779..5bbdbb405f 100644
> > --- a/package/systemd/Config.in
> > +++ b/package/systemd/Config.in
> > @@ -25,6 +25,7 @@ menuconfig BR2_PACKAGE_SYSTEMD
> >  	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
> >  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5
> >  	depends on BR2_HOST_GCC_AT_LEAST_5 # host-systemd
> > +	depends on !BR2_OPTIMIZE_FAST
> I really dislike this.

Agreed.

> > -SYSTEMD_CFLAGS = $(TARGET_CFLAGS)
> > -ifeq ($(BR2_OPTIMIZE_FAST),y)
> > -SYSTEMD_CFLAGS += -O3
> > -endif
> 
> And this should work. It's really systemd that is stupid to look for
> -Ofast in c_flags without seeing that -O3 later overrides it.

Indeed. Probably something along the lines of:

    SYSTEMD_CFLAGS = $(filter-out -Ofast,$(TARGET_CFLAGS))

would do the trick?

Alternatively, as the upstream commit also implies, maybe we should in
this case keep -Ofast and just add:

    SYSTEMD_CFLAGS = $(TARGET_CFLAGS) -fno-finite-math-only

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-02-21 20:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 14:21 [Buildroot] [PATCH 1/1] package/systemd: disable with -Ofast Fabrice Fontaine
2023-02-21 14:48 ` Thomas Petazzoni via buildroot
2023-02-21 20:08   ` Yann E. MORIN [this message]
2023-02-21 20:26     ` Thomas Petazzoni via buildroot
2023-02-21 20:34       ` Yann E. MORIN
2023-02-21 20:49         ` Thomas Petazzoni via buildroot
2023-02-21 21:15           ` Yann E. MORIN

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=20230221200857.GG2718518@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=fontaine.fabrice@gmail.com \
    --cc=nolange79@gmail.com \
    --cc=sen@phobosdpl.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.