Microblaze clean up 2
cover Microblaze clean up 2
This patchset follows and must be applied *after* "Microblaze clean up" patchset:
http://lists.busybox.net/pipermail/buildroot/2019-June/252509.html
This patchset fixes 2 bugs and work around 2 build TIMEOUTs for Microblaze architecture.
Giulio Benetti (4):
package/qt5/qt5base: disable predefined -Og optimization
toolchain: bug 90620 has not been fixed in gcc 8.x package/qt5/qt5base: work around gcc bug 90620 package/libtorrent-rasterbar: work around gcc bug 85180
.../libtorrent-rasterbar.mk | 4 ++++ package/qt5/qt5base/qt5base.mk | 18 ++++++++++++++++-- toolchain/Config.in | 3 +-- 3 files changed, 21 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/4 package/qt5/qt5base: disable predefined -Og optimization
Starting from Qt5 5.9.0 -optimize-debug is enabled by default 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.
--- package/qt5/qt5base/qt5base.mk | 6 ++++++ 1 file changed, 6 insertions(+)
package/qt5/qt5base/qt5base.mk +6 -0
@@ -27,6 +27,12 @@ QT5BASE_CONFIGURE_OPTS += \ -no-pch \ -shared +ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y) +# starting from version 5.9.0 -optimize-debug is enabled by default and +# it overrides -O* with -Og that is not what we want +QT5BASE_CONFIGURE_OPTS += -no-optimize-debug +endif + ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y) QT5BASE_DEPENDENCIES += pcre else
Signature · 1 line
2.17.1
PATCH 1/4 package/qt5/qt5base: disable predefined -Og optimization
Quoted 6 lines · On Tue, 18 Jun 2019 10:45:32 +0200 Giulio Benetti…
Starting from Qt5 5.9.0 -optimize-debug is enabled by default 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 toQT5BASE_CONFIGURE_OPTSif QT5_VERSION_LATEST=y.Signed-off-by Giulio Benetti <[email protected]>
In fact, optimize-debug is only enabled for debug builds, so I adjusted the commit log and comment and applied. It would be good to check if optimize-size is automatically enabled (or not) for release builds, and see if we should -no-optimize-size as well.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/4 package/qt5/qt5base: disable predefined -Og optimization
Hello Thomas,
Il 22/06/2019 20:54, Thomas Petazzoni ha scritto:
Quoted 8 lines
Quoted 5 lines · On Tue, 18 Jun 2019 10:45:32 +0200 Giulio Benetti…
Starting from Qt5 5.9.0 -optimize-debug is enabled by default 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 toQT5BASE_CONFIGURE_OPTSif QT5_VERSION_LATEST=y.
Quoted 6 lines
Quoted 1 line
Signed-off-by Giulio Benetti <[email protected]>In fact, optimize-debug is only enabled for debug builds, so I adjusted the commit log and comment and applied. It would be good to check if optimize-size is automatically enabled (or not) for release builds, and see if we should -no-optimize-size as well.
Fortunately you've pointed me this, in fact qt5 in release mode doesn't build according to TARGET_OPTIMIZATION.
I've just sent a patch for that:
https://patchwork.ozlabs.org/patch/1122817/
Best regards
Signature · 10 lines
Giulio Benetti CTO MICRONOVA SRL Sede: Via A. Niedda 3 - 35010 Vigonza (PD) Tel. 049/8931563 - Fax 049/8931346 Cod.Fiscale - P.IVA 02663420285 Capitale Sociale ? 26.000 i.v. Iscritta al Reg. Imprese di Padova N. 02663420285 Numero R.E.A. 258642
PATCH 2/4 toolchain: bug 90620 has not been fixed in gcc 8.x
In reply to Giulio BenettiGcc bug 90620 appears on gcc 8.x so remove version check dependency and keep only the BR2_microblaze one.
--- toolchain/Config.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
toolchain/Config.in +1 -2
@@ -154,11 +154,10 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_85862 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620 # ICE: in do_output_reload, at reload1.c:7978 on microblaze. -# It's been fixed on Gcc 8.x but reappeared on Gcc 9.x +# It's still not fixed in gcc 9.x config BR2_TOOLCHAIN_HAS_GCC_BUG_90620 bool default y if BR2_microblaze - depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || BR2_TOOLCHAIN_GCC_AT_LEAST_9 config BR2_TOOLCHAIN_HAS_NATIVE_RPC bool
Signature · 1 line
2.17.1
Thomas Petazzoni
AppliedPATCH 2/4 toolchain: bug 90620 has not been fixed in gcc 8.x
Quoted 7 lines · On Tue, 18 Jun 2019 10:45:33 +0200 Giulio Benetti…
Gcc bug 90620 appears on gcc 8.x so remove version check dependency and keep only the
BR2_microblazeone.Signed-off-by Giulio Benetti <[email protected]>--- toolchain/Config.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 3/4 package/qt5/qt5base: work around gcc bug 90620
In reply to Giulio BenettiWith Microblaze Gcc version <= 9.x the build hangs due to gcc bug 90620: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620. The bug shows up when building qt5base with optimization but not when building with -O0. To work around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_90620=y we force using -O0.
Fixes:
http://autobuild.buildroot.net/results/4e5/4e563f5fc38ec681a730a576c5f056bc092db74e/
http://autobuild.buildroot.net/results/348/3482bd950c7ab5608666807a7ab7ea857c767333/
http://autobuild.buildroot.net/results/835/8351e3fbd6a39d05da6a6e7a978329d718dfc109/
--- package/qt5/qt5base/qt5base.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
package/qt5/qt5base/qt5base.mk +10 -2
@@ -33,6 +33,14 @@ ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y) QT5BASE_CONFIGURE_OPTS += -no-optimize-debug endif +QT5BASE_CFLAGS = $(TARGET_CFLAGS) +QT5BASE_CXXFLAGS = $(TARGET_CXXFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y) +QT5BASE_CFLAGS += -O0 +QT5BASE_CXXFLAGS += -O0 +endif + ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y) QT5BASE_DEPENDENCIES += pcre else
@@ -350,8 +358,8 @@ define QT5BASE_CONFIGURE_CMDS -nomake tests \ -device buildroot \ -device-option CROSS_COMPILE="$(TARGET_CROSS)" \ - -device-option BR_COMPILER_CFLAGS="$(TARGET_CFLAGS)" \ - -device-option BR_COMPILER_CXXFLAGS="$(TARGET_CXXFLAGS)" \ + -device-option BR_COMPILER_CFLAGS="$(QT5BASE_CFLAGS)" \ + -device-option BR_COMPILER_CXXFLAGS="$(QT5BASE_CXXFLAGS)" \ $(QT5BASE_CONFIGURE_OPTS) \ ) endef
Signature · 1 line
2.17.1
PATCH 3/4 package/qt5/qt5base: work around gcc bug 90620
Quoted 1 line · On Tue, 18 Jun 2019 10:45:34 +0200 Giulio Benetti…
With Microblaze Gcc version <= 9.x the build hangs due to gcc bug
The build does not hang, but fails. I fixed the commit log, and applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 4/4 package/libtorrent-rasterbar: work around gcc bug 85180
In reply to Giulio BenettiWith Microblaze Gcc version < 8.x the build hangs due to gcc bug 85180: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. The bug shows up when building libtorrent-rasterbar with optimization but not when building with -O0. To work around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y we force using -O0.
Fixes:
http://autobuild.buildroot.net/results/410/410e75676abc6bbabe9029ecda969e3d909f3e18/
--- package/libtorrent-rasterbar/libtorrent-rasterbar.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/libtorrent-rasterbar/libtorrent-rasterbar.mk +4 -0
@@ -21,6 +21,10 @@ ifeq ($(BR2_m68k_cf),y) LIBTORRENT_RASTERBAR_CXXFLAGS += -fno-defer-pop endif +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) +LIBTORRENT_RASTERBAR_CXXFLAGS += -O0 +endif + LIBTORRENT_RASTERBAR_CONF_OPTS += CXXFLAGS="$(LIBTORRENT_RASTERBAR_CXXFLAGS)" ifeq ($(BR2_ENABLE_LOCALE)$(BR2_PACKAGE_LIBICONV),y)
Signature · 1 line
2.17.1
Thomas Petazzoni
AppliedPATCH 4/4 package/libtorrent-rasterbar: work around gcc bug 85180
Quoted 6 lines · On Tue, 18 Jun 2019 10:45:35 +0200 Giulio Benetti…
With Microblaze Gcc version < 8.x the build hangs due to gcc bug 85180: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. The bug shows up when building libtorrent-rasterbar with optimization but not when building with -O0. To work around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y we force using -O0.
Quoted 7 lines
Fixes:
http://autobuild.buildroot.net/results/410/410e75676abc6bbabe9029ecda969e3d909f3e18/Signed-off-by Giulio Benetti <[email protected]>--- package/libtorrent-rasterbar/libtorrent-rasterbar.mk | 4 ++++ 1 file changed, 4 insertions(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com