Skip to contentSkip to conversation

package/pixman: backport patch to fix inlining issue

PATCH In review Thomas Petazzoni 4 participants 4 messages Jan 3, 2025 – Jan 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/pixman: backport patch to fix inlining issue

pixman fails to build with -Og or -O3 due to forced inlining statements:

pixman-combine-float.c:370:5: error: inlining failed in call to 'always_inline' 'combine_soft_light_c': function not considered for inlining

The first occurence in the autobuilders is on May 12, 2024, but the problem already existed before as we haven't updated pixman in a long time. Therefore, the issue started occurring because we started testing more random configurations.

Fixes:

https://autobuild.buildroot.org/results/2f3df7961b3181d9eef79893439ae7ebbe4415ad/

---
 ...ne-float.c-fix-inlining-failed-error.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 package/pixman/0003-pixman-combine-float.c-fix-inlining-failed-error.patch
package/pixman/0003-pixman-combine-float.c-fix-inlining-failed-error.patch new file +56 -0
new file mode 100644
index 0000000000..1c4b153fc5
@@ -0,0 +1,56 @@
+From 643f098a3922592c82f3ea19668a1596d92a3e7b Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]>
+Date: Tue, 16 Jul 2024 15:31:16 +0800
+Subject: [PATCH] pixman-combine-float.c: fix inlining failed error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Refer [1], always-inline is not suggested to be used if you have indirect
+calls. so replace force_inline with inline to fix error like:
+In function ‘combine_inner’,
+    inlined from ‘combine_soft_light_ca_float’ at ../pixman/pixman-combine-float.c:655:511:
+../pixman/pixman-combine-float.c:655:211: error: inlining failed in call to ‘always_inline’ ‘combine_soft_light_c’: function not considered for inlining
+
+Test with gcc-9 and gcc-14, both works well
+
+[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115679
+
+Signed-off-by: Changqing Li <[email protected]>
+Upstream: https://gitlab.freedesktop.org/pixman/pixman/-/commit/643f098a3922592c82f3ea19668a1596d92a3e7b
+---
+ pixman/pixman-combine-float.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pixman/pixman-combine-float.c b/pixman/pixman-combine-float.c
+index e1f8030..230164f 100644
+--- a/pixman/pixman-combine-float.c
++++ b/pixman/pixman-combine-float.c
+@@ -261,7 +261,7 @@ get_factor (combine_factor_t factor, float sa, float da)
+ }
+ 
+ #define MAKE_PD_COMBINERS(name, a, b)					\
+-    static float force_inline						\
++    static float							\
+     pd_combine_ ## name (float sa, float s, float da, float d)		\
+     {									\
+ 	const float fa = get_factor (a, sa, da);			\
+@@ -360,13 +360,13 @@ MAKE_PD_COMBINERS (conjoint_xor,		ONE_MINUS_DA_OVER_SA,		ONE_MINUS_SA_OVER_DA)
+  */
+ 
+ #define MAKE_SEPARABLE_PDF_COMBINERS(name)				\
+-    static force_inline float						\
++    static float							\
+     combine_ ## name ## _a (float sa, float s, float da, float d)	\
+     {									\
+ 	return da + sa - da * sa;					\
+     }									\
+     									\
+-    static force_inline float						\
++    static float							\
+     combine_ ## name ## _c (float sa, float s, float da, float d)	\
+     {									\
+ 	float f = (1 - sa) * d + (1 - da) * s;				\
+-- 
+2.47.1
+
Signature · 6 lines
2.47.1

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

PATCH 2/2 package/pixman: bump to version 0.44.2

In version 0.43.0, pixman dropped the autotools build system, and moved to meson, so this package update follows along. Some notes:

- The arm-iwmmxt has no equivalent (in 0.44.2, there's a patch in master re-adding such an option)

- The new mmx, sse2, ssse3 and a64-neon options are handled.

- Patch 0001 is no longer needed as the new build system as a 'tests' option that allows to disable test.

- Patches 0002 and 0003 are dropped as they are all upstream.

This bump was tested with a significant subset of the pixman reverse dependencies:

BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_FOOT=y
BR2_PACKAGE_IGT_GPU_TOOLS=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XSERVER_XORG_SERVER=y
BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBTURBO=y
BR2_PACKAGE_WLROOTS=y
BR2_PACKAGE_WLROOTS_X11=y
BR2_PACKAGE_WLROOTS_XWAYLAND=y
BR2_PACKAGE_QEMU=y
BR2_PACKAGE_QEMU_SYSTEM=y

See test result at:
https://gitlab.com/tpetazzoni/buildroot/-/pipelines/1609533944. Note that the overall pipeline failed because the build of Qemu fails on RISC-V for completely unrelated reasons.

---
test-pkg config:
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_FOOT=y
BR2_PACKAGE_IGT_GPU_TOOLS=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XSERVER_XORG_SERVER=y
BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBTURBO=y
BR2_PACKAGE_WLROOTS=y
BR2_PACKAGE_WLROOTS_X11=y
BR2_PACKAGE_WLROOTS_XWAYLAND=y
BR2_PACKAGE_QEMU=y
BR2_PACKAGE_QEMU_SYSTEM=y

---
 .checkpackageignore                           |   1 -
 package/pixman/0001-Disable-tests.patch       |  29 -----
 ...ust-arm-assembly-for-binutils-change.patch | 108 ------------------
 ...ne-float.c-fix-inlining-failed-error.patch |  56 ---------
 package/pixman/pixman.hash                    |   5 +-
 package/pixman/pixman.mk                      |  54 ++++++---
 6 files changed, 41 insertions(+), 212 deletions(-)
 delete mode 100644 package/pixman/0001-Disable-tests.patch
 delete mode 100644 package/pixman/0002-pixman-Adjust-arm-assembly-for-binutils-change.patch
 delete mode 100644 package/pixman/0003-pixman-combine-float.c-fix-inlining-failed-error.patch
.checkpackageignore +0 -1
index 4ae853c91f..de4eb1922d 100644
@@ -987,7 +987,6 @@ package/pifmrds/0003-Makefile-fix-static-link.patch lib_patch.Upstream
 package/pigpio/S50pigpio Shellcheck lib_sysv.Variables
 package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch lib_patch.Upstream
 package/pistache/0002-src-server-listener.cc-fix-libressl-build.patch lib_patch.Upstream
-package/pixman/0001-Disable-tests.patch lib_patch.Upstream
 package/pkgconf/0001-Only-prefix-with-the-sysroot-a-subset-of-variables.patch lib_patch.Upstream
 package/pkgconf/pkg-config.in Shellcheck
 package/poke/0001-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch lib_patch.Upstream
package/pixman/0001-Disable-tests.patch deleted +0 -29
deleted file mode 100644
index dfadd69a67..0000000000
@@ -1,29 +0,0 @@
-From 9b8132738c364fc3c886e81e7d383aaff80dc867 Mon Sep 17 00:00:00 2001
-From: "Yann E. MORIN" <[email protected]>
-Date: Sat, 5 Dec 2015 12:00:53 +0100
-Subject: [PATCH] Disable tests
-
-Tests are causing build failures on some architectures that are missing
-a proper fenv.h, so just disable them.
-
-Signed-off-by: "Yann E. MORIN" <[email protected]>
-
----
-Status: Buildroot specific, not suitable for upstream in this state.
----
- Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 5137c9e..eae79fd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,4 +1,4 @@
--SUBDIRS = pixman demos test
-+SUBDIRS = pixman demos
- 
- pkgconfigdir=$(libdir)/pkgconfig
- pkgconfig_DATA=pixman-1.pc
--- 
-1.9.1
-
package/pixman/0002-pixman-Adjust-arm-assembly-for-binutils-change.patch deleted +0 -108

108 lines not on this page · raw message

package/pixman/0003-pixman-combine-float.c-fix-inlining-failed-error.patch deleted +0 -56

56 lines not on this page · raw message

package/pixman/pixman.hash +2 -3
index 78407bf048..c49b9c9e76 100644
@@ -1,6 +1,5 @@
-# From https://lists.x.org/archives/xorg-announce/2022-October/003228.html
-sha256  5747d2ec498ad0f1594878cc897ef5eb6c29e91c53b899f7f71b506785fc1376  pixman-0.42.2.tar.xz
-sha512  3476e2676e66756b1af61b1e532cd80c985c191fb7956eb01702b419726cce99e79163b7f287f74f66414680e7396d13c3fee525cd663f12b6ac4877070ff4e8  pixman-0.42.2.tar.xz
+# From https://lists.cairographics.org/archives/cairo/2024-December/029586.html
+sha512  b24907f9a0bf6a9aa3278d31986c562c5f2d68f8c178021497c8648aca9f91e4c6f1ecfacf93eb01ba4f03ce4cfc5970fc40bb0fe6724bac9210fc57da09cba4  pixman-0.44.2.tar.xz
 
 # Locally computed
 sha256  fac9270f0987b96ff4533fca3548c633e02083cbba4a0172a3b149b2e4019793  COPYING
package/pixman/pixman.mk +39 -15

88 lines not on this page · raw message

Signature · 6 lines
2.47.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Thomas Petazzoni
Quoted 10 lines · Thomas Petazzoni

pixman fails to build with -Og or -O3 due to forced inlining statements:

pixman-combine-float.c:370:5: error: inlining failed in call to 'always_inline' 'combine_soft_light_c': function not considered for inlining

The first occurence in the autobuilders is on May 12, 2024, but the problem already existed before as we haven't updated pixman in a long time. Therefore, the issue started occurring because we started testing more random configurations.

Quoted 6 lines

Fixes:

https://autobuild.buildroot.org/results/2f3df7961b3181d9eef79893439ae7ebbe4415ad/

Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
Quoted 11 lines · Julien Olivain
Quoted 10 lines · Thomas Petazzoni

pixman fails to build with -Og or -O3 due to forced inlining statements:

pixman-combine-float.c:370:5: error: inlining failed in call to 'always_inline' 'combine_soft_light_c': function not considered for inlining

The first occurence in the autobuilders is on May 12, 2024, but the problem already existed before as we haven't updated pixman in a long time. Therefore, the issue started occurring because we started testing more random configurations.

Quoted 5 lines
Quoted 5 lines

Fixes:

https://autobuild.buildroot.org/ results/2f3df7961b3181d9eef79893439ae7ebbe4415ad/

Committed to 2024.02.x and 2024.11.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot