Skip to contentSkip to conversation

toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730

PATCH Applied Giulio Benetti 2 participants 4 messages Aug 6, 2023 – Aug 7, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730

libheif package fails to build for the M68K architecture due to a binutils bug that leads to:
Internal error in emit_expr_encoded at dw2gencfi.c:215

Let's add binutils bug to avoid to deal with architectures in packages when a binutils bug arises. Let's instead deal directly with binutils bug number.

It's been reported upstream:
https://sourceware.org/bugzilla/show_bug.cgi?id=30730

---
 toolchain/Config.in | 6 ++++++
 1 file changed, 6 insertions(+)
toolchain/Config.in +6 -0
index 328cd023d1..7c5b52720d 100644
@@ -77,6 +77,12 @@ config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597
 	bool
 	default y if BR2_nios2
 
+# https://sourceware.org/bugzilla/show_bug.cgi?id=30730
+# Affect toolchains built with binutils 2.40, still not fixed.
+config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730
+	bool
+	default y if BR2_m68k_cf
+
 # Atomic types can be:
 #  - never lock-free
 #  - sometimes lock-free
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/libheif: let's use BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730

Let's use binutils bug define instead of architecture checking in packages.

---
 package/kodi-imagedecoder-heif/Config.in | 4 ++--
 package/libheif/Config.in                | 4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)
package/kodi-imagedecoder-heif/Config.in +2 -2
index 7cf2d1ef6e..d0950385a0 100644
@@ -2,7 +2,7 @@ config BR2_PACKAGE_KODI_IMAGEDECODER_HEIF
 	bool "kodi-imagedecoder-heif"
 	depends on BR2_INSTALL_LIBSTDCPP # libde265, libheif, tinyxml2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libde265
-	depends on !BR2_m68k_cf # libheif
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730 # libheif
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # libheif
 	select BR2_PACKAGE_LIBDE265
 	select BR2_PACKAGE_LIBHEIF
@@ -13,6 +13,6 @@ config BR2_PACKAGE_KODI_IMAGEDECODER_HEIF
 	  https://github.com/xbmc/imagedecoder.heif
 
 comment "kodi-imagedecoder-heif needs a toolchain w/ C++, threads, gcc >= 4.8"
-	depends on !BR2_m68k_cf # libheif
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730 # libheif
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
package/libheif/Config.in +1 -3
index d0ea72430e..1310205c41 100644
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_LIBHEIF
 	bool "libheif"
-	# avoid build error
-	# Internal error in emit_expr_encoded at dw2gencfi.c:215
-	depends on !BR2_m68k_cf
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
 	help
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/2] package/libheif: let's use BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730

Quoted 34 lines · On Sun, 6 Aug 2023 23:51:27 +0200 Giulio Benetti…

Let's use binutils bug define instead of architecture checking in packages.

---
 package/kodi-imagedecoder-heif/Config.in | 4 ++--
 package/libheif/Config.in                | 4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)
package/kodi-imagedecoder-heif/Config.in +2 -2
index 7cf2d1ef6e..d0950385a0 100644
@@ -2,7 +2,7 @@ config BR2_PACKAGE_KODI_IMAGEDECODER_HEIF
 	bool "kodi-imagedecoder-heif"
 	depends on BR2_INSTALL_LIBSTDCPP # libde265, libheif, tinyxml2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libde265
-	depends on !BR2_m68k_cf # libheif
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730 # libheif
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # libheif
 	select BR2_PACKAGE_LIBDE265
 	select BR2_PACKAGE_LIBHEIF
@@ -13,6 +13,6 @@ config BR2_PACKAGE_KODI_IMAGEDECODER_HEIF
 	  https://github.com/xbmc/imagedecoder.heif
 
 comment "kodi-imagedecoder-heif needs a toolchain w/ C++, threads, gcc >= 4.8"
-	depends on !BR2_m68k_cf # libheif
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730 # libheif
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
package/libheif/Config.in +0 -0
index d0ea72430e..1310205c41 100644

package/libheif/Config.in line 6

Quoted 9 lines
package/libheif/Config.in +1 -3
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_LIBHEIF
 	bool "libheif"
-	# avoid build error
-	# Internal error in emit_expr_encoded at dw2gencfi.c:215
-	depends on !BR2_m68k_cf
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
 	help

You forgot to update the Config.in comment dependency in libheif/Config.in. Fixed that and applied to master. Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Giulio Benetti
Quoted 8 lines · On Sun, 6 Aug 2023 23:51:26 +0200 Giulio Benetti…

libheif package fails to build for the M68K architecture due to a binutils bug that leads to:
Internal error in emit_expr_encoded at dw2gencfi.c:215

Let's add binutils bug to avoid to deal with architectures in packages when a binutils bug arises. Let's instead deal directly with binutils bug number.

Quoted 7 lines

It's been reported upstream:
https://sourceware.org/bugzilla/show_bug.cgi?id=30730

---
 toolchain/Config.in | 6 ++++++
 1 file changed, 6 insertions(+)

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot