[Buildroot] [PATCH 1/1] package/qt5: remove optimize by default on debug builds made with qmake

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Aug 5 20:03:39 UTC 2021


Hello Mehmet,

On Tue,  7 Jan 2020 15:32:09 +0300
Mehmet Sami Tok <mehmetsamitok at gmail.com> wrote:

> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> index 774c771bc9..3415172fcb 100644
> --- a/package/qt5/qt5base/qt5base.mk
> +++ b/package/qt5/qt5base/qt5base.mk
> @@ -34,8 +34,12 @@ ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
>  QT5BASE_CONFIGURE_OPTS += -no-optimize-debug
>  endif
>  
> -QT5BASE_CFLAGS = $(TARGET_CFLAGS)
> -QT5BASE_CXXFLAGS = $(TARGET_CXXFLAGS)
> +# Passing optimization flags directly to CFLAGS or CXXFLAGS makes qmake
> +# builds optimized by default. Decision of optimization while developing
> +# with qmake should be leaved to configuration of the project.
> +FILTERED_ITEMS = -O%
> +QT5BASE_CFLAGS = $(filter-out $(FILTERED_ITEMS),$(TARGET_CFLAGS))
> +QT5BASE_CXXFLAGS = $(filter-out $(FILTERED_ITEMS),$(TARGET_CXXFLAGS))

Thanks for your patch, and sorry for the long delay in providing
feedback to you and your patch. However, what the code currently does
it what we want: we want the optimization level defined at the
Buildroot configuration level to apply to all packages. We certainly do
not want individual packages to pick and chose their own optimization
level. So basically, your proposal unfortunately goes against the
very principle of Buildroot. For this reason, I'm afraid we have to
reject your patch.

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list