* [Buildroot] [PATCH 0/4] Microblaze clean up 2
@ 2019-06-18 8:45 Giulio Benetti
2019-06-18 8:45 ` [Buildroot] [PATCH 1/4] package/qt5/qt5base: disable predefined -Og optimization Giulio Benetti
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Giulio Benetti @ 2019-06-18 8:45 UTC (permalink / raw)
To: buildroot
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(-)
--
2.17.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/4] package/qt5/qt5base: disable predefined -Og optimization
2019-06-18 8:45 [Buildroot] [PATCH 0/4] Microblaze clean up 2 Giulio Benetti
@ 2019-06-18 8:45 ` Giulio Benetti
2019-06-22 18:54 ` Thomas Petazzoni
2019-06-18 8:45 ` [Buildroot] [PATCH 2/4] toolchain: bug 90620 has not been fixed in gcc 8.x Giulio Benetti
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Giulio Benetti @ 2019-06-18 8:45 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/qt5/qt5base/qt5base.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index e4ae120631..c732e766f3 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/4] toolchain: bug 90620 has not been fixed in gcc 8.x
2019-06-18 8:45 [Buildroot] [PATCH 0/4] Microblaze clean up 2 Giulio Benetti
2019-06-18 8:45 ` [Buildroot] [PATCH 1/4] package/qt5/qt5base: disable predefined -Og optimization Giulio Benetti
@ 2019-06-18 8:45 ` Giulio Benetti
2019-06-22 18:54 ` Thomas Petazzoni
2019-06-18 8:45 ` [Buildroot] [PATCH 3/4] package/qt5/qt5base: work around gcc bug 90620 Giulio Benetti
2019-06-18 8:45 ` [Buildroot] [PATCH 4/4] package/libtorrent-rasterbar: work around gcc bug 85180 Giulio Benetti
3 siblings, 1 reply; 10+ messages in thread
From: Giulio Benetti @ 2019-06-18 8:45 UTC (permalink / raw)
To: buildroot
Gcc bug 90620 appears on gcc 8.x so remove version check dependency and
keep only the BR2_microblaze one.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
toolchain/Config.in | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 3f562e8d3c..db3ce3cf24 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/4] package/qt5/qt5base: work around gcc bug 90620
2019-06-18 8:45 [Buildroot] [PATCH 0/4] Microblaze clean up 2 Giulio Benetti
2019-06-18 8:45 ` [Buildroot] [PATCH 1/4] package/qt5/qt5base: disable predefined -Og optimization Giulio Benetti
2019-06-18 8:45 ` [Buildroot] [PATCH 2/4] toolchain: bug 90620 has not been fixed in gcc 8.x Giulio Benetti
@ 2019-06-18 8:45 ` Giulio Benetti
2019-06-22 18:54 ` Thomas Petazzoni
2019-06-18 8:45 ` [Buildroot] [PATCH 4/4] package/libtorrent-rasterbar: work around gcc bug 85180 Giulio Benetti
3 siblings, 1 reply; 10+ messages in thread
From: Giulio Benetti @ 2019-06-18 8:45 UTC (permalink / raw)
To: buildroot
With 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/
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/qt5/qt5base/qt5base.mk | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index c732e766f3..e682ae3c7d 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 4/4] package/libtorrent-rasterbar: work around gcc bug 85180
2019-06-18 8:45 [Buildroot] [PATCH 0/4] Microblaze clean up 2 Giulio Benetti
` (2 preceding siblings ...)
2019-06-18 8:45 ` [Buildroot] [PATCH 3/4] package/qt5/qt5base: work around gcc bug 90620 Giulio Benetti
@ 2019-06-18 8:45 ` Giulio Benetti
2019-06-22 18:54 ` Thomas Petazzoni
3 siblings, 1 reply; 10+ messages in thread
From: Giulio Benetti @ 2019-06-18 8:45 UTC (permalink / raw)
To: buildroot
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.
Fixes:
http://autobuild.buildroot.net/results/410/410e75676abc6bbabe9029ecda969e3d909f3e18/
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/libtorrent-rasterbar/libtorrent-rasterbar.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/libtorrent-rasterbar/libtorrent-rasterbar.mk b/package/libtorrent-rasterbar/libtorrent-rasterbar.mk
index 012e972f1d..1d132382e1 100644
--- a/package/libtorrent-rasterbar/libtorrent-rasterbar.mk
+++ b/package/libtorrent-rasterbar/libtorrent-rasterbar.mk
@@ -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)
--
2.17.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/4] package/qt5/qt5base: disable predefined -Og optimization
2019-06-18 8:45 ` [Buildroot] [PATCH 1/4] package/qt5/qt5base: disable predefined -Og optimization Giulio Benetti
@ 2019-06-22 18:54 ` Thomas Petazzoni
2019-06-26 14:06 ` Giulio Benetti
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2019-06-22 18:54 UTC (permalink / raw)
To: buildroot
On Tue, 18 Jun 2019 10:45:32 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> 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.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
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
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/4] toolchain: bug 90620 has not been fixed in gcc 8.x
2019-06-18 8:45 ` [Buildroot] [PATCH 2/4] toolchain: bug 90620 has not been fixed in gcc 8.x Giulio Benetti
@ 2019-06-22 18:54 ` Thomas Petazzoni
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2019-06-22 18:54 UTC (permalink / raw)
To: buildroot
On Tue, 18 Jun 2019 10:45:33 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> Gcc bug 90620 appears on gcc 8.x so remove version check dependency and
> keep only the BR2_microblaze one.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> toolchain/Config.in | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/4] package/qt5/qt5base: work around gcc bug 90620
2019-06-18 8:45 ` [Buildroot] [PATCH 3/4] package/qt5/qt5base: work around gcc bug 90620 Giulio Benetti
@ 2019-06-22 18:54 ` Thomas Petazzoni
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2019-06-22 18:54 UTC (permalink / raw)
To: buildroot
On Tue, 18 Jun 2019 10:45:34 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> 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
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 4/4] package/libtorrent-rasterbar: work around gcc bug 85180
2019-06-18 8:45 ` [Buildroot] [PATCH 4/4] package/libtorrent-rasterbar: work around gcc bug 85180 Giulio Benetti
@ 2019-06-22 18:54 ` Thomas Petazzoni
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2019-06-22 18:54 UTC (permalink / raw)
To: buildroot
On Tue, 18 Jun 2019 10:45:35 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> 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.
>
> Fixes:
> http://autobuild.buildroot.net/results/410/410e75676abc6bbabe9029ecda969e3d909f3e18/
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/libtorrent-rasterbar/libtorrent-rasterbar.mk | 4 ++++
> 1 file changed, 4 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/4] package/qt5/qt5base: disable predefined -Og optimization
2019-06-22 18:54 ` Thomas Petazzoni
@ 2019-06-26 14:06 ` Giulio Benetti
0 siblings, 0 replies; 10+ messages in thread
From: Giulio Benetti @ 2019-06-26 14:06 UTC (permalink / raw)
To: buildroot
Hello Thomas,
Il 22/06/2019 20:54, Thomas Petazzoni ha scritto:
> On Tue, 18 Jun 2019 10:45:32 +0200
> Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
>
>> 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.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>
> 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
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-06-26 14:06 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-18 8:45 [Buildroot] [PATCH 0/4] Microblaze clean up 2 Giulio Benetti
2019-06-18 8:45 ` [Buildroot] [PATCH 1/4] package/qt5/qt5base: disable predefined -Og optimization Giulio Benetti
2019-06-22 18:54 ` Thomas Petazzoni
2019-06-26 14:06 ` Giulio Benetti
2019-06-18 8:45 ` [Buildroot] [PATCH 2/4] toolchain: bug 90620 has not been fixed in gcc 8.x Giulio Benetti
2019-06-22 18:54 ` Thomas Petazzoni
2019-06-18 8:45 ` [Buildroot] [PATCH 3/4] package/qt5/qt5base: work around gcc bug 90620 Giulio Benetti
2019-06-22 18:54 ` Thomas Petazzoni
2019-06-18 8:45 ` [Buildroot] [PATCH 4/4] package/libtorrent-rasterbar: work around gcc bug 85180 Giulio Benetti
2019-06-22 18:54 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox