package/igt-gpu-tools: new package
PATCH 1/1 package/igt-gpu-tools: new package
From: Gaël PORTAY <[email protected]>
IGT GPU Tools is a collection of tools for development and testing of the DRM drivers
[Bernd: v4
- add myself to DEVELOPERS
- add patches to fix build with musl & uClibc
- add dependencies to locales, mmu, wchar and headers >= 4.11
- rework libunwind dependency
- remove duplicate libglib2 dependency
v5
- added optional dependency to json_c
- remove broken igt_stats binary
v6
- updated patch series after upstream review]
[Francois: v7
- depend on !BR2_RELRO_FULL
- remove specific workaround for igt_stats binary]
--- DEVELOPERS | 1 + package/Config.in | 1 + ...d-check-that-outb-is-present-in-io.h.patch | 34 +++++++ ...limits.h-to-fix-build-with-musl-libc.patch | 89 +++++++++++++++++++ .../0003-lib-igt_aux.h-Fix-musl-build.patch | 57 ++++++++++++ ...-lib-igt_x86.c-Fix-musl-uclibc-build.patch | 43 +++++++++ ...gt_halffloat.c-Fix-musl-uclibc-build.patch | 46 ++++++++++ ...rks-gem_exec_tracer.c-Fix-musl-build.patch | 46 ++++++++++ package/igt-gpu-tools/Config.in | 33 +++++++ package/igt-gpu-tools/igt-gpu-tools.hash | 5 ++ package/igt-gpu-tools/igt-gpu-tools.mk | 29 ++++++ 11 files changed, 384 insertions(+) create mode 100644 package/igt-gpu-tools/0001-build-check-that-outb-is-present-in-io.h.patch create mode 100644 package/igt-gpu-tools/0002-Include-limits.h-to-fix-build-with-musl-libc.patch create mode 100644 package/igt-gpu-tools/0003-lib-igt_aux.h-Fix-musl-build.patch create mode 100644 package/igt-gpu-tools/0004-lib-igt_x86.c-Fix-musl-uclibc-build.patch create mode 100644 package/igt-gpu-tools/0005-lib-igt_halffloat.c-Fix-musl-uclibc-build.patch create mode 100644 package/igt-gpu-tools/0006-benchmarks-gem_exec_tracer.c-Fix-musl-build.patch create mode 100644 package/igt-gpu-tools/Config.in create mode 100644 package/igt-gpu-tools/igt-gpu-tools.hash create mode 100644 package/igt-gpu-tools/igt-gpu-tools.mk
DEVELOPERS +1 -0
@@ -345,6 +345,7 @@ F: package/gpsd/ F: package/gptfdisk/ F: package/hddtemp/ F: package/hdparm/ +F: package/igt-gpu-tools/ F: package/intel-gmmlib/ F: package/intel-mediadriver/ F: package/intel-mediasdk/
package/Config.in +1 -0
@@ -318,6 +318,7 @@ comment "Graphic applications" source "package/glmark2/Config.in" source "package/glslsandbox-player/Config.in" source "package/gnuplot/Config.in" + source "package/igt-gpu-tools/Config.in" source "package/jhead/Config.in" source "package/kmscube/Config.in" source "package/libva-utils/Config.in"
package/igt-gpu-tools/0001-build-check-that-outb-is-present-in-io.h.patch new file +34 -0
@@ -0,0 +1,34 @@ +From d5373adea6248c0fe41870d50b24fc4ed36c6490 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +Date: Sat, 21 Oct 2023 16:47:07 +0200 +Subject: [PATCH] build: check that outb is present in io.h + +With glibc if io.h exists, inb/outb are always defined. +However on musl, io.h always exists but it may not define inb/outb. + +Thus, igt-gpu-tools builds with musl on non-x86 platforms will fail to +link. Fix this by checking for both io.h and that outb() is defined. + +Upstream: https://lists.freedesktop.org/archives/igt-dev/2023-October/063811.html + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index b35a00faa..cee8a7446 100644 +--- a/meson.build ++++ b/meson.build +@@ -220,7 +220,7 @@ endif + if cc.has_header('libgen.h') + config.set('HAVE_LIBGEN_H', 1) + endif +-if cc.has_header('sys/io.h') ++if cc.has_header('sys/io.h') and cc.has_function('outb', prefix: '#include <sys/io.h>') + config.set('HAVE_SYS_IO_H', 1) + endif + if cc.links(''' +-- +2.39.2 +
package/igt-gpu-tools/0002-Include-limits.h-to-fix-build-with-musl-libc.patch new file +89 -0
89 lines not on this page · raw message
package/igt-gpu-tools/0003-lib-igt_aux.h-Fix-musl-build.patch new file +57 -0
57 lines not on this page · raw message
package/igt-gpu-tools/0004-lib-igt_x86.c-Fix-musl-uclibc-build.patch new file +43 -0
43 lines not on this page · raw message
package/igt-gpu-tools/0005-lib-igt_halffloat.c-Fix-musl-uclibc-build.patch new file +46 -0
46 lines not on this page · raw message
package/igt-gpu-tools/0006-benchmarks-gem_exec_tracer.c-Fix-musl-build.patch new file +46 -0
46 lines not on this page · raw message
package/igt-gpu-tools/Config.in new file +33 -0
@@ -0,0 +1,33 @@ +config BR2_PACKAGE_IGT_GPU_TOOLS + bool "igt-gpu-tools" + depends on BR2_USE_MMU # fork() + depends on BR2_ENABLE_LOCALE + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_USE_WCHAR # elfutils + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11 # linux/dma-buf.h + depends on !BR2_RELRO_FULL + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # procps-ng + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_ELFUTILS + select BR2_PACKAGE_KMOD + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBPCIACCESS + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_PROCPS_NG + select BR2_PACKAGE_ZLIB + help + IGT GPU Tools is a collection of tools for development and + testing of the DRM drivers. + + https://gitlab.freedesktop.org/drm/igt-gpu-tools + +comment "igt-gpu-tools needs udev /dev management and toolchain w/ threads, wchar, dynamic library, locale, headers >= 4.11" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_HAS_UDEV || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ + !BR2_ENABLE_LOCALE || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
package/igt-gpu-tools/igt-gpu-tools.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Locally calculated from download +sha256 6f8b2b12704c0b37c22f32a3751688e7144f850faa715e85b26effdc5209cfd1 igt-gpu-tools-v1.28.tar.bz2 + +# Hash for license file: +sha256 1b7e266857b05808660f42369a4a797459d7b7bec7245e378aa28a8db2f213da COPYING
package/igt-gpu-tools/igt-gpu-tools.mk new file +29 -0
@@ -0,0 +1,29 @@ +################################################################################ +# +# igt-gpu-tools +# +################################################################################ + +IGT_GPU_TOOLS_VERSION = 1.28 +IGT_GPU_TOOLS_SOURCE = igt-gpu-tools-v$(IGT_GPU_TOOLS_VERSION).tar.bz2 +IGT_GPU_TOOLS_SITE = https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/archive/v$(IGT_GPU_TOOLS_VERSION) +IGT_GPU_TOOLS_LICENSE = MIT +IGT_GPU_TOOLS_LICENSE_FILES = COPYING +IGT_GPU_TOOLS_INSTALL_STAGING = YES +IGT_GPU_TOOLS_DEPENDENCIES = host-pkgconf cairo elfutils kmod libdrm libglib2 libpciaccess pixman procps-ng zlib + +ifeq ($(BR2_PACKAGE_JSON_C),y) +IGT_GPU_TOOLS_CONF_OPTS += -Drunner=enabled +IGT_GPU_TOOLS_DEPENDENCIES += json-c +else +IGT_GPU_TOOLS_CONF_OPTS += -Drunner=disabled +endif + +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +IGT_GPU_TOOLS_CONF_OPTS += -Dlibunwind=enabled +IGT_GPU_TOOLS_DEPENDENCIES += libunwind +else +IGT_GPU_TOOLS_CONF_OPTS += -Dlibunwind=disabled +endif + +$(eval $(meson-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot