[oe] [meta-qt5][PATCH v2] qtbase: add a config option to optimize for size

Martin Jansa martin.jansa at gmail.com
Mon Feb 19 12:07:44 UTC 2018


This doesn't make sense.

Leave PACKAGECONFIG[optimize-size] as it was in v2 and add
${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Os', 'optimize-size', '',
d)} to default PACKAGECONFIG value.


On Mon, Feb 19, 2018 at 9:53 AM, Kwangsub Kim <kwangsub.kim at qt.io> wrote:

> The '-optimize-size' option would enable the compiler to optimize
> for size instead of speed. If the global compiler option already
> included '-Os', this option would be enabled by default.
>
> It would affect the whole Qt libraries and Qt applications as well.
> This feature is available in Qt 5.9+.
>
> Signed-off-by: Kwangsub Kim <kwangsub.kim at qt.io>
> ---
>  recipes-qt/qt5/qtbase_git.bb | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
> index 4f3ade2..208a755 100644
> --- a/recipes-qt/qt5/qtbase_git.bb
> +++ b/recipes-qt/qt5/qtbase_git.bb
> @@ -147,6 +147,9 @@ PACKAGECONFIG[widgets] = "-widgets,-no-widgets"
>  PACKAGECONFIG[libproxy] = "-libproxy,-no-libproxy,libproxy"
>  PACKAGECONFIG[libinput] = "-libinput,-no-libinput,libinput"
>  PACKAGECONFIG[journald] = "-journald,-no-journald,systemd"
> +PACKAGECONFIG[optimize-size] = "-optimize-size,${QT_DEFAULT_
> OPTIMIZATION_FOR_SIZE}"
> +
> +QT_DEFAULT_OPTIMIZATION_FOR_SIZE = "${@bb.utils.contains('SELECTED_OPTIMIZATION',
> '-Os', '-optimize-size', '', d)}"
>
>  QT_CONFIG_FLAGS_GOLD = "${@bb.utils.contains('DISTRO_FEATURES',
> 'ld-is-gold', '-use-gold-linker', '-no-use-gold-linker', d)}"
>  QT_CONFIG_FLAGS += " \
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>



More information about the Openembedded-devel mailing list