All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/irrlicht: disable bundled libpng NEON support
@ 2020-05-09 20:23 Thomas Petazzoni
  2020-05-10 20:34 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2020-05-09 20:23 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=bf5f4f417a9e6e7eed5ea6a99c26583958890515
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Irrlicht fail to detect properly the NEON support on aarch64 or ARM with NEON FPU support.
While linking an application with libIrrlicht.so, we get an undefined reference to
png_init_filter_functions_neon.
Some files are missing in the libpng bundled in Irrlicht, in particular arm/arm_init.c [1],
so disable NEON support completely.

This can be reproduced by building minetest using this defconfig for aarch64:
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_MINETEST=y
BR2_PACKAGE_MINETEST_CLIENT=y
BR2_PACKAGE_MINETEST_SERVER=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_GLX=y
BR2_PACKAGE_XORG7=y

Or for ARM with NEON FPU support:
BR2_arm=y
BR2_cortex_a15=y
BR2_ARM_FPU_NEON=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_MINETEST=y
BR2_PACKAGE_MINETEST_CLIENT=y
BR2_PACKAGE_MINETEST_SERVER=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_GLX=y
BR2_PACKAGE_XORG7=y

[1] https://github.com/glennrp/libpng/tree/v1.6.37/arm

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/irrlicht/irrlicht.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/irrlicht/irrlicht.mk b/package/irrlicht/irrlicht.mk
index a1e190d98d..bd82815cde 100644
--- a/package/irrlicht/irrlicht.mk
+++ b/package/irrlicht/irrlicht.mk
@@ -38,6 +38,13 @@ ifeq ($(BR2_STATIC_LIBS),)
 IRRLICHT_CONF_OPTS += sharedlib
 endif
 
+# Irrlicht fail to detect properly the NEON support on aarch64 or ARM with NEON FPU support.
+# While linking an application with libIrrlicht.so, we get an undefined reference to
+# png_init_filter_functions_neon.
+# Some files are missing in the libpng bundled in Irrlicht, in particular arm/arm_init.c,
+# so disable NEON support completely.
+IRRLICHT_CONF_OPTS += CPPFLAGS="$(TARGET_CPPFLAGS) -DPNG_ARM_NEON_OPT=0"
+
 define IRRLICHT_BUILD_CMDS
 	$(TARGET_MAKE_ENV)
 		$(MAKE) -C $(@D)/$(IRRLICHT_SUBDIR) $(IRRLICHT_CONF_OPTS)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [git commit] package/irrlicht: disable bundled libpng NEON support
  2020-05-09 20:23 [Buildroot] [git commit] package/irrlicht: disable bundled libpng NEON support Thomas Petazzoni
@ 2020-05-10 20:34 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2020-05-10 20:34 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > commit: https://git.buildroot.net/buildroot/commit/?id=bf5f4f417a9e6e7eed5ea6a99c26583958890515
 > branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

 > Irrlicht fail to detect properly the NEON support on aarch64 or ARM with NEON FPU support.
 > While linking an application with libIrrlicht.so, we get an undefined reference to
 > png_init_filter_functions_neon.
 > Some files are missing in the libpng bundled in Irrlicht, in particular arm/arm_init.c [1],
 > so disable NEON support completely.

 > This can be reproduced by building minetest using this defconfig for aarch64:
 > BR2_aarch64=y
 > BR2_TOOLCHAIN_EXTERNAL=y
 > BR2_PACKAGE_MINETEST=y
 > BR2_PACKAGE_MINETEST_CLIENT=y
 > BR2_PACKAGE_MINETEST_SERVER=y
 > BR2_PACKAGE_MESA3D=y
 > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
 > BR2_PACKAGE_MESA3D_OPENGL_GLX=y
 > BR2_PACKAGE_XORG7=y

 > Or for ARM with NEON FPU support:
 > BR2_arm=y
 > BR2_cortex_a15=y
 > BR2_ARM_FPU_NEON=y
 > BR2_TOOLCHAIN_EXTERNAL=y
 > BR2_PACKAGE_MINETEST=y
 > BR2_PACKAGE_MINETEST_CLIENT=y
 > BR2_PACKAGE_MINETEST_SERVER=y
 > BR2_PACKAGE_MESA3D=y
 > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
 > BR2_PACKAGE_MESA3D_OPENGL_GLX=y
 > BR2_PACKAGE_XORG7=y

 > [1] https://github.com/glennrp/libpng/tree/v1.6.37/arm

 > Signed-off-by: Romain Naour <romain.naour@gmail.com>
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2020.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-10 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 20:23 [Buildroot] [git commit] package/irrlicht: disable bundled libpng NEON support Thomas Petazzoni
2020-05-10 20:34 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.