package/qt5/qt5base: disable predefined -Og optimization
authorGiulio Benetti <giulio.benetti@micronovasrl.com>
Tue, 18 Jun 2019 08:45:32 +0000 (10:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 22 Jun 2019 18:36:08 +0000 (20:36 +0200)
Starting from Qt5 5.9.0, -optimize-debug is enabled by default for
debug builds causing -Og flag to be appended to CFLAGS and
consequently override TARGET_CFLAGS. We don't want this so let's pass
-no-optimize-debug to QT5BASE_CONFIGURE_OPTS if QT5_VERSION_LATEST=y.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/qt5/qt5base/qt5base.mk

index e4ae1206313cf579dfd0775c5669c8b5a9bd2b59..f4b40913f4dcb25778f9ad824b7e234c8b2ff947 100644 (file)
@@ -27,6 +27,13 @@ QT5BASE_CONFIGURE_OPTS += \
        -no-pch \
        -shared
 
+# starting from version 5.9.0, -optimize-debug is enabled by default
+# for debug builds and it overrides -O* with -Og which is not what we
+# want.
+ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
+QT5BASE_CONFIGURE_OPTS += -no-optimize-debug
+endif
+
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
 QT5BASE_DEPENDENCIES += pcre
 else