summaryrefslogtreecommitdiff
path: root/graphics/MesaLib
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2020-02-21 21:52:24 +0000
committertnn <tnn@pkgsrc.org>2020-02-21 21:52:24 +0000
commit38457a639c6cd4e84797aa3d6f1e79e482da380f (patch)
tree3ecbcc6b347712a33e2a40b92748fe0f91a3148d /graphics/MesaLib
parentcadf63afeced84222832bda4b8bfe053510159d1 (diff)
downloadpkgsrc-38457a639c6cd4e84797aa3d6f1e79e482da380f.tar.gz
MesaLib: assorted fixes
- must use march=i586 on i386 for 64-bit atomic CAS - call through @plt from position independent code - put back the stock STUB_ASM_CODE for non-NetBSD
Diffstat (limited to 'graphics/MesaLib')
-rw-r--r--graphics/MesaLib/Makefile6
-rw-r--r--graphics/MesaLib/distinfo4
-rw-r--r--graphics/MesaLib/patches/patch-src_mapi_entry__x86-64__tls.h24
3 files changed, 21 insertions, 13 deletions
diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile
index 90fafa001ef..11a1d6ef9a6 100644
--- a/graphics/MesaLib/Makefile
+++ b/graphics/MesaLib/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.184 2020/02/19 21:03:41 tnn Exp $
+# $NetBSD: Makefile,v 1.185 2020/02/21 21:52:24 tnn Exp $
DISTNAME= mesa-19.2.7
PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= graphics
MASTER_SITES= https://mesa.freedesktop.org/archive/
EXTRACT_SUFX= .tar.xz
@@ -124,6 +124,8 @@ MESON_ARGS+= -Dplatforms=${MESA_PLATFORMS:ts,}
.if ${MACHINE_ARCH} == "i386"
MESON_ARGS+= -Dglx-read-only-text=true
+CFLAGS+= -march=i586
+CXXFLAGS+= -march=i586
.endif
MESON_ARGS+= -Dgles1=true
diff --git a/graphics/MesaLib/distinfo b/graphics/MesaLib/distinfo
index 6542719457e..9992c6ae387 100644
--- a/graphics/MesaLib/distinfo
+++ b/graphics/MesaLib/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.148 2020/02/19 21:03:41 tnn Exp $
+$NetBSD: distinfo,v 1.149 2020/02/21 21:52:24 tnn Exp $
SHA1 (mesa-19.2.7.tar.xz) = 9b8ebf66770353a48bd710e12e2727fb33645f44
RMD160 (mesa-19.2.7.tar.xz) = 5323b623ac22c168b86548cf6d842ce004e346a9
@@ -30,7 +30,7 @@ SHA1 (patch-src_intel_compiler_brw__fs__bank__conflicts.cpp) = 6276d2c6846bb4dd0
SHA1 (patch-src_intel_perf_gen__perf.c) = 526f36d96bd9d72893764da2b9e78cb9b70de92b
SHA1 (patch-src_intel_tools_aubinator__error__decode.c) = d8f636e3c3e76763a505a1dce23de0b198ad62fa
SHA1 (patch-src_loader_loader.c) = 303e941f9b8afa6ee8053107af01e2c26e6ff118
-SHA1 (patch-src_mapi_entry__x86-64__tls.h) = 7cb6a31dd17e73dad3c3b9cfdf058da1a2a7ecd3
+SHA1 (patch-src_mapi_entry__x86-64__tls.h) = cbbb95b96414609a9cd05af75c9544f8e6938280
SHA1 (patch-src_mapi_entry__x86__tls.h) = 11c0f5302d305a77f3a1780d44a2c61f48a66273
SHA1 (patch-src_mapi_u__current.c) = 4e3ec6e253af3737f77ecd43e56044ba2b81e699
SHA1 (patch-src_mapi_u__current.h) = 9f4744681381a0959fda2926a436f296c89577f3
diff --git a/graphics/MesaLib/patches/patch-src_mapi_entry__x86-64__tls.h b/graphics/MesaLib/patches/patch-src_mapi_entry__x86-64__tls.h
index 73d2c21efce..90a4413ee0e 100644
--- a/graphics/MesaLib/patches/patch-src_mapi_entry__x86-64__tls.h
+++ b/graphics/MesaLib/patches/patch-src_mapi_entry__x86-64__tls.h
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_mapi_entry__x86-64__tls.h,v 1.4 2020/02/19 21:03:41 tnn Exp $
+$NetBSD: patch-src_mapi_entry__x86-64__tls.h,v 1.5 2020/02/21 21:52:24 tnn Exp $
NetBSD only supports zero-initialized initial-exec tls variables in conjuction
with dlopen(3) at the moment.
@@ -8,7 +8,7 @@ es1api and es2api are not going to be patched for NetBSD.
--- src/mapi/entry_x86-64_tls.h.orig 2019-12-04 22:10:14.000000000 +0000
+++ src/mapi/entry_x86-64_tls.h
-@@ -32,13 +32,13 @@
+@@ -32,21 +32,33 @@
#endif
__asm__(".text\n"
@@ -24,21 +24,27 @@ es1api and es2api are not going to be patched for NetBSD.
func ":"
#ifndef __ILP32__
-@@ -46,7 +46,12 @@ __asm__(".text\n"
- #define STUB_ASM_CODE(slot) \
- "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
- "movq %fs:(%rax), %r11\n\t" \
-- "jmp *(8 * " slot ")(%r11)"
+
++#if defined(__NetBSD__)
++#define STUB_ASM_CODE(slot) \
++ "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
++ "movq %fs:(%rax), %r11\n\t" \
+ "testq %r11, %r11\n\t" \
+ "je 1f\n\t" \
+ "jmp *(8 * " slot ")(%r11)\n\t" \
+ "1:\n\t" \
-+ "call " ENTRY_CURRENT_TABLE_GET "\n\t" \
++ "callq " ENTRY_CURRENT_TABLE_GET "@PLT\n\t" \
+ "jmp *(8 * " slot ")(%rax)"
++#else
+ #define STUB_ASM_CODE(slot) \
+ "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
+ "movq %fs:(%rax), %r11\n\t" \
+ "jmp *(8 * " slot ")(%r11)"
++#endif
#else
-@@ -77,7 +82,7 @@ x86_64_entry_start[] HIDDEN;
+@@ -77,7 +89,7 @@ x86_64_entry_start[] HIDDEN;
mapi_func
entry_get_public(int slot)
{