[oe] [meta-qt5][PATCH v2] qtbase: add a config option to optimize for size
Kwangsub Kim
kwangsub.kim at qt.io
Tue Feb 20 07:39:16 UTC 2018
Hi Martin,
Thanks for your feedback.
I failed to find a right way to add the inline function. That’s why I added new variable. I tried to update like below but it caused a syntax error. The function (bb.utils.contains) was not evaluated and just copied as a string. Could you kindly advise me to fix this?
PACKAGECONFIG[optimize-size] = "-optimize-size,${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Os', '-optimize-size', '', d)}"
Best regards,
Kwangsub
From: Martin Jansa <martin.jansa at gmail.com>
Date: Monday, 19 February 2018 at 9:07 PM
To: Kwangsub Kim <kwangsub.kim at qt.io>
Cc: openembedded-devel <openembedded-devel at lists.openembedded.org>
Subject: Re: [oe] [meta-qt5][PATCH v2] qtbase: add a config option to optimize for size
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<mailto: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<mailto:kwangsub.kim at qt.io>>
---
recipes-qt/qt5/qtbase_git.bb<http://qtbase_git.bb> | 3 +++
1 file changed, 3 insertions(+)
diff --git a/recipes-qt/qt5/qtbase_git.bb<http://qtbase_git.bb> b/recipes-qt/qt5/qtbase_git.bb<http://qtbase_git.bb>
index 4f3ade2..208a755 100644
--- a/recipes-qt/qt5/qtbase_git.bb<http://qtbase_git.bb>
+++ b/recipes-qt/qt5/qtbase_git.bb<http://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<mailto:Openembedded-devel at lists.openembedded.org>
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
More information about the Openembedded-devel
mailing list