Skip to contentSkip to conversation

package/ffmpeg: fix fenv build failure on ARCv2 with glibc

PATCH New Bernd Kuhls 3 participants 4 messages Nov 7, 2017 – Nov 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/ffmpeg: fix fenv build failure on ARCv2 with glibc

https://git.buildroot.net/buildroot/commit/toolchain?id=0633eb58a2912328508a76f8fe9875a0d113a880
added glibc support for ARCv2 which lacks fenv.h.

Fixes
http://autobuild.buildroot.net/results/aec/aec300d7d4472421398a24202d6871c965bd1be5/

---
v2: Restricted dependency to BR2_archs38 && BR2_TOOLCHAIN_USES_GLIBC
(Thomas)

 package/ffmpeg/Config.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
package/ffmpeg/Config.in +5 -2
index ed87ddd492..9890a22deb 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
 	bool
-	# fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on nios2
+	# fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on archs38
+	# in combination with glibc and nios2
 	# No support for ARMv7-M in the ARM assembly logic
 	# Microblaze build affected by gcc PR71124 (infinite loop)
 	# m68k coldfire causes a build failure, because the check for
@@ -9,7 +10,9 @@ config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
 	# not. See https://patchwork.ozlabs.org/patch/756664/ and
 	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68467 for more
 	# details.
-	default y if !BR2_nios2 && !BR2_ARM_CPU_ARMV7M && !BR2_microblaze && !BR2_m68k_cf
+	default y if !(BR2_archs38 && BR2_TOOLCHAIN_USES_GLIBC) && \
+		!BR2_nios2 && !BR2_ARM_CPU_ARMV7M && \
+		!BR2_microblaze && !BR2_m68k_cf
 
 menuconfig BR2_PACKAGE_FFMPEG
 	bool "ffmpeg"
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 1/1 package/ffmpeg: fix fenv build failure on ARCv2 with glibc

Hello,

Quoted 7 lines · Bernd Kuhls

https://git.buildroot.net/buildroot/commit/toolchain?id=0633eb58a2912328508a76f8fe9875a0d113a880
added glibc support for ARCv2 which lacks fenv.h.

Fixes
http://autobuild.buildroot.net/results/aec/aec300d7d4472421398a24202d6871c965bd1be5/

Thanks!

Quoted 7 lines
package/ffmpeg/Config.in +2 -1
-	# fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on nios2
+	# fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on archs38
+	# in combination with glibc and nios2
 	# No support for ARMv7-M in the ARM assembly logic
 	# Microblaze build affected by gcc PR71124 (infinite loop)
 	# m68k coldfire causes a build failure, because the check for

package/ffmpeg/Config.in config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS · line 15

Quoted 7 lines
package/ffmpeg/Config.in +3 -1
@@ -9,7 +10,9 @@ config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
 	# not. See https://patchwork.ozlabs.org/patch/756664/ and
 	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68467 for more
 	# details.
-	default y if !BR2_nios2 && !BR2_ARM_CPU_ARMV7M && !BR2_microblaze && !BR2_m68k_cf
+	default y if !(BR2_archs38 && BR2_TOOLCHAIN_USES_GLIBC) && \
+		!BR2_nios2 && !BR2_ARM_CPU_ARMV7M && \
+		!BR2_microblaze && !BR2_m68k_cf

We don't want to fix that now, but this is getting unreadable. Perhaps we could improve that by doing this:

config BR2_PACKAGE_FFMPEG_ARCH_BROKEN
bool
# blabla why
default y if BR2_archs38 && BR2_TOOLCHAIN_USES_GLIBC # blabla why
default y if BR2_nios2
# ...
default y if BR2_ARM_CPU_ARMV7M
# ...
default y if BR2_microblaze
# blabla why
default y if BR2_m68k_cf

config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
bool
default y if !BR2_PACKAGE_FFMPEG_ARCH_BROKEN

It's probably more readable :)

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 package/ffmpeg: fix fenv build failure on ARCv2 with glibc

Quoted 46 lines · Thomas Petazzoni

Hello,

Quoted 7 lines · Bernd Kuhls

https://git.buildroot.net/buildroot/commit/toolchain?id=0633eb58a2912328508a76f8fe9875a0d113a880
added glibc support for ARCv2 which lacks fenv.h.

Fixes
http://autobuild.buildroot.net/results/aec/aec300d7d4472421398a24202d6871c965bd1be5/

Thanks!

Quoted 7 lines
package/ffmpeg/Config.in +2 -1
-	# fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on nios2
+	# fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on archs38
+	# in combination with glibc and nios2
 	# No support for ARMv7-M in the ARM assembly logic
 	# Microblaze build affected by gcc PR71124 (infinite loop)
 	# m68k coldfire causes a build failure, because the check for

package/ffmpeg/Config.in config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS · line 15

Quoted 7 lines
package/ffmpeg/Config.in +3 -1
@@ -9,7 +10,9 @@ config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
 	# not. See https://patchwork.ozlabs.org/patch/756664/ and
 	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68467 for more
 	# details.
-	default y if !BR2_nios2 && !BR2_ARM_CPU_ARMV7M && !BR2_microblaze && !BR2_m68k_cf
+	default y if !(BR2_archs38 && BR2_TOOLCHAIN_USES_GLIBC) && \
+		!BR2_nios2 && !BR2_ARM_CPU_ARMV7M && \
+		!BR2_microblaze && !BR2_m68k_cf

We don't want to fix that now, but this is getting unreadable. Perhaps we could improve that by doing this:

config BR2_PACKAGE_FFMPEG_ARCH_BROKEN
bool
# blabla why
default y if BR2_archs38 && BR2_TOOLCHAIN_USES_GLIBC # blabla why
default y if BR2_nios2
# ...
default y if BR2_ARM_CPU_ARMV7M
# ...
default y if BR2_microblaze
# blabla why
default y if BR2_m68k_cf

Quoted 3 lines

config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
bool
default y if !BR2_PACKAGE_FFMPEG_ARCH_BROKEN

Doesn't this work?

config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
bool
default y
# blabla why
depends on !BR2_archs38 || !BR2_TOOLCHAIN_USES_GLIBC # blabla why
depends on !BR2_nios
...

I believe we use that construct elsewhere...

Regards,
Arnout

Quoted 5 lines

It's probably more readable :)

Thomas

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH v2 1/1 package/ffmpeg: fix fenv build failure on ARCv2 with glibc

Hello,

Quoted 11 lines · Arnout Vandecappelle

Doesn't this work?

config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
bool
default y
# blabla why
depends on !BR2_archs38 || !BR2_TOOLCHAIN_USES_GLIBC # blabla why
depends on !BR2_nios
...

Quoted 1 line

I believe we use that construct elsewhere...

Absolutely. Not sure why I over-engineered the thing, your solution should work perfectly fine.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com