* [Buildroot] [PATCH 00/27] Microblaze clean up
@ 2019-06-14 21:03 Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 01/27] package/keyutils: re-enable package on microblaze Giulio Benetti
` (26 more replies)
0 siblings, 27 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
This patch series works around various Gcc bugs and re-enables Microblaze
packages depending on these work-arounds. It also fixes some little build
bugs considered as Gcc bugs and some package has been re-enabled because
its build failure was due to very very old toolchains.
Note that this patchset is not splitted into smaller patchset because of
packages dependencies and it would have been more difficult to understand
the sequence of all the patches.
Giulio Benetti (27):
package/keyutils: re-enable package on microblaze
package/ecryptfs-utils: re-enable package on microblaze
package/libnss: use correct CFLAGS and LDFLAGS
package/libnss: re-enable package on microblaze
package/ecryptfs-utils: remove libnss gcc bug dependency
package/stress-ng: re-enable package on microblaze
package/bullet: re-enable package when gcc bug 85180 is present
package/boost: allow building on microblaze
package/boost: work around gcc bug 85180 for boost-fiber option
package/snort: work around gcc bug 85180
package/prboom: avoid using hardcoded optimization flags
package/prboom: work around gcc bug 85180
package/kmsxx: work around gcc bug 85180
package/gpsd: use common BR2_TOOLCHAIN_HAS_GCC_BUG_68485
package/flann: re-enable package on microblaze
package/libspatialindex: use common BR2_TOOLCHAIN_HAS_BUG_68485
package/lua-cqueues: fix build failure due to Gcc Bug 68485
toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_63261
package/fxload: re-enable package on microblaze
package/dmalloc: re-enable package on microblaze
toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620
package/haproxy: re-enable package on microblaze
package/tvheadend: fix PIE build failures
package/tvheadend: re-enable package on microblaze
package/qt5/qt5webengine: re-enable building if BUG_85682=y on Qt5
Latest
package/sqlite: work around build timeout
package/flashbench: remove old toolchain microblaze & sh2a workaround
package/boost/Config.in | 6 ++--
package/boost/boost.mk | 4 +++
package/bullet/Config.in | 4 ---
package/bullet/bullet.mk | 4 +++
package/dmalloc/Config.in | 4 ---
package/dmalloc/dmalloc.mk | 4 +++
package/ecryptfs-utils/Config.in | 6 ----
package/flann/Config.in | 4 ---
package/flann/flann.mk | 4 +++
package/flashbench/flashbench.mk | 9 +----
package/fxload/Config.in | 4 ---
package/fxload/fxload.mk | 9 ++++-
package/gpsd/gpsd.mk | 5 +--
package/haproxy/Config.in | 2 --
package/haproxy/haproxy.mk | 9 ++++-
package/keyutils/Config.in | 2 --
package/kmsxx/kmsxx.mk | 8 +++++
package/libnss/Config.in | 4 ---
package/libnss/libnss.mk | 16 +++++++--
package/libspatialindex/libspatialindex.mk | 4 +--
package/lua-cqueues/lua-cqueues.mk | 9 ++++-
package/prboom/prboom.mk | 15 ++++++++
package/qt5/qt5webengine/Config.in | 6 ----
package/snort/snort.mk | 4 +++
package/sqlite/sqlite.mk | 6 ++++
package/stress-ng/Config.in | 3 +-
...pie-linking-according-to-disable-pie.patch | 34 +++++++++++++++++++
package/tvheadend/Config.in | 2 --
package/tvheadend/tvheadend.mk | 4 +++
toolchain/Config.in | 15 ++++++++
30 files changed, 147 insertions(+), 63 deletions(-)
create mode 100644 package/tvheadend/0002-Makefile-fix-pie-linking-according-to-disable-pie.patch
--
2.17.1
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 01/27] package/keyutils: re-enable package on microblaze
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 5:24 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 02/27] package/ecryptfs-utils: " Giulio Benetti
` (25 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
keyutils has a !BR2_microblaze introduced by commit:
https://git.buildroot.net/buildroot/commit/?id=20e0926f4469a3486629cfd6fa7f449f2b659aa8
that points 2 possible build failures:
- "warning: dereferencing type-punned pointer will break strict-aliasing
rules" treated as an error. But this warning is not treated as an
error anymore since -Werror flag is not used after last version bumps
- glibc does not export the resolver symbols resulting in linking
failure. But glibc used was version 2.3.6 that is not used anymore
since. It's been released in 2005.
So re-enable package for Microblaze by removing 'depends on
!BR2_microblaze' from keyutils Config.in
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/keyutils/Config.in | 2 --
1 file changed, 2 deletions(-)
diff --git a/package/keyutils/Config.in b/package/keyutils/Config.in
index 6f0758f473..7813de3799 100644
--- a/package/keyutils/Config.in
+++ b/package/keyutils/Config.in
@@ -1,6 +1,5 @@
config BR2_PACKAGE_KEYUTILS
bool "keyutils"
- depends on !BR2_microblaze
depends on BR2_USE_MMU # fork()
depends on !BR2_STATIC_LIBS # dlopen
help
@@ -10,6 +9,5 @@ config BR2_PACKAGE_KEYUTILS
http://people.redhat.com/~dhowells/keyutils/
comment "keyutils needs a toolchain w/ dynamic library"
- depends on !BR2_microblaze
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 02/27] package/ecryptfs-utils: re-enable package on microblaze
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 01/27] package/keyutils: re-enable package on microblaze Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 03/27] package/libnss: use correct CFLAGS and LDFLAGS Giulio Benetti
` (24 subsequent siblings)
26 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
Package has a keyutils dependency causing build failure on Microblaze,
but keyutils build has been worked around with previous patch, so we can
re-enable package ecryptfs-utils on Microblaze by removing 'depends on
!BR2_microblaze'.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/ecryptfs-utils/Config.in | 2 --
1 file changed, 2 deletions(-)
diff --git a/package/ecryptfs-utils/Config.in b/package/ecryptfs-utils/Config.in
index 6652d33e0e..b589368a6a 100644
--- a/package/ecryptfs-utils/Config.in
+++ b/package/ecryptfs-utils/Config.in
@@ -2,7 +2,6 @@ config BR2_PACKAGE_ECRYPTFS_UTILS
bool "ecryptfs-utils"
depends on BR2_USE_WCHAR # gettext
depends on BR2_USE_MMU # keyutils
- depends on !BR2_microblaze # keyutils
depends on BR2_TOOLCHAIN_HAS_THREADS # libnss -> libnspr
depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnss -> libnspr
depends on !BR2_MIPS_NABI32 # libnss
@@ -31,7 +30,6 @@ config BR2_PACKAGE_ECRYPTFS_UTILS
http://ecryptfs.org
comment "ecryptfs-utils needs a toolchain w/ threads, wchar, dynami library"
- depends on !BR2_microblaze
depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 03/27] package/libnss: use correct CFLAGS and LDFLAGS
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 01/27] package/keyutils: re-enable package on microblaze Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 02/27] package/ecryptfs-utils: " Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 12:33 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 04/27] package/libnss: re-enable package on microblaze Giulio Benetti
` (23 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
Actually libnss is configure with BUILD_OPT=1 that doesn't take into
account TARGET_CFLAGS nor TARGET_LDFLAGS resulting in pre-chosen
optimizations and debugging symbols.
Can't pass TARGET_CFLAGS through CFLAGS or similar otherwise other
iternal libnss will be overwritten(i.e. -fPIC), so prefer to append
TARGET_CFLAGS at the end of Linux.mk as well as TARGET_LDFLAGS according
to internal libnss Makefile system's names. And obviously remove
BUILD_OPT=1 from BUILD_VARS.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/libnss/libnss.mk | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk
index 89d614fe1c..484c79e9da 100644
--- a/package/libnss/libnss.mk
+++ b/package/libnss/libnss.mk
@@ -13,6 +13,14 @@ LIBNSS_DEPENDENCIES = libnspr sqlite zlib
LIBNSS_LICENSE = MPL-2.0
LIBNSS_LICENSE_FILES = nss/COPYING
+# Need to pass down TARGET_CFLAGS and TARGET_LDFLAGS
+define LIBNSS_FIXUP_LINUX_MK
+ echo 'OS_CFLAGS += ${TARGET_CFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
+ echo 'LDFLAGS += ${TARGET_LDFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
+endef
+
+LIBNSS_PRE_CONFIGURE_HOOKS += LIBNSS_FIXUP_LINUX_MK
+
# --gc-sections triggers binutils ld segfault
# https://sourceware.org/bugzilla/show_bug.cgi?id=21180
ifeq ($(BR2_microblaze),y)
@@ -33,7 +41,6 @@ LIBNSS_BUILD_VARS = \
MOZILLA_CLIENT=1 \
NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr \
NSPR_LIB_DIR=$(STAGING_DIR)/usr/lib \
- BUILD_OPT=1 \
NS_USE_GCC=1 \
NSS_DISABLE_GTESTS=1 \
NSS_USE_SYSTEM_SQLITE=1 \
@@ -102,7 +109,6 @@ HOST_LIBNSS_BUILD_VARS = \
MOZILLA_CLIENT=1 \
NSPR_INCLUDE_DIR=$(HOST_DIR)/include/nspr \
NSPR_LIB_DIR=$(HOST_DIR)/lib \
- BUILD_OPT=1 \
NS_USE_GCC=1 \
NSS_DISABLE_GTESTS=1 \
NSS_USE_SYSTEM_SQLITE=1 \
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 04/27] package/libnss: re-enable package on microblaze
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (2 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 03/27] package/libnss: use correct CFLAGS and LDFLAGS Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 12:34 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 05/27] package/ecryptfs-utils: remove libnss gcc bug dependency Giulio Benetti
` (22 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
With Microblaze Gcc version < 8.x the build hangs due to bug 85862:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862
To avoid this, the libnss package has a !BR2_TOOLCHAIN_HAS_GCC_BUG_85862
dependency. However, gcc bug 85862 only triggers when optimization is
enabled, so we can work around the issue by passing -O0, which is what
we do in other Buildroot packages to work around this bug.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/libnss/Config.in | 4 ----
package/libnss/libnss.mk | 8 +++++++-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/package/libnss/Config.in b/package/libnss/Config.in
index 34ddb91dfa..599c9a6536 100644
--- a/package/libnss/Config.in
+++ b/package/libnss/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_LIBNSS
depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr
depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr
depends on !BR2_STATIC_LIBS
- depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85862
select BR2_PACKAGE_LIBNSPR
select BR2_PACKAGE_SQLITE
select BR2_PACKAGE_ZLIB
@@ -19,6 +18,3 @@ config BR2_PACKAGE_LIBNSS
comment "libnss needs a toolchain w/ threads, dynamic library"
depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
-
-comment "libnss needs a toolchain not affected by GCC bug 85862"
- depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85862
diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk
index 484c79e9da..893ff80154 100644
--- a/package/libnss/libnss.mk
+++ b/package/libnss/libnss.mk
@@ -13,9 +13,15 @@ LIBNSS_DEPENDENCIES = libnspr sqlite zlib
LIBNSS_LICENSE = MPL-2.0
LIBNSS_LICENSE_FILES = nss/COPYING
+LIBNSS_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85862),y)
+LIBNSS_CFLAGS += -O0
+endif
+
# Need to pass down TARGET_CFLAGS and TARGET_LDFLAGS
define LIBNSS_FIXUP_LINUX_MK
- echo 'OS_CFLAGS += ${TARGET_CFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
+ echo 'OS_CFLAGS += ${LIBNSS_CFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
echo 'LDFLAGS += ${TARGET_LDFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
endef
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 05/27] package/ecryptfs-utils: remove libnss gcc bug dependency
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (3 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 04/27] package/libnss: re-enable package on microblaze Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 06/27] package/stress-ng: re-enable package on microblaze Giulio Benetti
` (21 subsequent siblings)
26 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
Package libnss has BR2_TOOLCHAIN_HAS_GCC_BUG_85862 dependency and since
ecryptfs-utils depends on libnss it has to have this dependency too. But
libnss has been worked around for Gcc Bug 85862 on previous patch, then
we can remove 'depends on !BR_TOOLCHAIN_HAS_GCC_BUG_85862' and its
comment from Config.in.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/ecryptfs-utils/Config.in | 4 ----
1 file changed, 4 deletions(-)
diff --git a/package/ecryptfs-utils/Config.in b/package/ecryptfs-utils/Config.in
index b589368a6a..68a659d33d 100644
--- a/package/ecryptfs-utils/Config.in
+++ b/package/ecryptfs-utils/Config.in
@@ -6,7 +6,6 @@ config BR2_PACKAGE_ECRYPTFS_UTILS
depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnss -> libnspr
depends on !BR2_MIPS_NABI32 # libnss
depends on !BR2_STATIC_LIBS # libnss, keyutils
- depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85862 # microblaze specific & GCC < 7.x
select BR2_PACKAGE_KEYUTILS
select BR2_PACKAGE_LIBNSS
# runtime dependency only, some scripts are using the
@@ -34,6 +33,3 @@ comment "ecryptfs-utils needs a toolchain w/ threads, wchar, dynami library"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
BR2_STATIC_LIBS
-
-comment "ecryptfs needs a toolchain not affected by GCC bug 85862"
- depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85862 # libnss
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 06/27] package/stress-ng: re-enable package on microblaze
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (4 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 05/27] package/ecryptfs-utils: remove libnss gcc bug dependency Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 12:36 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 07/27] package/bullet: re-enable package when gcc bug 85180 is present Giulio Benetti
` (20 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
Package stress-ng has a dependency to keyutils, but keyutils has been
re-enabled with previous patch. Re-enable package by removing 'depends
on !BR_microblaze' from stress-ng Config.in.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/stress-ng/Config.in | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/package/stress-ng/Config.in b/package/stress-ng/Config.in
index fe92a7eb40..4fcfa3554c 100644
--- a/package/stress-ng/Config.in
+++ b/package/stress-ng/Config.in
@@ -5,7 +5,6 @@ config BR2_PACKAGE_STRESS_NG
depends on !BR2_TOOLCHAIN_USES_MUSL
# perf.c needs PERF_COUNT_HW_REF_CPU_CYCLES
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
- depends on !BR2_microblaze # keyutils
# fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on nios2 and ARC
depends on !BR2_nios2
depends on !BR2_arc
@@ -21,7 +20,7 @@ config BR2_PACKAGE_STRESS_NG
http://kernel.ubuntu.com/~cking/stress-ng/
comment "stress-ng needs a glibc or uClibc toolchain w/ dynamic library, headers >= 3.3"
- depends on !BR2_microblaze && !BR2_nios2 && !BR2_arc
+ depends on !BR2_nios2 && !BR2_arc
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 \
|| BR2_TOOLCHAIN_USES_MUSL
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 07/27] package/bullet: re-enable package when gcc bug 85180 is present
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (5 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 06/27] package/stress-ng: re-enable package on microblaze Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 12:46 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 08/27] package/boost: allow building on microblaze Giulio Benetti
` (19 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 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. This package has
been excluded from building if the toolchain is affected by gcc bug
85180. To be consistent with how we deal with this issue in other
packages, we re-enable the package and instead work around the issue
by building with -O0, since gcc bug 85180 manifests itself only when
optimization is enabled.
To achieve this pass -O0 to CMAKE_CXX_FLAGS in CONF_OPT and remove
'depends on !BR2_microblaze' and its comment if not available from
Config.in.
Note that the comment was talking about gcc bug 68476, but this gcc
bug is a duplicate of 85180. Since all Buildroot packages now use the
reference to gcc bug 85180 and the option is named
BR2_TOOLCHAIN_HAS_GCC_BUG_85180, we use this naming as well for
bullet.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/bullet/Config.in | 4 ----
package/bullet/bullet.mk | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/bullet/Config.in b/package/bullet/Config.in
index d4d69d2c9e..fc285ab33a 100644
--- a/package/bullet/Config.in
+++ b/package/bullet/Config.in
@@ -1,9 +1,6 @@
config BR2_PACKAGE_BULLET
bool "bullet"
depends on BR2_INSTALL_LIBSTDCPP
- # Affected by
- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68476
- depends on !BR2_microblaze
help
Bullet is a Collision Detection and Rigid Body Dynamics
Library.
@@ -12,4 +9,3 @@ config BR2_PACKAGE_BULLET
comment "bullet needs a toolchain w/ C++"
depends on !BR2_INSTALL_LIBSTDCPP
- depends on !BR2_microblaze
diff --git a/package/bullet/bullet.mk b/package/bullet/bullet.mk
index 36aaa157e1..7cde20ee58 100644
--- a/package/bullet/bullet.mk
+++ b/package/bullet/bullet.mk
@@ -23,4 +23,8 @@ else
BULLET_CONF_OPTS += -DBUILD_EXTRAS=OFF
endif
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+BULLET_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0"
+endif
+
$(eval $(cmake-package))
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 08/27] package/boost: allow building on microblaze
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (6 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 07/27] package/bullet: re-enable package when gcc bug 85180 is present Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 15:56 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 09/27] package/boost: work around gcc bug 85180 for boost-fiber option Giulio Benetti
` (18 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
Package boost builds correctly on Microblaze with Gcc 4.9/5/6/7/8/9 so
add 'default y if BR2_microblaze' to
BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/boost/Config.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/boost/Config.in b/package/boost/Config.in
index 4e6bbff6df..783e86dc09 100644
--- a/package/boost/Config.in
+++ b/package/boost/Config.in
@@ -78,6 +78,7 @@ config BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
default y if BR2_mipsel
default y if BR2_powerpc
default y if BR2_x86_64
+ default y if BR2_microblaze
config BR2_PACKAGE_BOOST_CONTEXT
bool "boost-context"
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 09/27] package/boost: work around gcc bug 85180 for boost-fiber option
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (7 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 08/27] package/boost: allow building on microblaze Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 15:58 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 10/27] package/snort: work around gcc bug 85180 Giulio Benetti
` (17 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 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 boost with boost-fiber enabled and optimization
but not when building with -O0. To work around this, if
BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y and boost-fiber is selected we force
using -O0.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/boost/Config.in | 5 ++---
package/boost/boost.mk | 4 ++++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/package/boost/Config.in b/package/boost/Config.in
index 783e86dc09..88b964847f 100644
--- a/package/boost/Config.in
+++ b/package/boost/Config.in
@@ -137,7 +137,6 @@ config BR2_PACKAGE_BOOST_FIBER
# since mips32r2/mips64r2.
depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context
- depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180
select BR2_PACKAGE_BOOST_CONTEXT
select BR2_PACKAGE_BOOST_FILESYSTEM
select BR2_PACKAGE_BOOST_SYSTEM
@@ -148,9 +147,9 @@ comment "boost-fiber needs a toolchain w/ NPTL"
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
-comment "boost-fiber needs a toolchain not affected by GCC bug 64735, 85180"
+comment "boost-fiber needs a toolchain not affected by GCC bug 64735"
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
- depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || BR2_TOOLCHAIN_HAS_GCC_BUG_85180
+ depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
config BR2_PACKAGE_BOOST_FILESYSTEM
bool "boost-filesystem"
diff --git a/package/boost/boost.mk b/package/boost/boost.mk
index a2d8395fd4..04869ed685 100644
--- a/package/boost/boost.mk
+++ b/package/boost/boost.mk
@@ -50,6 +50,10 @@ BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_WAVE),,wave)
BOOST_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+BOOST_TARGET_CXXFLAGS += -O0
+endif
+
BOOST_FLAGS = --with-toolset=gcc
ifeq ($(BR2_PACKAGE_ICU),y)
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 10/27] package/snort: work around gcc bug 85180
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (8 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 09/27] package/boost: work around gcc bug 85180 for boost-fiber option Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 16:00 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 11/27] package/prboom: avoid using hardcoded optimization flags Giulio Benetti
` (16 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 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 snort 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/d24/d2412710f6cfbfc069e7858e507e28555baafa3e/
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/snort/snort.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/snort/snort.mk b/package/snort/snort.mk
index c767d7c545..191ef673d7 100644
--- a/package/snort/snort.mk
+++ b/package/snort/snort.mk
@@ -20,6 +20,10 @@ SNORT_CONF_OPTS = \
--with-libpcap-includes=$(STAGING_DIR)/usr/include/pcap \
--disable-static-daq
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+SNORT_CFLAGS += -O0
+endif
+
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
SNORT_DEPENDENCIES += libtirpc host-pkgconf
SNORT_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 11/27] package/prboom: avoid using hardcoded optimization flags
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (9 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 10/27] package/snort: work around gcc bug 85180 Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 19:37 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 12/27] package/prboom: work around gcc bug 85180 Giulio Benetti
` (15 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
Package prboom builds using -O2 flag ignoring Buildroot settings, this
is due to the fact that -O2 is appended at the end of CFLAGS.
Remove -O2 from 'configure' file, this way CFLAGS will contain Buildroot
CFLAGS.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/prboom/prboom.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/prboom/prboom.mk b/package/prboom/prboom.mk
index d370ae3fa5..6d9b55e9f6 100644
--- a/package/prboom/prboom.mk
+++ b/package/prboom/prboom.mk
@@ -11,6 +11,13 @@ PRBOOM_DEPENDENCIES = sdl sdl_net sdl_mixer
PRBOOM_LICENSE = GPL-2.0+
PRBOOM_LICENSE_FILES = COPYING
+# Remove imposed -O2 CFLAG to use TARGET_CFLAGS
+define PRBOOM_FIXUP_CONFIGURE
+ sed -i 's:-O2::g' $(@D)/configure
+endef
+
+PRBOOM_PRE_CONFIGURE_HOOKS += PRBOOM_FIXUP_CONFIGURE
+
ifeq ($(BR2_PACKAGE_LIBPNG),y)
PRBOOM_DEPENDENCIES += libpng
endif
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 12/27] package/prboom: work around gcc bug 85180
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (10 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 11/27] package/prboom: avoid using hardcoded optimization flags Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 13/27] package/kmsxx: " Giulio Benetti
` (14 subsequent siblings)
26 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 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 prboom 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/e72/e72a2070ab7e9a093c3c70002ee94ee57a6154f6/
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/prboom/prboom.mk | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/package/prboom/prboom.mk b/package/prboom/prboom.mk
index 6d9b55e9f6..1ba8d968ab 100644
--- a/package/prboom/prboom.mk
+++ b/package/prboom/prboom.mk
@@ -18,6 +18,14 @@ endef
PRBOOM_PRE_CONFIGURE_HOOKS += PRBOOM_FIXUP_CONFIGURE
+PRBOOM_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+PRBOOM_CFLAGS += -O0
+endif
+
+PRBOOM_CONF_ENV += CFLAGS="$(PRBOOM_CFLAGS)"
+
ifeq ($(BR2_PACKAGE_LIBPNG),y)
PRBOOM_DEPENDENCIES += libpng
endif
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 13/27] package/kmsxx: work around gcc bug 85180
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (11 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 12/27] package/prboom: work around gcc bug 85180 Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 19:42 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 14/27] package/gpsd: use common BR2_TOOLCHAIN_HAS_GCC_BUG_68485 Giulio Benetti
` (13 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 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 kmsxx 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/360/360f19645e76314048c75424bb4b64da91742f47/
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/kmsxx/kmsxx.mk | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/package/kmsxx/kmsxx.mk b/package/kmsxx/kmsxx.mk
index c664d52361..829beb1d68 100644
--- a/package/kmsxx/kmsxx.mk
+++ b/package/kmsxx/kmsxx.mk
@@ -12,6 +12,14 @@ KMSXX_INSTALL_STAGING = YES
KMSXX_DEPENDENCIES = libdrm host-pkgconf
KMSXX_CONF_OPTS = -DKMSXX_ENABLE_PYTHON=OFF
+KMSXX_CXXFLAGS = $(TARGET_CXXFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+KMSXX_CXXFLAGS += -O0
+endif
+
+KMSXX_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(KMSXX_CXXFLAGS)"
+
ifeq ($(BR2_PACKAGE_KMSXX_INSTALL_TESTS),y)
KMSXX_TESTS = \
fbtest kmsblank kmscapture \
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 14/27] package/gpsd: use common BR2_TOOLCHAIN_HAS_GCC_BUG_68485
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (12 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 13/27] package/kmsxx: " Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 19:49 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 15/27] package/flann: re-enable package on microblaze Giulio Benetti
` (12 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
Workaround for Gcc ICE works ok, but it's issued if BR2_microblaze=y
with a local comment. Let's use BR2_TOOLCHAIN_HAS_GCC_BUG_68485 instead
to avoid repeating ICE bug comment for every package affected from it.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/gpsd/gpsd.mk | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
index 16d919450f..a0853dbfd8 100644
--- a/package/gpsd/gpsd.mk
+++ b/package/gpsd/gpsd.mk
@@ -42,10 +42,7 @@ else
GPSD_SCONS_OPTS += libgpsmm=no
endif
-# prevents from triggering GCC ICE
-# A bug was reported to the gcc bug tracker:
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
-ifeq ($(BR2_microblaze),y)
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
GPSD_CFLAGS += -O0
endif
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 15/27] package/flann: re-enable package on microblaze
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (13 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 14/27] package/gpsd: use common BR2_TOOLCHAIN_HAS_GCC_BUG_68485 Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 19:53 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 16/27] package/libspatialindex: use common BR2_TOOLCHAIN_HAS_BUG_68485 Giulio Benetti
` (11 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
With Microblaze Gcc version <= 9.x build fails tue to bug 68485:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. To avoid this, the
flann package has a !BR2_microblaze dependency. However, gcc bug 68485
only triggers when optimization is enabled, so we can work around the
issue by passing -O0, which is what we do in other Buildroot packages to
work around this bug.
So, this commit passes -O0 when BR2_TOOLCHAIN_HAS_GCC_BUG_68485, and
re-enables flann on Microblaze.
Note that the comment was talking about gcc bug 69401, but this gcc
bug is a duplicate of 68485. Since all Buildroot packages now use the
reference to gcc bug 68485 and the option is named
BR2_TOOLCHAIN_HAS_GCC_BUG_68485, we use this naming as well for
flann.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/flann/Config.in | 4 ----
package/flann/flann.mk | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/flann/Config.in b/package/flann/Config.in
index a2cd50c867..3725fc784f 100644
--- a/package/flann/Config.in
+++ b/package/flann/Config.in
@@ -2,9 +2,6 @@ config BR2_PACKAGE_FLANN
bool "flann"
depends on BR2_INSTALL_LIBSTDCPP
depends on !BR2_STATIC_LIBS
- # all gcc versions fail to build flann on Microblaze due to
- # gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69401
- depends on !BR2_microblaze
help
FLANN is a library for performing fast approximate nearest
neighbor searches in high dimensional spaces. It contains a
@@ -25,5 +22,4 @@ config BR2_PACKAGE_FLANN_EXAMPLES
endif
comment "flann needs a toolchain w/ C++, dynamic library"
- depends on !BR2_microblaze
depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS
diff --git a/package/flann/flann.mk b/package/flann/flann.mk
index d091ec18a0..b57a6d5f9b 100644
--- a/package/flann/flann.mk
+++ b/package/flann/flann.mk
@@ -18,4 +18,8 @@ FLANN_CONF_OPTS = \
-DPYTHON_EXECUTABLE=OFF \
-DCMAKE_DISABLE_FIND_PACKAGE_HDF5=TRUE
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+FLANN_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0"
+endif
+
$(eval $(cmake-package))
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 16/27] package/libspatialindex: use common BR2_TOOLCHAIN_HAS_BUG_68485
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (14 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 15/27] package/flann: re-enable package on microblaze Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 19:54 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 17/27] package/lua-cqueues: fix build failure due to Gcc Bug 68485 Giulio Benetti
` (10 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
For consistency with the rest of packages let's use common
BR2_TOOLCHAIN_HAS_BUG_68485 instead of !BR2_microblaze condition with
comment on top of it.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/libspatialindex/libspatialindex.mk | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/package/libspatialindex/libspatialindex.mk b/package/libspatialindex/libspatialindex.mk
index 3a558dfc7e..8dd85e2700 100644
--- a/package/libspatialindex/libspatialindex.mk
+++ b/package/libspatialindex/libspatialindex.mk
@@ -17,9 +17,7 @@ LIBSPATIALINDEX_AUTORECONF = YES
LIBSPATIALINDEX_CXXFLAGS = $(TARGET_CXXFLAGS)
LIBSPATIALINDEX_CONF_ENV = CXXFLAGS="$(LIBSPATIALINDEX_CXXFLAGS)"
-# Workaround gcc ICE
-# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485)
-ifeq ($(BR2_microblaze),y)
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
LIBSPATIALINDEX_CXXFLAGS += -O0
endif
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 17/27] package/lua-cqueues: fix build failure due to Gcc Bug 68485
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (15 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 16/27] package/libspatialindex: use common BR2_TOOLCHAIN_HAS_BUG_68485 Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-19 19:58 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 18/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_63261 Giulio Benetti
` (9 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
Package lua-cqueues manifests Microblaze Gcc Bug 68485 resulting in a
build failure due to an Internal Compiler Error.
As done for other packages in Buildroot work around this Gcc Bug by
setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_68485=y.
Fixes:
http://autobuild.buildroot.net/results/c35/c35964dda4e2328c2c1f3b2388677b68c5ed461e/
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/lua-cqueues/lua-cqueues.mk | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/package/lua-cqueues/lua-cqueues.mk b/package/lua-cqueues/lua-cqueues.mk
index 4f31c3277f..42dacc1946 100644
--- a/package/lua-cqueues/lua-cqueues.mk
+++ b/package/lua-cqueues/lua-cqueues.mk
@@ -10,8 +10,15 @@ LUA_CQUEUES_LICENSE = MIT
LUA_CQUEUES_LICENSE_FILES = LICENSE
LUA_CQUEUES_DEPENDENCIES = luainterpreter openssl host-m4
+LUA_CQUEUES_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+LUA_CQUEUES_CFLAGS += -O0
+endif
+
define LUA_CQUEUES_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
+ $(TARGET_MAKE_ENV) $(MAKE1) $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(LUA_CQUEUES_CFLAGS)" -C $(@D) \
prefix="$(STAGING_DIR)/usr" all$(LUAINTERPRETER_ABIVER)
endef
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 18/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_63261
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (16 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 17/27] package/lua-cqueues: fix build failure due to Gcc Bug 68485 Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-22 17:53 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 19/27] package/fxload: re-enable package on microblaze Giulio Benetti
` (8 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
GCC hangs while building fxload for the Microblaze Arch using following
defconfig:
'
BR2_microblazeel=y
BR2_OPTIMIZE_2=y
BR2_KERNEL_HEADERS_5_0=y
BR2_GCC_VERSION_7_X=y
BR2_PACKAGE_FXLOAD=y
'
Reported:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261
This bug has been fixed on Gcc 8.x.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
toolchain/Config.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 7726ae6fae..f73a5364fc 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -113,6 +113,13 @@ config BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
depends on !BR2_or1k
depends on !BR2_xtensa
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. This bug no
+# longer exists in gcc 8.x.
+config BR2_TOOLCHAIN_HAS_GCC_BUG_63261
+ bool
+ default y if BR2_microblaze
+ depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8
+
# Prior to gcc 7.x, exception_ptr, nested_exception and future from
# libstdc++ would only be provided on architectures that support
# always lock-free atomic ints. See
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 19/27] package/fxload: re-enable package on microblaze
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (17 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 18/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_63261 Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 20/27] package/dmalloc: " Giulio Benetti
` (7 subsequent siblings)
26 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
With Microblaze Gcc version < 8.x build gives:
'Error: operation combines symbols in different segments'
This is due to bug 63261:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. To avoid this, the
fxload package has a !BR2_microblaze dependency. However, gcc bug
63261 only triggers when optimization is enabled, so we can work
around the issue by passing -O0, which is what we do in other
Buildroot packages to work around this bug.
So, this commit passes -O0 when BR2_TOOLCHAIN_HAS_GCC_BUG_63261, and
re-enables fxload on Microblaze.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/fxload/Config.in | 4 ----
package/fxload/fxload.mk | 9 ++++++++-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/package/fxload/Config.in b/package/fxload/Config.in
index 88cc6d1e5f..f4d6ef54f5 100644
--- a/package/fxload/Config.in
+++ b/package/fxload/Config.in
@@ -1,9 +1,5 @@
config BR2_PACKAGE_FXLOAD
bool "fxload"
- # Hits gcc PR63261 on Microblaze with debugging symbols
- # enabled. Since this package is unlikely to be useful on
- # Microblaze, just disable it on this architecture.
- depends on !BR2_microblaze
help
This program is conveniently able to download firmware into
FX, FX2, and FX2LP EZ-USB devices, as well as the original
diff --git a/package/fxload/fxload.mk b/package/fxload/fxload.mk
index 94b11d0f1e..23c513b1c0 100644
--- a/package/fxload/fxload.mk
+++ b/package/fxload/fxload.mk
@@ -9,8 +9,15 @@ FXLOAD_SITE = http://downloads.sourceforge.net/project/linux-hotplug/fxload/$(FX
FXLOAD_LICENSE = GPL-2.0+
FXLOAD_LICENSE_FILES = COPYING
+FXLOAD_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_63261),y)
+FXLOAD_CFLAGS += -O0
+endif
+
define FXLOAD_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(FXLOAD_CFLAGS)" -C $(@D) all
endef
define FXLOAD_INSTALL_TARGET_CMDS
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 20/27] package/dmalloc: re-enable package on microblaze
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (18 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 19/27] package/fxload: re-enable package on microblaze Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 21/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620 Giulio Benetti
` (6 subsequent siblings)
26 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
With Microblaze Gcc version < 8.x build gives:
'Error: operation combines symbols in different segments'
This is due to bug 63261:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. To avoid this,
the dmalloc package has a !BR2_microblaze dependency. However, gcc bug
63261 only triggers when optimization is enabled, so we can work around
the issue by passing -O0, which is what we do in other Buildroot
packages to work around this bug.
So, this commit passes -O0 when BR2_TOOLCHAIN_HAS_GCC_BUG_63261, and
re-enables dmalloc on Microblaze.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/dmalloc/Config.in | 4 ----
package/dmalloc/dmalloc.mk | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/dmalloc/Config.in b/package/dmalloc/Config.in
index e5be109332..0c01970b04 100644
--- a/package/dmalloc/Config.in
+++ b/package/dmalloc/Config.in
@@ -1,9 +1,5 @@
config BR2_PACKAGE_DMALLOC
bool "dmalloc"
- # On some packages, Microblaze gcc has issues when debugging
- # symbols are enabled: "Error: operation combines symbols in
- # different segments".
- depends on !(BR2_microblaze && BR2_ENABLE_DEBUG)
help
A debug memory allocation library which is a drop in
replacement for the system's malloc, realloc, calloc, free and
diff --git a/package/dmalloc/dmalloc.mk b/package/dmalloc/dmalloc.mk
index 6ebb44c5c0..38b2c02027 100644
--- a/package/dmalloc/dmalloc.mk
+++ b/package/dmalloc/dmalloc.mk
@@ -35,6 +35,10 @@ ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
DMALLOC_CFLAGS += -marm
endif
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_63261),y)
+DMALLOC_CFLAGS += -O0
+endif
+
DMALLOC_CONF_ENV = CFLAGS="$(DMALLOC_CFLAGS)"
define DMALLOC_POST_PATCH
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 21/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (19 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 20/27] package/dmalloc: " Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-20 16:14 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 22/27] package/haproxy: re-enable package on microblaze Giulio Benetti
` (5 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
GCC fails on building haproxy for the Microblaze Arch:
http://autobuild.buildroot.org/results/64706f96db793777de9d3ec63b0a47d776cf33fd/build-end.log
Originally reported for gpsd:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
Fixed on Gcc 8.x but regressed in Gcc 9.x.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
toolchain/Config.in | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/toolchain/Config.in b/toolchain/Config.in
index f73a5364fc..3f562e8d3c 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -152,6 +152,14 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
default y if BR2_microblaze
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
+# 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
+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] 57+ messages in thread
* [Buildroot] [PATCH 22/27] package/haproxy: re-enable package on microblaze
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (20 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 21/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620 Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-20 16:13 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 23/27] package/tvheadend: fix PIE build failures Giulio Benetti
` (4 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
With Microblaze Gcc version < 8.x build gives:
'internal compiler error: in do_output_reload, at reload1.c:7978'
This is due to bug 90620:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620. To avoid this, the
haproxy package has a !BR2_microblaze dependency. However, gcc bug
90620 only triggers when optimization is enabled, so we can work
around the issue by passing -O0, which is what we do in other
Buildroot packages to work around this bug.
So, this commit passes -O0 when BR2_TOOLCHAIN_HAS_GCC_BUG_90620, and
re-enables haproxy on Microblaze.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/haproxy/Config.in | 2 --
package/haproxy/haproxy.mk | 9 ++++++++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/package/haproxy/Config.in b/package/haproxy/Config.in
index 670de5a3ee..db63143a74 100644
--- a/package/haproxy/Config.in
+++ b/package/haproxy/Config.in
@@ -1,8 +1,6 @@
config BR2_PACKAGE_HAPROXY_ARCH_SUPPORTS
bool
default y
- # internal compiler error: in do_output_reload, at reload1.c:7978
- depends on !BR2_microblaze
# src/proto_http.c:6330:1: internal compiler error: Segmentation fault
depends on !BR2_nios2
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040
diff --git a/package/haproxy/haproxy.mk b/package/haproxy/haproxy.mk
index e382f61f8e..fde9d5edc6 100644
--- a/package/haproxy/haproxy.mk
+++ b/package/haproxy/haproxy.mk
@@ -69,9 +69,16 @@ endif
HAPROXY_MAKE_OPTS += ADDLIB="$(HAPROXY_LIBS)"
+HAPROXY_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
+HAPROXY_CFLAGS += -O0
+endif
+
define HAPROXY_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
- $(HAPROXY_MAKE_OPTS) -C $(@D)
+ $(HAPROXY_MAKE_OPTS) CFLAGS="$(HAPROXY_CFLAGS)" \
+ -C $(@D)
endef
define HAPROXY_INSTALL_TARGET_CMDS
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 23/27] package/tvheadend: fix PIE build failures
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (21 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 22/27] package/haproxy: re-enable package on microblaze Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-14 21:28 ` Giulio Benetti
2019-06-20 14:36 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 24/27] package/tvheadend: re-enable package on microblaze Giulio Benetti
` (3 subsequent siblings)
26 siblings, 2 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
Package tvheadend builds using '-pie' linker flag in any case. This
leads to linking failure if toolchain doesn't support 'pie'.
Add patch to fix tvheadend's Makefile bug where '-pie' flag is hardcoded
making it depend on '--disable-pie' as compiler's flags already are
treated.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
...pie-linking-according-to-disable-pie.patch | 34 +++++++++++++++++++
package/tvheadend/tvheadend.mk | 4 +++
2 files changed, 38 insertions(+)
create mode 100644 package/tvheadend/0002-Makefile-fix-pie-linking-according-to-disable-pie.patch
diff --git a/package/tvheadend/0002-Makefile-fix-pie-linking-according-to-disable-pie.patch b/package/tvheadend/0002-Makefile-fix-pie-linking-according-to-disable-pie.patch
new file mode 100644
index 0000000000..385c94b36b
--- /dev/null
+++ b/package/tvheadend/0002-Makefile-fix-pie-linking-according-to-disable-pie.patch
@@ -0,0 +1,34 @@
+From 5cbf08213222cb507d365e6cbda87277f0b8f31e Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@micronovasrl.com>
+Date: Fri, 14 Jun 2019 14:25:08 +0200
+Subject: [PATCH] Makefile: fix -pie linking according to --disable-pie
+
+Only compilation follows './configure --disable-pie', linking instead
+doesn't, because '-pie' flag is passed to LDFLAGS uncoditionally.
+
+So add '-pie' flag only if CONFIG_PIE=yes.
+
+Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
+---
+ Makefile | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 41783b546..4e5a947a3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -62,7 +62,10 @@ LDFLAGS += -ldl -lm
+ else
+ LDFLAGS += -ldl -lpthread -lm
+ endif
+-LDFLAGS += -pie -Wl,-z,now
++ifeq ($(CONFIG_PIE),yes)
++LDFLAGS += -pie
++endif
++LDFLAGS += -Wl,-z,now
+ ifeq ($(CONFIG_LIBICONV),yes)
+ LDFLAGS += -liconv
+ endif
+--
+2.17.1
+
diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk
index e92c111082..b192a33d4a 100644
--- a/package/tvheadend/tvheadend.mk
+++ b/package/tvheadend/tvheadend.mk
@@ -94,6 +94,10 @@ else
TVHEADEND_CONF_OPTS += --disable-pcre
endif
+ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
+TVHEADEND_CONF_OPTS += --disable-pie
+endif
+
TVHEADEND_DEPENDENCIES += dtv-scan-tables
# The tvheadend build system expects the transponder data to be present inside
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 24/27] package/tvheadend: re-enable package on microblaze
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (22 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 23/27] package/tvheadend: fix PIE build failures Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-20 14:36 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 25/27] package/qt5/qt5webengine: re-enable building if BUG_85682=y on Qt5 Latest Giulio Benetti
` (2 subsequent siblings)
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
Package tvheadend has been disabled on microblaze with this commit:
https://git.buildroot.net/buildroot/commit/?id=e1a59357e4dfe8fe9c9119d4b2bc9e4ec36eb3d0
but commit log says that build failure is due to "some assertion
failure in binutils", that is true. But those assertion failures in
binutils are caused by package's Makefile itself that has been fixed by
previous patch. So re-enable package for microblaze.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/tvheadend/Config.in | 2 --
1 file changed, 2 deletions(-)
diff --git a/package/tvheadend/Config.in b/package/tvheadend/Config.in
index 5db644400c..909d955c02 100644
--- a/package/tvheadend/Config.in
+++ b/package/tvheadend/Config.in
@@ -1,12 +1,10 @@
comment "tvheadend needs a toolchain w/ NPTL, headers >= 3.2, dynamic library"
- depends on !BR2_microblazeel
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 || BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_SYNC_4
config BR2_PACKAGE_TVHEADEND
bool "tvheadend"
- depends on !BR2_microblazeel # assertion failure in binutils
depends on !BR2_STATIC_LIBS # dladdr()
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 25/27] package/qt5/qt5webengine: re-enable building if BUG_85682=y on Qt5 Latest
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (23 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 24/27] package/tvheadend: re-enable package on microblaze Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 26/27] package/sqlite: work around build timeout Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 27/27] package/flashbench: remove old toolchain microblaze & sh2a workaround Giulio Benetti
26 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
On Qt5 Latest package qt5webengine depends on package libnss that was
affected by Gcc Bug 85862, but that bug has been worked around on
libnss, so we can now remove 'depends on
!BR2_TOOLCHAIN_HAS_GCC_BUG_85862' as well as '||
BR2_PACKAGE_QT5_VERSION_5_6' that allowed to build qt5 version 5.6 that
doesn't depend on libnss.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/qt5/qt5webengine/Config.in | 6 ------
1 file changed, 6 deletions(-)
diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in
index 744d659567..969582712e 100644
--- a/package/qt5/qt5webengine/Config.in
+++ b/package/qt5/qt5webengine/Config.in
@@ -20,18 +20,12 @@ comment "qt5webengine needs an OpenGL and EGL-capable backend"
depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS
depends on !BR2_PACKAGE_QT5_GL_AVAILABLE || !BR2_PACKAGE_HAS_LIBEGL
-comment "qt5webengine needs a toolchain not affected by GCC bug 85862"
- depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS
- depends on !BR2_PACKAGE_QT5_VERSION_5_6
- depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85862 # libnss
-
config BR2_PACKAGE_QT5WEBENGINE
bool "qt5webengine"
depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_USES_GLIBC # execinfo.h, mallinfo
depends on BR2_HOST_GCC_AT_LEAST_4_8 # qt5base-icu
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # qt5base-icu
- depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85862 || BR2_PACKAGE_QT5_VERSION_5_6 # libnss
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2, libvpx, qt5base-dbus
depends on BR2_USE_WCHAR # libglib2
depends on BR2_PACKAGE_QT5_GL_AVAILABLE # qt5declarative, qt5base-eglfs
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 26/27] package/sqlite: work around build timeout
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (24 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 25/27] package/qt5/qt5webengine: re-enable building if BUG_85682=y on Qt5 Latest Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
2019-06-20 14:42 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 27/27] package/flashbench: remove old toolchain microblaze & sh2a workaround Giulio Benetti
26 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
With Microblaze Gcc version 4.9 build hangs due to a bug discovered for
Gcc 4.9 only. Since Gcc 4.9 is not maintaned anymore it doesn't make
sense to report this bug in Gcc bugzilla and use
BR2_TOOLCHAIN_HAS_GCC_BUG_. So let's check if we're building for
Microblaze with Gcc version < 5.x and work around the bug forcing the
use of -O0.
To reproduce this bug build with following defconfig:
'
BR2_microblazeel=y
BR2_ENABLE_DEBUG=y
BR2_OPTIMIZE_2=y
BR2_KERNEL_HEADERS_5_0=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_GCC_VERSION_4_9_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y
BR2_GCC_ENABLE_LTO=y
BR2_PACKAGE_SQLITE=y
'
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/sqlite/sqlite.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk
index 7e97c966b7..8cfe0af0ed 100644
--- a/package/sqlite/sqlite.mk
+++ b/package/sqlite/sqlite.mk
@@ -39,8 +39,14 @@ ifeq ($(BR2_PACKAGE_SQLITE_NO_SYNC),y)
SQLITE_CFLAGS += -DSQLITE_NO_SYNC
endif
+# Building with Microblaze Gcc 4.9 makes compiling to hang.
+# Work around using -O0
+ifeq ($(BR2_microblaze)$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y)
+SQLITE_CFLAGS += -O0
+else
# fallback to standard -O3 when -Ofast is present to avoid -ffast-math
SQLITE_CFLAGS += $(subst -Ofast,-O3,$(TARGET_CFLAGS))
+endif
SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)"
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 27/27] package/flashbench: remove old toolchain microblaze & sh2a workaround
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
` (25 preceding siblings ...)
2019-06-14 21:03 ` [Buildroot] [PATCH 26/27] package/sqlite: work around build timeout Giulio Benetti
@ 2019-06-14 21:03 ` Giulio Benetti
26 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:03 UTC (permalink / raw)
To: buildroot
The old binary Microblaze and Sh2a toolchains were affected by Glibc
Bug 1228: https://sourceware.org/bugzilla/show_bug.cgi?id=1228 that
has been fixed in 2005, so let's remove actual work around:
'FLASHBENCH_CFLAGS += -std=gnu99' for both BR2_microblaze and BR2_sh2a
and remove local FLASHBENCH_CFLAGS in favour of TARGET_CFLAGS.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
package/flashbench/flashbench.mk | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/package/flashbench/flashbench.mk b/package/flashbench/flashbench.mk
index cbcf9ea2d1..e89a250aa3 100644
--- a/package/flashbench/flashbench.mk
+++ b/package/flashbench/flashbench.mk
@@ -9,16 +9,9 @@ FLASHBENCH_SITE = git://git.linaro.org/people/arnd/flashbench.git
FLASHBENCH_LICENSE = GPL-2.0
FLASHBENCH_LICENSE_FILES = COPYING
-FLASHBENCH_CFLAGS = $(TARGET_CFLAGS)
-
-ifeq ($(BR2_microblaze)$(BR2_sh2a),y)
-# microblaze and sh2a toolchains only provide LLONG_MAX when used with gnu99 dialect
-FLASHBENCH_CFLAGS += -std=gnu99
-endif
-
define FLASHBENCH_BUILD_CMDS
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(FLASHBENCH_CFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) -lrt"
endef
--
2.17.1
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 23/27] package/tvheadend: fix PIE build failures
2019-06-14 21:03 ` [Buildroot] [PATCH 23/27] package/tvheadend: fix PIE build failures Giulio Benetti
@ 2019-06-14 21:28 ` Giulio Benetti
2019-06-20 14:36 ` Thomas Petazzoni
1 sibling, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-14 21:28 UTC (permalink / raw)
To: buildroot
Hello,
Il 14/06/2019 23:03, Giulio Benetti ha scritto:
> Package tvheadend builds using '-pie' linker flag in any case. This
> leads to linking failure if toolchain doesn't support 'pie'.
>
> Add patch to fix tvheadend's Makefile bug where '-pie' flag is hardcoded
> making it depend on '--disable-pie' as compiler's flags already are
> treated.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
Already opened a PR upstream for this patch:
https://github.com/tvheadend/tvheadend/pull/1279
> ...pie-linking-according-to-disable-pie.patch | 34 +++++++++++++++++++
> package/tvheadend/tvheadend.mk | 4 +++
> 2 files changed, 38 insertions(+)
> create mode 100644 package/tvheadend/0002-Makefile-fix-pie-linking-according-to-disable-pie.patch
>
> diff --git a/package/tvheadend/0002-Makefile-fix-pie-linking-according-to-disable-pie.patch b/package/tvheadend/0002-Makefile-fix-pie-linking-according-to-disable-pie.patch
> new file mode 100644
> index 0000000000..385c94b36b
> --- /dev/null
> +++ b/package/tvheadend/0002-Makefile-fix-pie-linking-according-to-disable-pie.patch
> @@ -0,0 +1,34 @@
> +From 5cbf08213222cb507d365e6cbda87277f0b8f31e Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@micronovasrl.com>
> +Date: Fri, 14 Jun 2019 14:25:08 +0200
> +Subject: [PATCH] Makefile: fix -pie linking according to --disable-pie
> +
> +Only compilation follows './configure --disable-pie', linking instead
> +doesn't, because '-pie' flag is passed to LDFLAGS uncoditionally.
> +
> +So add '-pie' flag only if CONFIG_PIE=yes.
> +
> +Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> +---
> + Makefile | 5 ++++-
> + 1 file changed, 4 insertions(+), 1 deletion(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 41783b546..4e5a947a3 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -62,7 +62,10 @@ LDFLAGS += -ldl -lm
> + else
> + LDFLAGS += -ldl -lpthread -lm
> + endif
> +-LDFLAGS += -pie -Wl,-z,now
> ++ifeq ($(CONFIG_PIE),yes)
> ++LDFLAGS += -pie
> ++endif
> ++LDFLAGS += -Wl,-z,now
> + ifeq ($(CONFIG_LIBICONV),yes)
> + LDFLAGS += -liconv
> + endif
> +--
> +2.17.1
> +
> diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk
> index e92c111082..b192a33d4a 100644
> --- a/package/tvheadend/tvheadend.mk
> +++ b/package/tvheadend/tvheadend.mk
> @@ -94,6 +94,10 @@ else
> TVHEADEND_CONF_OPTS += --disable-pcre
> endif
>
> +ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
> +TVHEADEND_CONF_OPTS += --disable-pie
> +endif
> +
> TVHEADEND_DEPENDENCIES += dtv-scan-tables
>
> # The tvheadend build system expects the transponder data to be present inside
>
--
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] 57+ messages in thread
* [Buildroot] [PATCH 01/27] package/keyutils: re-enable package on microblaze
2019-06-14 21:03 ` [Buildroot] [PATCH 01/27] package/keyutils: re-enable package on microblaze Giulio Benetti
@ 2019-06-19 5:24 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 5:24 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:20 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> keyutils has a !BR2_microblaze introduced by commit:
> https://git.buildroot.net/buildroot/commit/?id=20e0926f4469a3486629cfd6fa7f449f2b659aa8
> that points 2 possible build failures:
> - "warning: dereferencing type-punned pointer will break strict-aliasing
> rules" treated as an error. But this warning is not treated as an
> error anymore since -Werror flag is not used after last version bumps
> - glibc does not export the resolver symbols resulting in linking
> failure. But glibc used was version 2.3.6 that is not used anymore
> since. It's been released in 2005.
>
> So re-enable package for Microblaze by removing 'depends on
> !BR2_microblaze' from keyutils Config.in
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/keyutils/Config.in | 2 --
> 1 file changed, 2 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 03/27] package/libnss: use correct CFLAGS and LDFLAGS
2019-06-14 21:03 ` [Buildroot] [PATCH 03/27] package/libnss: use correct CFLAGS and LDFLAGS Giulio Benetti
@ 2019-06-19 12:33 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 12:33 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 14 Jun 2019 23:03:22 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> +# Need to pass down TARGET_CFLAGS and TARGET_LDFLAGS
> +define LIBNSS_FIXUP_LINUX_MK
> + echo 'OS_CFLAGS += ${TARGET_CFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
> + echo 'LDFLAGS += ${TARGET_LDFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
You should use $(...) and not ${...} to reference make variables.
But beyond that, this commit unfortunately breaks the build:
pqg.c: In function ?PQG_VerifyParams?:
pqg.c:1806:27: error: ?type? may be used uninitialized in this function [-Werror=maybe-uninitialized]
if ((vfy->h.len == 1) && (type != FIPS186_1_TYPE)) {
^
In file included from pqg.c:21:0:
secmpi.h:8:8: error: ?hashtype? may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (SECSuccess != (rv = func)) \
^
pqg.c:1624:19: note: ?hashtype? was declared here
HASH_HashType hashtype;
^
cc1: all warnings being treated as errors
And the reason why is because in a BR2_OPTIMIZE_S=y build (the
default), we pass -Os. This -Os is now correctly passed to libnss, but
this is what causes the build failure. Indeed, at -Os, gcc gets those
build failures, but not at -O2.
Could you have a look into this ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 04/27] package/libnss: re-enable package on microblaze
2019-06-14 21:03 ` [Buildroot] [PATCH 04/27] package/libnss: re-enable package on microblaze Giulio Benetti
@ 2019-06-19 12:34 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 12:34 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:23 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk
> index 484c79e9da..893ff80154 100644
> --- a/package/libnss/libnss.mk
> +++ b/package/libnss/libnss.mk
> @@ -13,9 +13,15 @@ LIBNSS_DEPENDENCIES = libnspr sqlite zlib
> LIBNSS_LICENSE = MPL-2.0
> LIBNSS_LICENSE_FILES = nss/COPYING
>
> +LIBNSS_CFLAGS = $(TARGET_CFLAGS)
> +
> +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85862),y)
> +LIBNSS_CFLAGS += -O0
> +endif
> +
> # Need to pass down TARGET_CFLAGS and TARGET_LDFLAGS
> define LIBNSS_FIXUP_LINUX_MK
> - echo 'OS_CFLAGS += ${TARGET_CFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
> + echo 'OS_CFLAGS += ${LIBNSS_CFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
Please use $(...) to reference make variables.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 06/27] package/stress-ng: re-enable package on microblaze
2019-06-14 21:03 ` [Buildroot] [PATCH 06/27] package/stress-ng: re-enable package on microblaze Giulio Benetti
@ 2019-06-19 12:36 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 12:36 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:25 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> Package stress-ng has a dependency to keyutils, but keyutils has been
> re-enabled with previous patch. Re-enable package by removing 'depends
> on !BR_microblaze' from stress-ng Config.in.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/stress-ng/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] 57+ messages in thread
* [Buildroot] [PATCH 07/27] package/bullet: re-enable package when gcc bug 85180 is present
2019-06-14 21:03 ` [Buildroot] [PATCH 07/27] package/bullet: re-enable package when gcc bug 85180 is present Giulio Benetti
@ 2019-06-19 12:46 ` Thomas Petazzoni
2019-06-19 13:17 ` Giulio Benetti
0 siblings, 1 reply; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 12:46 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:26 +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. This package has
> been excluded from building if the toolchain is affected by gcc bug
> 85180. To be consistent with how we deal with this issue in other
> packages, we re-enable the package and instead work around the issue
> by building with -O0, since gcc bug 85180 manifests itself only when
> optimization is enabled.
>
> To achieve this pass -O0 to CMAKE_CXX_FLAGS in CONF_OPT and remove
> 'depends on !BR2_microblaze' and its comment if not available from
> Config.in.
>
> Note that the comment was talking about gcc bug 68476, but this gcc
> bug is a duplicate of 85180. Since all Buildroot packages now use the
> reference to gcc bug 85180 and the option is named
> BR2_TOOLCHAIN_HAS_GCC_BUG_85180, we use this naming as well for
> bullet.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
I've applied after doing one change, see below.
> +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
> +BULLET_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0"
> +endif
Like the previous patch series, I really prefer this:
BULLET_CXXFLAGS = $(TARGET_CXXFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
BULLET_CXXFLAGS += -O0
endif
BULLET_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(BULLET_CXXFLAGS)"
Indeed, it will help avoiding mistakes in the future. So I fixed this
up before applying.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 07/27] package/bullet: re-enable package when gcc bug 85180 is present
2019-06-19 12:46 ` Thomas Petazzoni
@ 2019-06-19 13:17 ` Giulio Benetti
0 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-19 13:17 UTC (permalink / raw)
To: buildroot
Hello Thomas,
Il 19/06/2019 14:46, Thomas Petazzoni ha scritto:
> On Fri, 14 Jun 2019 23:03:26 +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. This package has
>> been excluded from building if the toolchain is affected by gcc bug
>> 85180. To be consistent with how we deal with this issue in other
>> packages, we re-enable the package and instead work around the issue
>> by building with -O0, since gcc bug 85180 manifests itself only when
>> optimization is enabled.
>>
>> To achieve this pass -O0 to CMAKE_CXX_FLAGS in CONF_OPT and remove
>> 'depends on !BR2_microblaze' and its comment if not available from
>> Config.in.
>>
>> Note that the comment was talking about gcc bug 68476, but this gcc
>> bug is a duplicate of 85180. Since all Buildroot packages now use the
>> reference to gcc bug 85180 and the option is named
>> BR2_TOOLCHAIN_HAS_GCC_BUG_85180, we use this naming as well for
>> bullet.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>
> I've applied after doing one change, see below.
>
>> +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
>> +BULLET_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -O0"
>> +endif
>
> Like the previous patch series, I really prefer this:
>
> BULLET_CXXFLAGS = $(TARGET_CXXFLAGS)
>
> ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
> BULLET_CXXFLAGS += -O0
> endif
>
> BULLET_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(BULLET_CXXFLAGS)"
>
> Indeed, it will help avoiding mistakes in the future. So I fixed this
> up before applying.
Oh, right, the latest ones have been done that way.
Anyway I go through entire patchset to re-check it is that way.
Thank you
--
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] 57+ messages in thread
* [Buildroot] [PATCH 08/27] package/boost: allow building on microblaze
2019-06-14 21:03 ` [Buildroot] [PATCH 08/27] package/boost: allow building on microblaze Giulio Benetti
@ 2019-06-19 15:56 ` Thomas Petazzoni
2019-06-20 9:37 ` Giulio Benetti
0 siblings, 1 reply; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 15:56 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 14 Jun 2019 23:03:27 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> Package boost builds correctly on Microblaze with Gcc 4.9/5/6/7/8/9 so
> add 'default y if BR2_microblaze' to
> BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/boost/Config.in | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/boost/Config.in b/package/boost/Config.in
> index 4e6bbff6df..783e86dc09 100644
> --- a/package/boost/Config.in
> +++ b/package/boost/Config.in
> @@ -78,6 +78,7 @@ config BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
> default y if BR2_mipsel
> default y if BR2_powerpc
> default y if BR2_x86_64
> + default y if BR2_microblaze
The commit title is misleading: it's not boost that you allow to build
on Microblaze (this is already possible), but the "context" module of
boost.
However, reading the page
https://www.boost.org/doc/libs/1_70_0/libs/context/doc/html/context/architectures.html,
it doesn't seem like Microblaze is part of the supported architectures.
Below the table, there is a note that says "If the architecture is not
supported but the platform provides ucontext_t, Boost.Context should be
compiled with BOOST_USE_UCONTEXT and b2 property
context-impl=ucontext.".
But we're not passing BOOST_USE_UCONTEXT nor context-impl=ucontext. Is
this happening automatically somehow ?
So overall, I think this needs more research/verification, and I'm not
sure it's really worth the effort. Whoever cares enough about
Microblaze and needs the boost-context module can always work on this.
What do you think ?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 09/27] package/boost: work around gcc bug 85180 for boost-fiber option
2019-06-14 21:03 ` [Buildroot] [PATCH 09/27] package/boost: work around gcc bug 85180 for boost-fiber option Giulio Benetti
@ 2019-06-19 15:58 ` Thomas Petazzoni
2019-06-20 9:39 ` Giulio Benetti
0 siblings, 1 reply; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 15:58 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:28 +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 boost with boost-fiber enabled and optimization
> but not when building with -O0. To work around this, if
> BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y and boost-fiber is selected we force
> using -O0.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/boost/Config.in | 5 ++---
> package/boost/boost.mk | 4 ++++
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/package/boost/Config.in b/package/boost/Config.in
> index 783e86dc09..88b964847f 100644
> --- a/package/boost/Config.in
> +++ b/package/boost/Config.in
> @@ -137,7 +137,6 @@ config BR2_PACKAGE_BOOST_FIBER
> # since mips32r2/mips64r2.
> depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64
> depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context
> - depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180
Since we are probably not going to allow building boost-context on
Microblaze, I think this patch should simply be to remove the
BR2_TOOLCHAIN_HAS_GCC_BUG_85180 dependency. Indeed, this option already
has the BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS dependency that
prevents from being selected on Microblaze.
If we ever add Microblaze to BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS,
and the gcc bug is still there, then we will see build failures and we
can fix them at this point.
> +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
> +BOOST_TARGET_CXXFLAGS += -O0
> +endif
Also, this choice had the drawback that Boost was always built with -O0
on Microblaze, even if the Fiber module was not selected.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 10/27] package/snort: work around gcc bug 85180
2019-06-14 21:03 ` [Buildroot] [PATCH 10/27] package/snort: work around gcc bug 85180 Giulio Benetti
@ 2019-06-19 16:00 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 16:00 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:29 +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 snort 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/d24/d2412710f6cfbfc069e7858e507e28555baafa3e/
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/snort/snort.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] 57+ messages in thread
* [Buildroot] [PATCH 11/27] package/prboom: avoid using hardcoded optimization flags
2019-06-14 21:03 ` [Buildroot] [PATCH 11/27] package/prboom: avoid using hardcoded optimization flags Giulio Benetti
@ 2019-06-19 19:37 ` Thomas Petazzoni
2019-06-20 13:40 ` Giulio Benetti
0 siblings, 1 reply; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 19:37 UTC (permalink / raw)
To: buildroot
Hello Giulio,
On Fri, 14 Jun 2019 23:03:30 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> Package prboom builds using -O2 flag ignoring Buildroot settings, this
> is due to the fact that -O2 is appended at the end of CFLAGS.
>
> Remove -O2 from 'configure' file, this way CFLAGS will contain Buildroot
> CFLAGS.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/prboom/prboom.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/package/prboom/prboom.mk b/package/prboom/prboom.mk
> index d370ae3fa5..6d9b55e9f6 100644
> --- a/package/prboom/prboom.mk
> +++ b/package/prboom/prboom.mk
> @@ -11,6 +11,13 @@ PRBOOM_DEPENDENCIES = sdl sdl_net sdl_mixer
> PRBOOM_LICENSE = GPL-2.0+
> PRBOOM_LICENSE_FILES = COPYING
>
> +# Remove imposed -O2 CFLAG to use TARGET_CFLAGS
> +define PRBOOM_FIXUP_CONFIGURE
> + sed -i 's:-O2::g' $(@D)/configure
> +endef
> +
> +PRBOOM_PRE_CONFIGURE_HOOKS += PRBOOM_FIXUP_CONFIGURE
I am not a big fan of this "blind" sed that replaces every -O2 in the
configure script with nothing.
Patching configure.ac + autoreconf would be nicer, especially since
anyway prboom depends on sdl, and sdl already depends on the autotools
machinery.
However, ideally the configure.ac script should be fixed to *not* add
flags to CFLAGS. CFLAGS is a user variable, the configure script is not
supposed to use it. See
https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html.
But well, fixing the prboom configure.ac is probably too much effort
comparing to the benefits.
So just do a patch that gets rid of the -O2 in the configure.ac, and
that will be good enough.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 13/27] package/kmsxx: work around gcc bug 85180
2019-06-14 21:03 ` [Buildroot] [PATCH 13/27] package/kmsxx: " Giulio Benetti
@ 2019-06-19 19:42 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 19:42 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:32 +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 kmsxx 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/360/360f19645e76314048c75424bb4b64da91742f47/
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/kmsxx/kmsxx.mk | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 14/27] package/gpsd: use common BR2_TOOLCHAIN_HAS_GCC_BUG_68485
2019-06-14 21:03 ` [Buildroot] [PATCH 14/27] package/gpsd: use common BR2_TOOLCHAIN_HAS_GCC_BUG_68485 Giulio Benetti
@ 2019-06-19 19:49 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 19:49 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:33 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> Workaround for Gcc ICE works ok, but it's issued if BR2_microblaze=y
> with a local comment. Let's use BR2_TOOLCHAIN_HAS_GCC_BUG_68485 instead
> to avoid repeating ICE bug comment for every package affected from it.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/gpsd/gpsd.mk | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 15/27] package/flann: re-enable package on microblaze
2019-06-14 21:03 ` [Buildroot] [PATCH 15/27] package/flann: re-enable package on microblaze Giulio Benetti
@ 2019-06-19 19:53 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 19:53 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:34 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> With Microblaze Gcc version <= 9.x build fails tue to bug 68485:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. To avoid this, the
> flann package has a !BR2_microblaze dependency. However, gcc bug 68485
> only triggers when optimization is enabled, so we can work around the
> issue by passing -O0, which is what we do in other Buildroot packages to
> work around this bug.
>
> So, this commit passes -O0 when BR2_TOOLCHAIN_HAS_GCC_BUG_68485, and
> re-enables flann on Microblaze.
>
> Note that the comment was talking about gcc bug 69401, but this gcc
> bug is a duplicate of 68485. Since all Buildroot packages now use the
> reference to gcc bug 68485 and the option is named
> BR2_TOOLCHAIN_HAS_GCC_BUG_68485, we use this naming as well for
> flann.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/flann/Config.in | 4 ----
> package/flann/flann.mk | 4 ++++
> 2 files changed, 4 insertions(+), 4 deletions(-)
I've applied to master, after changing the implementation to use a
FLANN_CXXFLAGS variable.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 16/27] package/libspatialindex: use common BR2_TOOLCHAIN_HAS_BUG_68485
2019-06-14 21:03 ` [Buildroot] [PATCH 16/27] package/libspatialindex: use common BR2_TOOLCHAIN_HAS_BUG_68485 Giulio Benetti
@ 2019-06-19 19:54 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 19:54 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:35 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> For consistency with the rest of packages let's use common
> BR2_TOOLCHAIN_HAS_BUG_68485 instead of !BR2_microblaze condition with
> comment on top of it.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/libspatialindex/libspatialindex.mk | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 17/27] package/lua-cqueues: fix build failure due to Gcc Bug 68485
2019-06-14 21:03 ` [Buildroot] [PATCH 17/27] package/lua-cqueues: fix build failure due to Gcc Bug 68485 Giulio Benetti
@ 2019-06-19 19:58 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-19 19:58 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:36 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> Package lua-cqueues manifests Microblaze Gcc Bug 68485 resulting in a
> build failure due to an Internal Compiler Error.
>
> As done for other packages in Buildroot work around this Gcc Bug by
> setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_68485=y.
>
> Fixes:
> http://autobuild.buildroot.net/results/c35/c35964dda4e2328c2c1f3b2388677b68c5ed461e/
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/lua-cqueues/lua-cqueues.mk | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 08/27] package/boost: allow building on microblaze
2019-06-19 15:56 ` Thomas Petazzoni
@ 2019-06-20 9:37 ` Giulio Benetti
0 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-20 9:37 UTC (permalink / raw)
To: buildroot
Hello Thomas,
Il 19/06/2019 17:56, Thomas Petazzoni ha scritto:
> Hello,
>
> On Fri, 14 Jun 2019 23:03:27 +0200
> Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
>
>> Package boost builds correctly on Microblaze with Gcc 4.9/5/6/7/8/9 so
>> add 'default y if BR2_microblaze' to
>> BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>> ---
>> package/boost/Config.in | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/package/boost/Config.in b/package/boost/Config.in
>> index 4e6bbff6df..783e86dc09 100644
>> --- a/package/boost/Config.in
>> +++ b/package/boost/Config.in
>> @@ -78,6 +78,7 @@ config BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
>> default y if BR2_mipsel
>> default y if BR2_powerpc
>> default y if BR2_x86_64
>> + default y if BR2_microblaze
>
> The commit title is misleading: it's not boost that you allow to build
> on Microblaze (this is already possible), but the "context" module of
> boost.
>
> However, reading the page
> https://www.boost.org/doc/libs/1_70_0/libs/context/doc/html/context/architectures.html,
> it doesn't seem like Microblaze is part of the supported architectures.
>
> Below the table, there is a note that says "If the architecture is not
> supported but the platform provides ucontext_t, Boost.Context should be
> compiled with BOOST_USE_UCONTEXT and b2 property
> context-impl=ucontext.".
>
> But we're not passing BOOST_USE_UCONTEXT nor context-impl=ucontext. Is
> this happening automatically somehow ?
>
> So overall, I think this needs more research/verification, and I'm not
> sure it's really worth the effort. Whoever cares enough about
> Microblaze and needs the boost-context module can always work on this.
Yes, I agree. I drop this patch.
Thank you
--
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] 57+ messages in thread
* [Buildroot] [PATCH 09/27] package/boost: work around gcc bug 85180 for boost-fiber option
2019-06-19 15:58 ` Thomas Petazzoni
@ 2019-06-20 9:39 ` Giulio Benetti
0 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-20 9:39 UTC (permalink / raw)
To: buildroot
Hello Thomas,
Il 19/06/2019 17:58, Thomas Petazzoni ha scritto:
> On Fri, 14 Jun 2019 23:03:28 +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 boost with boost-fiber enabled and optimization
>> but not when building with -O0. To work around this, if
>> BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y and boost-fiber is selected we force
>> using -O0.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>> ---
>> package/boost/Config.in | 5 ++---
>> package/boost/boost.mk | 4 ++++
>> 2 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/package/boost/Config.in b/package/boost/Config.in
>> index 783e86dc09..88b964847f 100644
>> --- a/package/boost/Config.in
>> +++ b/package/boost/Config.in
>> @@ -137,7 +137,6 @@ config BR2_PACKAGE_BOOST_FIBER
>> # since mips32r2/mips64r2.
>> depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64
>> depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context
>> - depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180
>
> Since we are probably not going to allow building boost-context on
> Microblaze, I think this patch should simply be to remove the
> BR2_TOOLCHAIN_HAS_GCC_BUG_85180 dependency. Indeed, this option already
> has the BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS dependency that
> prevents from being selected on Microblaze.
>
> If we ever add Microblaze to BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS,
> and the gcc bug is still there, then we will see build failures and we
> can fix them at this point.
Yes, you're right.
>> +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
>> +BOOST_TARGET_CXXFLAGS += -O0
>> +endif
>
> Also, this choice had the drawback that Boost was always built with -O0
> on Microblaze, even if the Fiber module was not selected.
Oh yes, I've missed that.
Anyway I will only remove BR2_TOOLCHAIN_HAS_GCC_BUG_85180 dependency and
reword.
Thank you!
--
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] 57+ messages in thread
* [Buildroot] [PATCH 11/27] package/prboom: avoid using hardcoded optimization flags
2019-06-19 19:37 ` Thomas Petazzoni
@ 2019-06-20 13:40 ` Giulio Benetti
0 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-20 13:40 UTC (permalink / raw)
To: buildroot
Hello Thomas,
Il 19/06/2019 21:37, Thomas Petazzoni ha scritto:
> Hello Giulio,
>
> On Fri, 14 Jun 2019 23:03:30 +0200
> Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
>
>> Package prboom builds using -O2 flag ignoring Buildroot settings, this
>> is due to the fact that -O2 is appended at the end of CFLAGS.
>>
>> Remove -O2 from 'configure' file, this way CFLAGS will contain Buildroot
>> CFLAGS.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>> ---
>> package/prboom/prboom.mk | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/package/prboom/prboom.mk b/package/prboom/prboom.mk
>> index d370ae3fa5..6d9b55e9f6 100644
>> --- a/package/prboom/prboom.mk
>> +++ b/package/prboom/prboom.mk
>> @@ -11,6 +11,13 @@ PRBOOM_DEPENDENCIES = sdl sdl_net sdl_mixer
>> PRBOOM_LICENSE = GPL-2.0+
>> PRBOOM_LICENSE_FILES = COPYING
>>
>> +# Remove imposed -O2 CFLAG to use TARGET_CFLAGS
>> +define PRBOOM_FIXUP_CONFIGURE
>> + sed -i 's:-O2::g' $(@D)/configure
>> +endef
>> +
>> +PRBOOM_PRE_CONFIGURE_HOOKS += PRBOOM_FIXUP_CONFIGURE
>
> I am not a big fan of this "blind" sed that replaces every -O2 in the
> configure script with nothing.
>
> Patching configure.ac + autoreconf would be nicer, especially since
> anyway prboom depends on sdl, and sdl already depends on the autotools
> machinery.
Yes, it's really cleaner.
> However, ideally the configure.ac script should be fixed to *not* add
> flags to CFLAGS. CFLAGS is a user variable, the configure script is not
> supposed to use it. See
> https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html.
Interesting document.
> But well, fixing the prboom configure.ac is probably too much effort
> comparing to the benefits.
I agree.
> So just do a patch that gets rid of the -O2 in the configure.ac, and
> that will be good enough.
Ok
Thank you
--
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] 57+ messages in thread
* [Buildroot] [PATCH 23/27] package/tvheadend: fix PIE build failures
2019-06-14 21:03 ` [Buildroot] [PATCH 23/27] package/tvheadend: fix PIE build failures Giulio Benetti
2019-06-14 21:28 ` Giulio Benetti
@ 2019-06-20 14:36 ` Thomas Petazzoni
1 sibling, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-20 14:36 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:42 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> Package tvheadend builds using '-pie' linker flag in any case. This
> leads to linking failure if toolchain doesn't support 'pie'.
>
> Add patch to fix tvheadend's Makefile bug where '-pie' flag is hardcoded
> making it depend on '--disable-pie' as compiler's flags already are
> treated.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> ...pie-linking-according-to-disable-pie.patch | 34 +++++++++++++++++++
> package/tvheadend/tvheadend.mk | 4 +++
> 2 files changed, 38 insertions(+)
> create mode 100644 package/tvheadend/0002-Makefile-fix-pie-linking-according-to-disable-pie.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 24/27] package/tvheadend: re-enable package on microblaze
2019-06-14 21:03 ` [Buildroot] [PATCH 24/27] package/tvheadend: re-enable package on microblaze Giulio Benetti
@ 2019-06-20 14:36 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-20 14:36 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:43 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> Package tvheadend has been disabled on microblaze with this commit:
> https://git.buildroot.net/buildroot/commit/?id=e1a59357e4dfe8fe9c9119d4b2bc9e4ec36eb3d0
> but commit log says that build failure is due to "some assertion
> failure in binutils", that is true. But those assertion failures in
> binutils are caused by package's Makefile itself that has been fixed by
> previous patch. So re-enable package for microblaze.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/tvheadend/Config.in | 2 --
> 1 file changed, 2 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 26/27] package/sqlite: work around build timeout
2019-06-14 21:03 ` [Buildroot] [PATCH 26/27] package/sqlite: work around build timeout Giulio Benetti
@ 2019-06-20 14:42 ` Thomas Petazzoni
2019-06-20 14:46 ` Giulio Benetti
0 siblings, 1 reply; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-20 14:42 UTC (permalink / raw)
To: buildroot
Hello Giulio,
On Fri, 14 Jun 2019 23:03:45 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> With Microblaze Gcc version 4.9 build hangs due to a bug discovered for
> Gcc 4.9 only. Since Gcc 4.9 is not maintaned anymore it doesn't make
> sense to report this bug in Gcc bugzilla and use
> BR2_TOOLCHAIN_HAS_GCC_BUG_. So let's check if we're building for
> Microblaze with Gcc version < 5.x and work around the bug forcing the
> use of -O0.
I've applied, but this patch had two issues, which I fixed before
applying. See below.
> +ifeq ($(BR2_microblaze)$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y)
This condition is incorrectly written: the way you wrote it, if the
architecture is *not* Microblaze, but BR2_TOOLCHAIN_GCC_AT_LEAST_5=y,
the condition will evaluate to true.
So basically this condition not only passes -O0 on Microblaze with gcc
< 5.x, but it also passes -O0 on all architectures other than
Microblaze that use gcc >= 5.x. Very bad!
The correct way is:
ifeq ($(BR2_microblaze):$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y:)
This really tests that BR2_microblaze=y and
BR2_TOOLCHAIN_GCC_AT_LEAST_5 is empty.
> +SQLITE_CFLAGS += -O0
Here, you completely leave TARGET_CFLAGS unused, which is not good, as
they were used before (in what is now the else condition).
So I changed to += $(TARGET_CFLAGS) -O0
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 26/27] package/sqlite: work around build timeout
2019-06-20 14:42 ` Thomas Petazzoni
@ 2019-06-20 14:46 ` Giulio Benetti
0 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-20 14:46 UTC (permalink / raw)
To: buildroot
Hello Thomas,
Il 20/06/2019 16:42, Thomas Petazzoni ha scritto:
> Hello Giulio,
>
> On Fri, 14 Jun 2019 23:03:45 +0200
> Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
>
>> With Microblaze Gcc version 4.9 build hangs due to a bug discovered for
>> Gcc 4.9 only. Since Gcc 4.9 is not maintaned anymore it doesn't make
>> sense to report this bug in Gcc bugzilla and use
>> BR2_TOOLCHAIN_HAS_GCC_BUG_. So let's check if we're building for
>> Microblaze with Gcc version < 5.x and work around the bug forcing the
>> use of -O0.
>
> I've applied, but this patch had two issues, which I fixed before
> applying. See below.
>
>> +ifeq ($(BR2_microblaze)$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y)
>
> This condition is incorrectly written: the way you wrote it, if the
> architecture is *not* Microblaze, but BR2_TOOLCHAIN_GCC_AT_LEAST_5=y,
> the condition will evaluate to true.
Oops, I see.
> So basically this condition not only passes -O0 on Microblaze with gcc
> < 5.x, but it also passes -O0 on all architectures other than
> Microblaze that use gcc >= 5.x. Very bad!
Yes, you're right, I didn't think about drawbacks about it honestly.
> The correct way is:
>
> ifeq ($(BR2_microblaze):$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y:)
>
> This really tests that BR2_microblaze=y and
> BR2_TOOLCHAIN_GCC_AT_LEAST_5 is empty.
Ah, thank you! New thing learnt :)
>> +SQLITE_CFLAGS += -O0
>
> Here, you completely leave TARGET_CFLAGS unused, which is not good, as
> they were used before (in what is now the else condition).
>
> So I changed to += $(TARGET_CFLAGS) -O0
Aaaah, again... Thanks for fixing and applying.
--
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] 57+ messages in thread
* [Buildroot] [PATCH 22/27] package/haproxy: re-enable package on microblaze
2019-06-14 21:03 ` [Buildroot] [PATCH 22/27] package/haproxy: re-enable package on microblaze Giulio Benetti
@ 2019-06-20 16:13 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-20 16:13 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:41 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> With Microblaze Gcc version < 8.x build gives:
> 'internal compiler error: in do_output_reload, at reload1.c:7978'
> This is due to bug 90620:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620. To avoid this, the
> haproxy package has a !BR2_microblaze dependency. However, gcc bug
> 90620 only triggers when optimization is enabled, so we can work
> around the issue by passing -O0, which is what we do in other
> Buildroot packages to work around this bug.
>
> So, this commit passes -O0 when BR2_TOOLCHAIN_HAS_GCC_BUG_90620, and
> re-enables haproxy on Microblaze.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> package/haproxy/Config.in | 2 --
> package/haproxy/haproxy.mk | 9 ++++++++-
> 2 files changed, 8 insertions(+), 3 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 21/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620
2019-06-14 21:03 ` [Buildroot] [PATCH 21/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620 Giulio Benetti
@ 2019-06-20 16:14 ` Thomas Petazzoni
2019-06-21 9:22 ` Giulio Benetti
0 siblings, 1 reply; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-20 16:14 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:40 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> GCC fails on building haproxy for the Microblaze Arch:
> http://autobuild.buildroot.org/results/64706f96db793777de9d3ec63b0a47d776cf33fd/build-end.log
>
> Originally reported for gpsd:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
>
> Fixed on Gcc 8.x but regressed in Gcc 9.x.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> toolchain/Config.in | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 21/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620
2019-06-20 16:14 ` Thomas Petazzoni
@ 2019-06-21 9:22 ` Giulio Benetti
2019-06-21 16:51 ` Thomas Petazzoni
0 siblings, 1 reply; 57+ messages in thread
From: Giulio Benetti @ 2019-06-21 9:22 UTC (permalink / raw)
To: buildroot
Hello Thomas,
Il 20/06/2019 18:14, Thomas Petazzoni ha scritto:
> On Fri, 14 Jun 2019 23:03:40 +0200
> Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
>
>> GCC fails on building haproxy for the Microblaze Arch:
>> http://autobuild.buildroot.org/results/64706f96db793777de9d3ec63b0a47d776cf33fd/build-end.log
>>
>> Originally reported for gpsd:
I've just realized that is not originally reported for gpsd and...
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
>>
>> Fixed on Gcc 8.x but regressed in Gcc 9.x.
I've messed up with all these patches, since there is a patch that fixes
this patch:
https://patchwork.ozlabs.org/patch/1117724/
Sorry, but they were a lot of patches and I missed to squash them into
only one.
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
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>> ---
>> toolchain/Config.in | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>
> Applied to master, thanks.
>
> Thomas
>
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 21/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620
2019-06-21 9:22 ` Giulio Benetti
@ 2019-06-21 16:51 ` Thomas Petazzoni
0 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-21 16:51 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 21 Jun 2019 11:22:00 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> >> Originally reported for gpsd:
>
> I've just realized that is not originally reported for gpsd and...
>
> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
> >>
> >> Fixed on Gcc 8.x but regressed in Gcc 9.x.
>
> I've messed up with all these patches, since there is a patch that fixes
> this patch:
> https://patchwork.ozlabs.org/patch/1117724/
>
> Sorry, but they were a lot of patches and I missed to squash them into
> only one.
OK, no worries. Considering the amount of patches and different gcc
bugs/situations, I can certainly understand that the patch series will
need some adjustments/fixes once applied.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 18/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_63261
2019-06-14 21:03 ` [Buildroot] [PATCH 18/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_63261 Giulio Benetti
@ 2019-06-22 17:53 ` Thomas Petazzoni
2019-06-24 9:30 ` Giulio Benetti
0 siblings, 1 reply; 57+ messages in thread
From: Thomas Petazzoni @ 2019-06-22 17:53 UTC (permalink / raw)
To: buildroot
On Fri, 14 Jun 2019 23:03:37 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> GCC hangs while building fxload for the Microblaze Arch using following
So gcc does not "hang", but there is a build failure, which is a bit
different.
I applied this patch as well as 19/27 (fxload) and 20/27 (dmalloc).
However, could you double check if the issue occurs with just
optimization enabled, or only when optimization *and*
BR2_ENABLE_DEBUG=y are enabled?
Indeed, my original gcc bug report said that the problem only occurred
when both are combined.
I applied anyway, because that debugging thing would simply be a
further refinement, so it's not that important.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 57+ messages in thread
* [Buildroot] [PATCH 18/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_63261
2019-06-22 17:53 ` Thomas Petazzoni
@ 2019-06-24 9:30 ` Giulio Benetti
0 siblings, 0 replies; 57+ messages in thread
From: Giulio Benetti @ 2019-06-24 9:30 UTC (permalink / raw)
To: buildroot
Hello Thomas,
Il 22/06/2019 19:53, Thomas Petazzoni ha scritto:
> On Fri, 14 Jun 2019 23:03:37 +0200
> Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
>
>> GCC hangs while building fxload for the Microblaze Arch using following
>
> So gcc does not "hang", but there is a build failure, which is a bit
> different.
Yes, my bad, it fails.
> I applied this patch as well as 19/27 (fxload) and 20/27 (dmalloc).
Thanks
> However, could you double check if the issue occurs with just
> optimization enabled, or only when optimization *and*
> BR2_ENABLE_DEBUG=y are enabled?
I've built both dmalloc and fxload without debugging symbols but fxload
fails on building with Gcc 7 only. So I would keep it as it is.
What do you think?
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
> Indeed, my original gcc bug report said that the problem only occurred
> when both are combined.
>
> I applied anyway, because that debugging thing would simply be a
> further refinement, so it's not that important.
>
> Thomas
>
^ permalink raw reply [flat|nested] 57+ messages in thread
end of thread, other threads:[~2019-06-24 9:30 UTC | newest]
Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-14 21:03 [Buildroot] [PATCH 00/27] Microblaze clean up Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 01/27] package/keyutils: re-enable package on microblaze Giulio Benetti
2019-06-19 5:24 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 02/27] package/ecryptfs-utils: " Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 03/27] package/libnss: use correct CFLAGS and LDFLAGS Giulio Benetti
2019-06-19 12:33 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 04/27] package/libnss: re-enable package on microblaze Giulio Benetti
2019-06-19 12:34 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 05/27] package/ecryptfs-utils: remove libnss gcc bug dependency Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 06/27] package/stress-ng: re-enable package on microblaze Giulio Benetti
2019-06-19 12:36 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 07/27] package/bullet: re-enable package when gcc bug 85180 is present Giulio Benetti
2019-06-19 12:46 ` Thomas Petazzoni
2019-06-19 13:17 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 08/27] package/boost: allow building on microblaze Giulio Benetti
2019-06-19 15:56 ` Thomas Petazzoni
2019-06-20 9:37 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 09/27] package/boost: work around gcc bug 85180 for boost-fiber option Giulio Benetti
2019-06-19 15:58 ` Thomas Petazzoni
2019-06-20 9:39 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 10/27] package/snort: work around gcc bug 85180 Giulio Benetti
2019-06-19 16:00 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 11/27] package/prboom: avoid using hardcoded optimization flags Giulio Benetti
2019-06-19 19:37 ` Thomas Petazzoni
2019-06-20 13:40 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 12/27] package/prboom: work around gcc bug 85180 Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 13/27] package/kmsxx: " Giulio Benetti
2019-06-19 19:42 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 14/27] package/gpsd: use common BR2_TOOLCHAIN_HAS_GCC_BUG_68485 Giulio Benetti
2019-06-19 19:49 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 15/27] package/flann: re-enable package on microblaze Giulio Benetti
2019-06-19 19:53 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 16/27] package/libspatialindex: use common BR2_TOOLCHAIN_HAS_BUG_68485 Giulio Benetti
2019-06-19 19:54 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 17/27] package/lua-cqueues: fix build failure due to Gcc Bug 68485 Giulio Benetti
2019-06-19 19:58 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 18/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_63261 Giulio Benetti
2019-06-22 17:53 ` Thomas Petazzoni
2019-06-24 9:30 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 19/27] package/fxload: re-enable package on microblaze Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 20/27] package/dmalloc: " Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 21/27] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620 Giulio Benetti
2019-06-20 16:14 ` Thomas Petazzoni
2019-06-21 9:22 ` Giulio Benetti
2019-06-21 16:51 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 22/27] package/haproxy: re-enable package on microblaze Giulio Benetti
2019-06-20 16:13 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 23/27] package/tvheadend: fix PIE build failures Giulio Benetti
2019-06-14 21:28 ` Giulio Benetti
2019-06-20 14:36 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 24/27] package/tvheadend: re-enable package on microblaze Giulio Benetti
2019-06-20 14:36 ` Thomas Petazzoni
2019-06-14 21:03 ` [Buildroot] [PATCH 25/27] package/qt5/qt5webengine: re-enable building if BUG_85682=y on Qt5 Latest Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 26/27] package/sqlite: work around build timeout Giulio Benetti
2019-06-20 14:42 ` Thomas Petazzoni
2019-06-20 14:46 ` Giulio Benetti
2019-06-14 21:03 ` [Buildroot] [PATCH 27/27] package/flashbench: remove old toolchain microblaze & sh2a workaround Giulio Benetti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox