aboutsummaryrefslogtreecommitdiffstats
path: root/main/xf86-video-intel
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-07-16 06:54:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-07-16 06:54:43 +0000
commitddb879bd56fa3a0436eb91d31a4745639f069d28 (patch)
tree476c5809cc414f8060312af39da821cc8387d40c /main/xf86-video-intel
parentae6abb9b68d1f3b2ae30996d00d25bddd6274dfd (diff)
downloadaports-ddb879bd56fa3a0436eb91d31a4745639f069d28.tar.bz2
aports-ddb879bd56fa3a0436eb91d31a4745639f069d28.tar.xz
main/xf86-video-intel: fix compile with gcc5
Diffstat (limited to 'main/xf86-video-intel')
-rw-r--r--main/xf86-video-intel/APKBUILD11
-rw-r--r--main/xf86-video-intel/gcc5-workaround.patch22
-rw-r--r--main/xf86-video-intel/xf86-video-intel-2.99.917-libdrm-kernel-4_0-crash.patch65
3 files changed, 96 insertions, 2 deletions
diff --git a/main/xf86-video-intel/APKBUILD b/main/xf86-video-intel/APKBUILD
index 896d117a3e..ab832c4389 100644
--- a/main/xf86-video-intel/APKBUILD
+++ b/main/xf86-video-intel/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xf86-video-intel
pkgver=2.99.917
-pkgrel=1
+pkgrel=2
pkgdesc="X.Org driver for Intel cards"
url="http://xorg.freedesktop.org/"
arch="x86 x86_64"
@@ -13,6 +13,8 @@ makedepends="xorg-server-dev libxi-dev fontsproto randrproto
mesa-dev libxvmc-dev xcb-util-dev udev-dev"
source="http://xorg.freedesktop.org/releases/individual/driver/$pkgname-$pkgver.tar.bz2
+ gcc5-workaround.patch
+ xf86-video-intel-2.99.917-libdrm-kernel-4_0-crash.patch
O_CLOEXEC.patch"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -33,7 +35,6 @@ build() {
--host=$CHOST \
--prefix=/usr \
--enable-xvmc \
- --enable-glamor \
--disable-selective-werror \
|| return 1
make || return 1
@@ -49,8 +50,14 @@ package() {
chmod o-x "$pkgdir"/usr/libexec/xf86-video-intel-backlight-helper
}
md5sums="fa196a66e52c0c624fe5d350af7a5e7b xf86-video-intel-2.99.917.tar.bz2
+2e9c5ee749f0a255d2b10ce18b3512fa gcc5-workaround.patch
+2fa815b66eb6896b3962074731b0b4bb xf86-video-intel-2.99.917-libdrm-kernel-4_0-crash.patch
d5c410d504c58aa641658a19e4950ea5 O_CLOEXEC.patch"
sha256sums="00b781eea055582820a123c47b62411bdf6aabf4f03dc0568faec55faf9667c9 xf86-video-intel-2.99.917.tar.bz2
+55367cd8dbe58d1097e2cf6cee11895acadc1a5ef527b8d39361e3975a6943e5 gcc5-workaround.patch
+54298cb4a59016be0451e3ea72b2c2c6b2a97cb9ec2c8f45d62c12447d14b361 xf86-video-intel-2.99.917-libdrm-kernel-4_0-crash.patch
79f6c0bf8eb56d631857a0064e6c4ba1582acfb12c467f29c211e4fc4e628b98 O_CLOEXEC.patch"
sha512sums="cbf4d46ad1ad5e5587c0f1f620ff534ef0645270517b60056b9f03e83d8216e2f456de46352a06c37c0c46963cc4ed20b71b815b20ec1bf680ff046e535f580f xf86-video-intel-2.99.917.tar.bz2
+b208508d229f53f18cf3aa8de2c3637964d8b22f8a615fc4759a2bb58cbe9db4dca7a79129a7b59fd138980c90bdcaf1aec142e1f13954c4cf25a817a2125998 gcc5-workaround.patch
+003fc22a9446cdfcb8d51cbface096187f93a0c54b024ee34b160ca41a491c35e8b387caabc3c3f6411b93663c5119f48dc2adae0d76878723c02483306972ac xf86-video-intel-2.99.917-libdrm-kernel-4_0-crash.patch
1054d8e4f314b061209d74d05037abefec64ab0c4a1efcf82e512ea8db9022c56cf7891ca4ed08af88f560e986ea0e726144f5bde11212e938cc741c40da5348 O_CLOEXEC.patch"
diff --git a/main/xf86-video-intel/gcc5-workaround.patch b/main/xf86-video-intel/gcc5-workaround.patch
new file mode 100644
index 0000000000..dd832546e4
--- /dev/null
+++ b/main/xf86-video-intel/gcc5-workaround.patch
@@ -0,0 +1,22 @@
+--- ./src/sna/compiler.h.orig
++++ ./src/sna/compiler.h
+@@ -65,16 +65,14 @@
+ #define avx2 __attribute__((target("avx2,sse4.2,sse2,fpmath=sse")))
+ #endif
+
+-#if HAS_GCC(4, 6) && defined(__OPTIMIZE__)
++#if HAS_GCC(4, 6) && !HAS_GCC(5,0) && defined(__OPTIMIZE__)
+ #define fast __attribute__((optimize("Ofast")))
+ #else
+ #define fast
+ #endif
+
+-#if HAS_GCC(4, 6) && defined(__OPTIMIZE__)
+-#define fast_memcpy __attribute__((optimize("Ofast"))) __attribute__((target("inline-all-stringops")))
+-#elif HAS_GCC(4, 5) && defined(__OPTIMIZE__)
+-#define fast_memcpy __attribute__((target("inline-all-stringops")))
++#if HAS_GCC(4, 5) && defined(__OPTIMIZE__)
++#define fast_memcpy fast __attribute__((target("inline-all-stringops")))
+ #else
+ #define fast_memcpy
+ #endif
diff --git a/main/xf86-video-intel/xf86-video-intel-2.99.917-libdrm-kernel-4_0-crash.patch b/main/xf86-video-intel/xf86-video-intel-2.99.917-libdrm-kernel-4_0-crash.patch
new file mode 100644
index 0000000000..ea3aa30ed1
--- /dev/null
+++ b/main/xf86-video-intel/xf86-video-intel-2.99.917-libdrm-kernel-4_0-crash.patch
@@ -0,0 +1,65 @@
+From 7fe2b2948652443ff43d907855bd7a051d54d309 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu, 19 Mar 2015 23:14:17 +0000
+Subject: sna: Protect against ABI breakage in recent versions of libdrm
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+diff --git a/src/sna/kgem.c b/src/sna/kgem.c
+index 11f0828..6f16cba 100644
+--- a/src/sna/kgem.c
++++ b/src/sna/kgem.c
+@@ -182,6 +182,15 @@ struct local_i915_gem_caching {
+ #define LOCAL_IOCTL_I915_GEM_SET_CACHING DRM_IOW(DRM_COMMAND_BASE + LOCAL_I915_GEM_SET_CACHING, struct local_i915_gem_caching)
+ #define LOCAL_IOCTL_I915_GEM_GET_CACHING DRM_IOW(DRM_COMMAND_BASE + LOCAL_I915_GEM_GET_CACHING, struct local_i915_gem_caching)
+
++struct local_i915_gem_mmap {
++ uint32_t handle;
++ uint32_t pad;
++ uint64_t offset;
++ uint64_t size;
++ uint64_t addr_ptr;
++};
++#define LOCAL_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct local_i915_gem_mmap)
++
+ struct local_i915_gem_mmap2 {
+ uint32_t handle;
+ uint32_t pad;
+@@ -514,15 +523,15 @@ retry_wc:
+
+ static void *__kgem_bo_map__cpu(struct kgem *kgem, struct kgem_bo *bo)
+ {
+- struct drm_i915_gem_mmap mmap_arg;
++ struct local_i915_gem_mmap arg;
+ int err;
+
+ retry:
+- VG_CLEAR(mmap_arg);
+- mmap_arg.handle = bo->handle;
+- mmap_arg.offset = 0;
+- mmap_arg.size = bytes(bo);
+- if ((err = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_MMAP, &mmap_arg))) {
++ VG_CLEAR(arg);
++ arg.handle = bo->handle;
++ arg.offset = 0;
++ arg.size = bytes(bo);
++ if ((err = do_ioctl(kgem->fd, LOCAL_IOCTL_I915_GEM_MMAP, &arg))) {
+ assert(err != EINVAL);
+
+ if (__kgem_throttle_retire(kgem, 0))
+@@ -536,10 +545,10 @@ retry:
+ return NULL;
+ }
+
+- VG(VALGRIND_MAKE_MEM_DEFINED(mmap_arg.addr_ptr, bytes(bo)));
++ VG(VALGRIND_MAKE_MEM_DEFINED(arg.addr_ptr, bytes(bo)));
+
+ DBG(("%s: caching CPU vma for %d\n", __FUNCTION__, bo->handle));
+- return bo->map__cpu = (void *)(uintptr_t)mmap_arg.addr_ptr;
++ return bo->map__cpu = (void *)(uintptr_t)arg.addr_ptr;
+ }
+
+ static int gem_write(int fd, uint32_t handle,
+--
+cgit v0.10.2
+