* [Buildroot] [PATCH 1/1] package/pkg-cmake: use MinSizeRel for size optimized build
@ 2016-01-17 18:24 Jörg Krause
2016-01-18 20:50 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Jörg Krause @ 2016-01-17 18:24 UTC (permalink / raw)
To: buildroot
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) \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_COLOR_MAKEFILE=OFF \
-DBUILD_DOC=OFF \
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] package/pkg-cmake: use MinSizeRel for size optimized build
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
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-01-18 20:50 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-18 20:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox