From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/pkg-cmake: use MinSizeRel for size optimized build
Date: Mon, 18 Jan 2016 21:50:57 +0100 [thread overview]
Message-ID: <20160118215057.0108fad3@free-electrons.com> (raw)
In-Reply-To: <1453055051-11080-1-git-send-email-joerg.krause@embedded.rocks>
Dear J?rg Krause,
On Sun, 17 Jan 2016 19:24:11 +0100, J?rg Krause wrote:
> MinSizeRel sets the gcc compiler optimization level to '-Os' whereas Release
> sets it to '-O3'.
>
> Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
> ---
> package/pkg-cmake.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> index 81dcfcc..dc2dc93 100644
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -87,7 +87,7 @@ define $(2)_CONFIGURE_CMDS
> PATH=$$(BR_PATH) \
> $$($$(PKG)_CONF_ENV) $$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
> -DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
> - -DCMAKE_BUILD_TYPE=$$(if $$(BR2_ENABLE_DEBUG),Debug,Release) \
> + -DCMAKE_BUILD_TYPE=$$(if $$(BR2_ENABLE_DEBUG),Debug,$$(if $$(BR2_OPTIMIZE_S),MinSizeRel,Release) \
Looks good, but instead of this, can't CMake be taught to use Buildroot
CFLAGS, which have our own -O<value> ?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2016-01-18 20:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-17 18:24 [Buildroot] [PATCH 1/1] package/pkg-cmake: use MinSizeRel for size optimized build Jörg Krause
2016-01-18 20:50 ` Thomas Petazzoni [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=20160118215057.0108fad3@free-electrons.com \
--to=thomas.petazzoni@free-electrons.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox