diff options
author | Matt Turner <mattst88@gentoo.org> | 2019-02-21 16:28:13 -0800 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2019-02-21 17:54:17 -0800 |
commit | d8f5cedfaeeef0bbbea83c6497876b9fb0bf33c7 (patch) | |
tree | 30221f719b3fa32c2f62dd7596c9d236543ac128 /x11-drivers/xf86-video-intel | |
parent | x11-terms/alacritty: add terminfo useflag (diff) | |
download | gentoo-d8f5cedfaeeef0bbbea83c6497876b9fb0bf33c7.tar.gz gentoo-d8f5cedfaeeef0bbbea83c6497876b9fb0bf33c7.tar.bz2 gentoo-d8f5cedfaeeef0bbbea83c6497876b9fb0bf33c7.zip |
x11-drivers/xf86-video-intel: Fix build on x86
Closes: https://bugs.gentoo.org/655206
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'x11-drivers/xf86-video-intel')
-rw-r--r-- | x11-drivers/xf86-video-intel/files/xf86-video-intel-2.99.917_p20180214-Fix-build-on-i686.patch | 47 | ||||
-rw-r--r-- | x11-drivers/xf86-video-intel/xf86-video-intel-2.99.917_p20180214-r2.ebuild | 96 |
2 files changed, 143 insertions, 0 deletions
diff --git a/x11-drivers/xf86-video-intel/files/xf86-video-intel-2.99.917_p20180214-Fix-build-on-i686.patch b/x11-drivers/xf86-video-intel/files/xf86-video-intel-2.99.917_p20180214-Fix-build-on-i686.patch new file mode 100644 index 000000000000..279a61ae4439 --- /dev/null +++ b/x11-drivers/xf86-video-intel/files/xf86-video-intel-2.99.917_p20180214-Fix-build-on-i686.patch @@ -0,0 +1,47 @@ +From 9e6e003e3468dca674ac848e2669af973da02fd4 Mon Sep 17 00:00:00 2001 +From: Adam Jackson <ajax@redhat.com> +Date: Tue, 6 Mar 2018 12:07:46 -0500 +Subject: [PATCH] Fix build on i686 + +Presumably this only matters for i686 because amd64 implies sse2, but: + +BUILDSTDERR: In file included from gen4_vertex.c:34: +BUILDSTDERR: gen4_vertex.c: In function 'emit_vertex': +BUILDSTDERR: sna_render_inline.h:40:26: error: inlining failed in call to always_inline 'vertex_emit_2s': target specific option mismatch +BUILDSTDERR: static force_inline void vertex_emit_2s(struct sna *sna, int16_t x, int16_t y) +BUILDSTDERR: ^~~~~~~~~~~~~~ +BUILDSTDERR: gen4_vertex.c:308:25: note: called from here +BUILDSTDERR: #define OUT_VERTEX(x,y) vertex_emit_2s(sna, x,y) /* XXX assert(!too_large(x, y)); */ +BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ +BUILDSTDERR: gen4_vertex.c:360:2: note: in expansion of macro 'OUT_VERTEX' +BUILDSTDERR: OUT_VERTEX(dstX, dstY); +BUILDSTDERR: ^~~~~~~~~~ + +The bug here appears to be that emit_vertex() is declared 'sse2' but +vertex_emit_2s is merely always_inline. gcc8 decides that since you said +always_inline you need to have explicitly cloned it for every +permutation of targets. Merely saying inline seems to do the job of +cloning vertex_emit_2s as much as necessary. + +So to reiterate: if you say always-inline, it won't, but if you just say +maybe inline, it will. Thanks gcc, that's helpful. +--- + src/sna/compiler.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/sna/compiler.h b/src/sna/compiler.h +index 0f3775ec..2e579b15 100644 +--- a/src/sna/compiler.h ++++ b/src/sna/compiler.h +@@ -32,7 +32,7 @@ + #define likely(expr) (__builtin_expect (!!(expr), 1)) + #define unlikely(expr) (__builtin_expect (!!(expr), 0)) + #define noinline __attribute__((noinline)) +-#define force_inline inline __attribute__((always_inline)) ++#define force_inline inline /* __attribute__((always_inline)) */ + #define fastcall __attribute__((regparm(3))) + #define must_check __attribute__((warn_unused_result)) + #define constant __attribute__((const)) +-- +2.19.2 + diff --git a/x11-drivers/xf86-video-intel/xf86-video-intel-2.99.917_p20180214-r2.ebuild b/x11-drivers/xf86-video-intel/xf86-video-intel-2.99.917_p20180214-r2.ebuild new file mode 100644 index 000000000000..dbe8b81f9331 --- /dev/null +++ b/x11-drivers/xf86-video-intel/xf86-video-intel-2.99.917_p20180214-r2.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +XORG_DRI=dri +XORG_EAUTORECONF=yes +inherit linux-info xorg-2 flag-o-matic + +if [[ ${PV} == 9999* ]]; then + SRC_URI="" +else + KEYWORDS="amd64 x86" + COMMIT_ID="75795523003798d789d417e82aaa81c7ea1ed616" + SRC_URI="https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/snapshot/${COMMIT_ID}.tar.xz -> ${P}.tar.xz" + S=${WORKDIR}/${COMMIT_ID} +fi + +DESCRIPTION="X.Org driver for Intel cards" + +IUSE="debug dri3 +sna tools +udev uxa xvmc" + +REQUIRED_USE=" + || ( sna uxa ) +" +RDEPEND=" + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXScrnSaver + >=x11-libs/pixman-0.27.1 + >=x11-libs/libdrm-2.4.52[video_cards_intel] + dri3? ( + >=x11-base/xorg-server-1.18 + !<=media-libs/mesa-12.0.4 + ) + sna? ( + >=x11-base/xorg-server-1.10 + ) + tools? ( + x11-libs/libX11 + x11-libs/libxcb + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libxshmfence + x11-libs/libXtst + ) + udev? ( + virtual/libudev:= + ) + xvmc? ( + x11-libs/libXvMC + >=x11-libs/libxcb-1.5 + x11-libs/xcb-util + ) +" +DEPEND="${RDEPEND} + x11-base/xorg-proto" + +PATCHES=( + "${FILESDIR}"/${P}-Fix-build-on-i686.patch +) + +src_configure() { + replace-flags -Os -O2 + XORG_CONFIGURE_OPTIONS=( + --disable-dri1 + $(use_enable debug) + $(use_enable dri) + $(use_enable dri dri3) + $(usex dri3 "--with-default-dri=3") + $(use_enable sna) + $(use_enable tools) + $(use_enable udev) + $(use_enable uxa) + $(use_enable xvmc) + ) + xorg-2_src_configure +} + +pkg_postinst() { + if linux_config_exists && \ + kernel_is -lt 4 3 && ! linux_chkconfig_present DRM_I915_KMS; then + echo + ewarn "This driver requires KMS support in your kernel" + ewarn " Device Drivers --->" + ewarn " Graphics support --->" + ewarn " Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->" + ewarn " <*> Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver) --->" + ewarn " i915 driver" + ewarn " [*] Enable modesetting on intel by default" + echo + fi +} |