Skip to contentSkip to conversation

Some Nios II and OpenRisc Fixes

PATCH New Giulio Benetti 1 participant 7 messages Mar 7, 2021

lore
Share & tools
lore
#0 lore raw

cover Some Nios II and OpenRisc Fixes

This patchset applies after this:
https://patchwork.ozlabs.org/project/buildroot/list/?series=232409

and fixes build failures on Nios II and OpenRisc.

Giulio Benetti (6):
package/libtheora: disable package if binutils is affected from bug

    21464

package/gnutls: disable package if binutils is affected from bug 21464
toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27100 package/openal: disable package if binutils is affected from bug 27100 package/libcamera: disable package while building for Nios II package/kf5-kcoreaddons: disable package while building for Nios II

 package/gnutls/Config.in              | 4 +++-
 package/kf5/kf5-kcoreaddons/Config.in | 1 +
 package/libcamera/Config.in           | 4 +++-
 package/libtheora/Config.in           | 1 +
 package/openal/Config.in              | 4 +++-
 toolchain/Config.in                   | 6 ++++++
 6 files changed, 17 insertions(+), 3 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/6 package/libtheora: disable package if binutils is affected from bug 21464

This package is affected from binutils bug 21464, since there is no workaround, let's disable it.

Fixes:
http://autobuild.buildroot.net/results/6c8/6c87be004adf03955c832be72c0c59749f311f71/

---
 package/libtheora/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/libtheora/Config.in +1 -0
index eee9e9b1db..18a450ce99 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LIBTHEORA
 	bool "libtheora"
 	select BR2_PACKAGE_LIBOGG
 	select BR2_PACKAGE_LIBVORBIS
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
 	help
 	  A library for the free and open video compression format
 	  "Theora" from the Xiph.org Foundation.
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/6 package/gnutls: disable package if binutils is affected from bug 21464

In reply to Giulio Benetti

This package is affected from binutils bug 21464, since there is no workaround, let's disable it.

Fixes:
http://autobuild.buildroot.net/results/ce9/ce9050a183a3f1e31cefbc4d4a6d780235466e39/

---
 package/gnutls/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/gnutls/Config.in +3 -1
index 15b930b6bd..c4fa729e71 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_GNUTLS
 	# gnulib requires a library that implements wctomb().
 	# This is noticed only when linking with libgnutls.so.
 	depends on BR2_USE_WCHAR
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
 	select BR2_PACKAGE_LIBTASN1
 	select BR2_PACKAGE_NETTLE
 	select BR2_PACKAGE_PCRE
@@ -32,4 +33,5 @@ config BR2_PACKAGE_GNUTLS_TOOLS
 endif
 
 comment "gnutls needs a toolchain w/ wchar, dynamic library"
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS || \
+		   !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/6 toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27100

In reply to Giulio Benetti

On OpenRisc binutils it still present ld bug 27100 leading to a package openal to fail building:
http://autobuild.buildroot.net/results/c05/c053b9e191b31f0b1f8f8c902b602e187f714dc0/

The bug was already reported and it's been updated:
https://sourceware.org/bugzilla/show_bug.cgi?id=27100

---
 toolchain/Config.in | 6 ++++++
 1 file changed, 6 insertions(+)
toolchain/Config.in +6 -0
index b37a44be05..8472d13b85 100644
@@ -87,6 +87,12 @@ config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
 	bool
 	default y if BR2_or1k
 
+# https://sourceware.org/bugzilla/show_bug.cgi?id=27100
+# Affect toolchains built with binutils 2.33.1 (fixed in binutils 2.36)
+config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27100
+	bool
+	default y if BR2_or1k && !BR2_BINUTILS_VERSION_2_36_X
+
 # Atomic types can be:
 #  - never lock-free
 #  - sometimes lock-free
Signature · 1 line
2.25.1
#4 lore raw

PATCH 4/6 package/openal: disable package if binutils is affected from bug 27100

In reply to Giulio Benetti

This package is affected from binutils bug 21464, since there is no workaround, let's disable it.

Fixes:
http://autobuild.buildroot.net/results/c05/c053b9e191b31f0b1f8f8c902b602e187f714dc0/

---
 package/openal/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/openal/Config.in +3 -1
index 6b0e9973db..def95222de 100644
@@ -19,6 +19,7 @@ config BR2_PACKAGE_OPENAL
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11 PR56019
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27100
 	help
 	  OpenAL provides capabilities for playing audio in a virtual
 	  3D environment. Distance attenuation, doppler shift, and
@@ -31,4 +32,5 @@ comment "openal needs a toolchain w/ NPTL, C++, gcc >= 4.9"
 	depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
 	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL \
 		|| !BR2_INSTALL_LIBSTDCPP \
-		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
+		|| !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27100
Signature · 1 line
2.25.1
#5 lore raw

PATCH 5/6 package/libcamera: disable package while building for Nios II

In reply to Giulio Benetti

This package fails to build with Nios II up to gcc version 10.x and no work around has been found. So let's disable it whil building for Nios II.

Fixes:
http://autobuild.buildroot.net/results/8ac/8ac599392f773eecff4773393ef0d0232a22f372/

---
 package/libcamera/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/libcamera/Config.in +3 -1
index b9c243084e..8181c9fe5a 100644
@@ -12,6 +12,7 @@ menuconfig BR2_PACKAGE_LIBCAMERA
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
 	depends on !BR2_STATIC_LIBS # gnutls
 	depends on BR2_USE_WCHAR # gnutls
+	depends on !BR2_nios
 	select BR2_PACKAGE_GNUTLS
 	select BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO if !BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE
 	help
@@ -73,4 +74,5 @@ endif # BR2_PACKAGE_LIBCAMERA
 comment "libcamera needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 7"
 	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR \
+		!BR2_nios2
Signature · 1 line
2.25.1
#6 lore raw

PATCH 6/6 package/kf5-kcoreaddons: disable package while building for Nios II

In reply to Giulio Benetti

This package fails to build with Nios II up to gcc version 10.x and no work around has been found. So let's disable it whil building for Nios II.

Fixes:
http://autobuild.buildroot.net/results/0c1/0c1e7e094b0990970f28cda2be0e3fe7d82ce6a2/

---
 package/kf5/kf5-kcoreaddons/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/kf5/kf5-kcoreaddons/Config.in +1 -0
index 88fda03ee0..0acb68297b 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_KF5_KCOREADDONS
 	bool "kf5-kcoreaddons"
+	depends on !BR2_nios
 	select BR2_PACKAGE_KF5_EXTRA_CMAKE_MODULES
 	select BR2_PACKAGE_QT5TOOLS
 	select BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS
Signature · 1 line
2.25.1