[Buildroot] [PATCH 1/1] package/x11r7/xlib_libxshmfence: disable on riscv32
Arnout Vandecappelle
arnout at mind.be
Thu Aug 5 19:18:38 UTC 2021
On 05/08/2021 13:21, Fabrice Fontaine wrote:
> xlib_libxshmfence unconditionally uses SYS_futex which raises the
> following build failure on riscv32:
>
> xshmfence_futex.h:58:17: 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
The proper way is to add support for futex64, but:
- that's a bit complicated so better for upstream to do;
- Linux on RISCV32 doesn't have much of a future, except on FPGAs which aren't
very likely to run X;
- X itself doesn't have much of a future either;
- we're in the stabilization period so risky patches are to be avoided.
Therefore, applied to master, thanks.
>
> Fixes:
> - http://autobuild.buildroot.org/results/b3523e35fde0fac04b96a6278cbc6ffdfe56f7d1
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> ---
> package/mesa3d/Config.in | 3 ++-
> package/x11r7/xlib_libxshmfence/Config.in | 1 +
> package/x11r7/xserver_xorg-server/Config.in | 3 ++-
> 3 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> index 41c90c49af..eb7c1eef46 100644
> --- a/package/mesa3d/Config.in
> +++ b/package/mesa3d/Config.in
> @@ -65,7 +65,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER
> !BR2_PACKAGE_MESA3D_OPENGL_GLX && \
> !BR2_PACKAGE_MESA3D_OPENGL_EGL
> select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \
> - (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4)
> + (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4 && \
> + !BR2_RISCV_32)
>
> config BR2_PACKAGE_MESA3D_VULKAN_DRIVER
> bool
> diff --git a/package/x11r7/xlib_libxshmfence/Config.in b/package/x11r7/xlib_libxshmfence/Config.in
> index 710476b357..55cd91d1e4 100644
> --- a/package/x11r7/xlib_libxshmfence/Config.in
> +++ b/package/x11r7/xlib_libxshmfence/Config.in
> @@ -1,5 +1,6 @@
> config BR2_PACKAGE_XLIB_LIBXSHMFENCE
> bool "libxshmfence"
> + depends on !BR2_RISCV_32
I added a comment to make it explicit that it can be removed when upstream adds
support for futex64.
Regards,
Arnout
> depends on BR2_TOOLCHAIN_HAS_SYNC_4
> select BR2_PACKAGE_XORGPROTO
> help
> diff --git a/package/x11r7/xserver_xorg-server/Config.in b/package/x11r7/xserver_xorg-server/Config.in
> index fcd3d0ae00..4dc15435a8 100644
> --- a/package/x11r7/xserver_xorg-server/Config.in
> +++ b/package/x11r7/xserver_xorg-server/Config.in
> @@ -53,7 +53,8 @@ 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
> + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \
> + (BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_RISCV_32)
> help
> This variant of the X.org server is the full-blown variant,
> as used by desktop GNU/Linux distributions. The drivers (for
>
More information about the buildroot
mailing list