All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Report from the Buildroot Meeting in Berlin
Date: Thu, 20 Oct 2016 18:39:37 +0200	[thread overview]
Message-ID: <c2da1832-3282-33f0-1588-e828f3df4801@mind.be> (raw)
In-Reply-To: <20161019221035.2350c181@free-electrons.com>



On 19-10-16 22:10, Thomas Petazzoni wrote:
>  - Toolchain wrapper and CFLAGS. A patch series from Jan Heylen that
>    changes the toolchain wrapper to also wrap 'ld' triggered a fairly
>    lengthy discussion on how we handle CFLAGS. Some of them are
>    encoded in the wrapper, some are not, with no clear
>    definition. After this long discussion, we came to the conclusion
>    that wrapping 'ld' was not needed (packages should not use 'ld'
>    directly), and that the wrapper/CFLAGS handling should be reworked
>    as follows:
> 
>    * Combine BR2_TARGET_OPTIMIZATION and BR2_TARGET_LDFLAGS into a
>      single BR2_TARGET_EXTRA_FLAGS
> 
>    * Have a make variable called TARGET_WRAPPER_FLAGS that includes
>      all flags we want to include in the wrapper:
> 
>       * $(TARGET_ABI)
>       * $(TARGET_CPPFLAGS)
>       * $(BR2_TARGET_EXTRA_FLAGS)
>       * Custom flags added by package/Makefile.in
> 
>      $(TARGET_OPTIMIZATION) and $(TARGET_DEBUGGING) are *NOT* in the
>      wrapper.
> 
>    * TARGET_CFLAGS = $(TARGET_WRAPPER_CFLAGS) $(TARGET_OPTIMIZATION) \
>                      $(TARGET_DEBUGGING)
>      TARGET_CXXFLAGS = $(TARGET_CFLAGS)
>      TARGET_LDFLAGS = $(TARGET_CFLAGS)
>      TARGET_FCFLAGS = $(TARGET_CFLAGS)

 Turns out that it will be slightly more complicated than this. For MIPS, the
-mmsa option to enable SIMD processing MUST NOT be used in kernel and bootloader
builds. Therefore we cannot add it to TARGET_WRAPPER_CFLAGS. Instead, we'll have
a TARGET_EXTRA_CFLAGS that does not get added to the wrapper but does get added
to TARGET_CFLAGS and therefore passed to package buidls.

 The kernel and bootloaders don't use TARGET_CFLAGS, so those are safe. Also, it
is possible to link libraries built with -mmsa with programs that are built
without that option, so even if build systems ignore TARGET_CFLAGS it should be OK.

 That's the theory, we'll see how it develops in practice.


>    * The wrapper, instead of having special cases for different flags,
>      just receives (at build time), the list of hardcoded flag. A
>      special logic needs to be put in place to handle conflicting
>      flags (mcpu, march, mtune, mfloat-abi, etc.), for which the
>      command-line passed flag must be preserved if passed.
> 
>    Arnout has volunteered to do this work.

 As usual, I won't have this finished any time soon. Given that we're already
deep in October, don't expect this feature for 2016.11. Also I'd feel much more
comfortable if there were some test infrastructure in place before I start
submitting this magic :-).

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2016-10-20 16:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 20:10 [Buildroot] Report from the Buildroot Meeting in Berlin Thomas Petazzoni
2016-10-20 16:39 ` Arnout Vandecappelle [this message]
2016-10-21  8:25   ` Thomas Petazzoni
2016-10-21  8:57     ` Arnout Vandecappelle
2016-10-21  9:05       ` Thomas Petazzoni
2016-10-24 12:02   ` Peter Korsgaard
2016-10-24 12:19     ` Vicente Olivert Riera
2016-10-24 12:28       ` Thomas Petazzoni
2016-10-24 13:05         ` Arnout Vandecappelle
2016-10-24 14:52           ` Vicente Olivert Riera
2016-10-24 14:57             ` Thomas Petazzoni
2016-10-24 15:47               ` [Buildroot] Toolchain wrapper CFLAGS [was: Re: Report from the Buildroot Meeting in Berlin] Arnout Vandecappelle
2016-10-24 12:39       ` [Buildroot] Report from the Buildroot Meeting in Berlin Peter Korsgaard
2016-10-24  0:54 ` Sam Bobroff
2016-10-24  7:25   ` Thomas Petazzoni
2016-10-25  2:21     ` Sam Bobroff

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=c2da1832-3282-33f0-1588-e828f3df4801@mind.be \
    --to=arnout@mind.be \
    --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.