From 2cedce98bcfe8d65ed1512a8ff9f878556e2e011 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 12 Sep 2015 08:49:16 +0200 Subject: [PATCH] intel-gpu-tools: unbreak musl build. --- srcpkgs/intel-gpu-tools/patches/musl.patch | 67 ++++++++++++++++++++++ srcpkgs/intel-gpu-tools/template | 2 +- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/intel-gpu-tools/patches/musl.patch diff --git a/srcpkgs/intel-gpu-tools/patches/musl.patch b/srcpkgs/intel-gpu-tools/patches/musl.patch new file mode 100644 index 00000000000..5c1affcf119 --- /dev/null +++ b/srcpkgs/intel-gpu-tools/patches/musl.patch @@ -0,0 +1,67 @@ +Do not redefine ioctl() and close(), conflicts with the libc declarations. +Fixes musl build. + + --xtraeme + +--- benchmarks/gem_exec_tracer.c.orig 2015-09-12 08:46:22.024640552 +0200 ++++ benchmarks/gem_exec_tracer.c 2015-09-12 08:46:51.737733668 +0200 +@@ -162,7 +162,7 @@ trace_del(uint32_t handle) + } + + int +-close(int fd) ++myclose(int fd) + { + if (fd == drm_fd) + drm_fd = -1; +@@ -200,7 +200,7 @@ static int is_i915(int fd) + } + + int +-ioctl(int fd, unsigned long request, ...) ++myioctl(int fd, unsigned long request, ...) + { + va_list args; + void *argp; +@@ -281,8 +281,8 @@ ioctl(int fd, unsigned long request, ... + static void __attribute__ ((constructor)) + init(void) + { +- libc_close = dlsym(RTLD_NEXT, "close"); +- libc_ioctl = dlsym(RTLD_NEXT, "ioctl"); ++ libc_close = dlsym(RTLD_NEXT, "myclose"); ++ libc_ioctl = dlsym(RTLD_NEXT, "myioctl"); + fail_if(libc_close == NULL || libc_ioctl == NULL, + "failed to get libc ioctl or close\n"); + } +--- tools/aubdump.c.orig 2015-09-12 08:45:16.921302516 +0200 ++++ tools/aubdump.c 2015-09-12 08:45:51.750828746 +0200 +@@ -398,7 +398,7 @@ remove_bo(int handle) + } + + int +-close(int fd) ++myclose(int fd) + { + if (fd == drm_fd) + drm_fd = -1; +@@ -407,7 +407,7 @@ close(int fd) + } + + int +-ioctl(int fd, unsigned long request, ...) ++myioctl(int fd, unsigned long request, ...) + { + va_list args; + void *argp; +@@ -532,8 +532,8 @@ init(void) + { + const char *args = getenv("INTEL_AUBDUMP_ARGS"); + +- libc_close = dlsym(RTLD_NEXT, "close"); +- libc_ioctl = dlsym(RTLD_NEXT, "ioctl"); ++ libc_close = dlsym(RTLD_NEXT, "myclose"); ++ libc_ioctl = dlsym(RTLD_NEXT, "myioctl"); + fail_if(libc_close == NULL || libc_ioctl == NULL, + "intel_aubdump: failed to get libc ioctl or close\n"); + diff --git a/srcpkgs/intel-gpu-tools/template b/srcpkgs/intel-gpu-tools/template index 922c0fa5d42..559c5fc2f31 100644 --- a/srcpkgs/intel-gpu-tools/template +++ b/srcpkgs/intel-gpu-tools/template @@ -1,7 +1,7 @@ # Template file for 'intel-gpu-tools' pkgname=intel-gpu-tools version=1.12 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-tests" hostmakedepends="pkg-config swig"