package/x11r7/xlib_libxshmfence: fix build on riscv32
PATCH v4 1/2 package/x11r7/xlib_libxshmfence: fix build on riscv32
In preparation to revert e39ad96136a8c340b3aea6b036024e28f14584f3, and (partial) 26642e4cc09666110d5105e7867579a0e48cfa09.
xshmfence_futex.h: In function 'sys_futex':
xshmfence_futex.h:58:24: error: 'SYS_futex' undeclared (first use in this function); did you mean 'sys_futex'?
58 | return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
| ^~~~~~~~~
| sys_futexFixes:
- https://gitlab.com/buildroot.org/buildroot/-/commit/e39ad96136a8c340b3aea6b036024e28f14584f3
---
v4: move xlib_libxshmfence to separate patch series
--- ...tex.h-fix-build-on-32-bit-architectu.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 package/x11r7/xlib_libxshmfence/0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch
package/x11r7/xlib_libxshmfence/0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch new file +46 -0
@@ -0,0 +1,46 @@ +From 4fca45a71f08a5bebd12d39c85f49e0b0e4426bf Mon Sep 17 00:00:00 2001 +From: Thomas Devoogdt <[email protected]> +Date: Fri, 5 Apr 2024 10:45:15 +0200 +Subject: [PATCH] src/xshmfence_futex.h: fix build on 32-bit architectures + using 64-bit time_t + +Fix the following build failure on 32-bit architectures using 64-bit +time_t (e.g. riscv32): + +xshmfence_futex.h: In function 'sys_futex': +xshmfence_futex.h:58:24: error: 'SYS_futex' undeclared (first use in this function); did you mean 'sys_futex'? + 58 | return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3); + | ^~~~~~~~~ + | sys_futex + +Similar to: +https://gitlab.freedesktop.org/mesa/mesa/-/commit/7d87478124061915582412ba410759afe863d679 + +Fixes: +https://gitlab.com/buildroot.org/buildroot/-/commit/e39ad96136a8c340b3aea6b036024e28f14584f3 + +Signed-off-by: Thomas Devoogdt <[email protected]> +Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/merge_requests/8> +Upstream: https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/commit/4fca45a71f08a5bebd12d39c85f49e0b0e4426bf +--- + src/xshmfence_futex.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/xshmfence_futex.h b/src/xshmfence_futex.h +index 673ac0e..4476038 100644 +--- a/src/xshmfence_futex.h ++++ b/src/xshmfence_futex.h +@@ -53,6 +53,10 @@ static inline int futex_wait(int32_t *addr, int32_t value) { + #include <sys/time.h> + #include <sys/syscall.h> + ++#ifndef SYS_futex ++#define SYS_futex SYS_futex_time64 ++#endif ++ + static inline long sys_futex(void *addr1, int op, int val1, struct timespec *timeout, void *addr2, int val3) + { + return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3); +-- +2.34.1 +
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 2/2 Revert "package/x11r7/xlib_libxshmfence: disable on riscv32"
This reverts (partial) commit e39ad96136a8c340b3aea6b036024e28f14584f3, and 26642e4cc09666110d5105e7867579a0e48cfa09.
Fixed by 0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch.
---
v4: move xlib_libxshmfence to separate patch series
--- package/mesa3d/Config.in | 6 +++--- package/x11r7/xlib_libxshmfence/Config.in | 3 --- package/x11r7/xserver_xorg-server/Config.in | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-)
package/mesa3d/Config.in +3 -3
@@ -99,7 +99,7 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_CROCUS config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV bool "Gallium Etnaviv driver" - depends on (BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_RISCV_32) || !BR2_PACKAGE_XORG7 # libxshmfence + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER select BR2_PACKAGE_LIBDRM_ETNAVIV help
@@ -135,7 +135,7 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA bool "Gallium lima driver" - depends on (BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_RISCV_32) || !BR2_PACKAGE_XORG7 # libxshmfence + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER help Mesa driver for ARM Mali Utgard GPUs.
@@ -151,7 +151,7 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_PANFROST bool "Gallium panfrost driver" - depends on (BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_RISCV_32) || !BR2_PACKAGE_XORG7 # libxshmfence + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER help Mesa driver for ARM Mali Midgard and Bifrost GPUs.
package/x11r7/xlib_libxshmfence/Config.in +0 -3
@@ -1,8 +1,5 @@ config BR2_PACKAGE_XLIB_LIBXSHMFENCE bool "libxshmfence" - # Due to use of SYS_futex - can be enabled again when upstream - # adds SYS_futex64 as an alternative - depends on !BR2_RISCV_32 depends on BR2_TOOLCHAIN_HAS_SYNC_4 select BR2_PACKAGE_XORGPROTO help
package/x11r7/xserver_xorg-server/Config.in +1 -2
@@ -49,8 +49,7 @@ config BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR depends on BR2_INSTALL_LIBSTDCPP select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_LIBPCIACCESS - select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ - (BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_RISCV_32) + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_TOOLCHAIN_HAS_SYNC_4 help This variant of the X.org server is the full-blown variant, as used by desktop GNU/Linux distributions. The drivers (for
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 12 lines · On Sun, 19 May 2024 11:16:26 +0200 Thomas Devoogdt <[email protected]> wrote:
In preparation to revert
e39ad96136a8c340b3aea6b036024e28f14584f3, and (partial)26642e4cc09666110d5105e7867579a0e48cfa09.
xshmfence_futex.h: In function 'sys_futex':
xshmfence_futex.h:58:24: error: 'SYS_futex' undeclared (first use in this function); did you mean 'sys_futex'?58 | return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3); | ^~~~~~~~~ | sys_futexFixes:
- https://gitlab.com/buildroot.org/buildroot/-/commit/e39ad96136a8c340b3aea6b036024e28f14584f3
Quoted 7 lines
Signed-off-by Thomas Devoogdt <[email protected]>---
v4: movexlib_libxshmfenceto separate patch series--- ...tex.h-fix-build-on-32-bit-architectu.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 package/x11r7/xlib_libxshmfence/0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch
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
Thomas Petazzoni via buildroot
AppliedRe: [Buildroot] [PATCH v4 2/2] Revert "package/x11r7/xlib_libxshmfence: disable on riscv32"
In reply to Thomas DevoogdtQuoted 5 lines · On Sun, 19 May 2024 11:16:27 +0200 Thomas Devoogdt <[email protected]> wrote:
This reverts (partial) commit
e39ad96136a8c340b3aea6b036024e28f14584f3, and26642e4cc09666110d5105e7867579a0e48cfa09.Fixed by 0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch.
Quoted 8 lines
Signed-off-by Thomas Devoogdt <[email protected]>---
v4: movexlib_libxshmfenceto separate patch series--- package/mesa3d/Config.in | 6 +++--- package/x11r7/xlib_libxshmfence/Config.in | 3 --- package/x11r7/xserver_xorg-server/Config.in | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-)
Applied to master after remove a few additional !BR2_RISCV_32 dependencies that were no longer needed thanks to your PATCH 1/2.
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
Quoted 25 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:
Quoted 12 lines · On Sun, 19 May 2024 11:16:26 +0200 Thomas Devoogdt <[email protected]> wrote:
In preparation to revert
e39ad96136a8c340b3aea6b036024e28f14584f3, and (partial)26642e4cc09666110d5105e7867579a0e48cfa09.
xshmfence_futex.h: In function 'sys_futex':
xshmfence_futex.h:58:24: error: 'SYS_futex' undeclared (first use in this function); did you mean 'sys_futex'?
58 | returnsyscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);| ^~~~~~~~~ | sys_futexFixes:
- https://gitlab.com/buildroot.org/buildroot/-/commit/e39ad96136a8c340b3aea6b036024e28f14584f3Quoted 7 lines
Signed-off-by Thomas Devoogdt <[email protected]>---
v4: movexlib_libxshmfenceto separate patch series
---
...tex.h-fix-build-on-32-bit-architectu.patch | 46 +++++++++++++++++++1 file changed, 46 insertions(+)create mode 100644
package/x11r7/xlib_libxshmfence/0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch
Quoted 1 line
Applied to master, thanks.
Committed to 2024.02.x and 2024.05.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v4 2/2] Revert "package/x11r7/xlib_libxshmfence: disable on riscv32"
In reply to Thomas DevoogdtQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Devoogdt <[email protected]> writes:
This reverts (partial) commit
e39ad96136a8c340b3aea6b036024e28f14584f3, and26642e4cc09666110d5105e7867579a0e48cfa09.Fixed by 0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch.
Signed-off-by Thomas Devoogdt <[email protected]>---
v4: movexlib_libxshmfenceto separate patch series
Committed to 2024.02.x and 2024.05.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot