pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/MesaLib MesaLib: port x86_64 tls dispatch cha...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a6b0f044298d
branches: trunk
changeset: 411859:a6b0f044298d
user: tnn <tnn%pkgsrc.org@localhost>
date: Sat Feb 22 07:52:01 2020 +0000
description:
MesaLib: port x86_64 tls dispatch changes to i386 also
diffstat:
graphics/MesaLib/Makefile | 4 +-
graphics/MesaLib/distinfo | 4 +-
graphics/MesaLib/patches/patch-src_mapi_entry__x86__tls.h | 55 ++++++++------
3 files changed, 35 insertions(+), 28 deletions(-)
diffs (106 lines):
diff -r e572febd95f0 -r a6b0f044298d graphics/MesaLib/Makefile
--- a/graphics/MesaLib/Makefile Sat Feb 22 06:56:29 2020 +0000
+++ b/graphics/MesaLib/Makefile Sat Feb 22 07:52:01 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.185 2020/02/21 21:52:24 tnn Exp $
+# $NetBSD: Makefile,v 1.186 2020/02/22 07:52:01 tnn Exp $
DISTNAME= mesa-19.2.7
PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= graphics
MASTER_SITES= https://mesa.freedesktop.org/archive/
EXTRACT_SUFX= .tar.xz
diff -r e572febd95f0 -r a6b0f044298d graphics/MesaLib/distinfo
--- a/graphics/MesaLib/distinfo Sat Feb 22 06:56:29 2020 +0000
+++ b/graphics/MesaLib/distinfo Sat Feb 22 07:52:01 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.149 2020/02/21 21:52:24 tnn Exp $
+$NetBSD: distinfo,v 1.150 2020/02/22 07:52:01 tnn Exp $
SHA1 (mesa-19.2.7.tar.xz) = 9b8ebf66770353a48bd710e12e2727fb33645f44
RMD160 (mesa-19.2.7.tar.xz) = 5323b623ac22c168b86548cf6d842ce004e346a9
@@ -31,7 +31,7 @@
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) = cbbb95b96414609a9cd05af75c9544f8e6938280
-SHA1 (patch-src_mapi_entry__x86__tls.h) = 11c0f5302d305a77f3a1780d44a2c61f48a66273
+SHA1 (patch-src_mapi_entry__x86__tls.h) = c8ad1cb3854efeba8d709a66bdddb818854820ea
SHA1 (patch-src_mapi_u__current.c) = 4e3ec6e253af3737f77ecd43e56044ba2b81e699
SHA1 (patch-src_mapi_u__current.h) = 9f4744681381a0959fda2926a436f296c89577f3
SHA1 (patch-src_mesa_main_extensions.c) = 2f48bdb1176c2878bb33bcfab7556172b50a987e
diff -r e572febd95f0 -r a6b0f044298d graphics/MesaLib/patches/patch-src_mapi_entry__x86__tls.h
--- a/graphics/MesaLib/patches/patch-src_mapi_entry__x86__tls.h Sat Feb 22 06:56:29 2020 +0000
+++ b/graphics/MesaLib/patches/patch-src_mapi_entry__x86__tls.h Sat Feb 22 07:52:01 2020 +0000
@@ -1,39 +1,46 @@
-$NetBSD: patch-src_mapi_entry__x86__tls.h,v 1.3 2019/08/21 13:35:28 nia Exp $
+$NetBSD: patch-src_mapi_entry__x86__tls.h,v 1.4 2020/02/22 07:52:01 tnn Exp $
NetBSD only supports zero-initialized initial-exec tls variables in conjuction
with dlopen(3) at the moment.
-Fix --enable-glx-tls with clang. From FreeBSD.
-
-table_noop_array is only defined for shared-glapi.
-es1api and es2api are not going to be patched for NetBSD.
-
---- src/mapi/entry_x86_tls.h.orig 2018-01-18 21:30:29.000000000 +0000
+--- src/mapi/entry_x86_tls.h.orig 2019-12-04 22:10:14.000000000 +0000
+++ src/mapi/entry_x86_tls.h
-@@ -56,10 +56,27 @@ __asm__(".balign 16\n"
+@@ -43,6 +43,21 @@ __asm__("x86_current_tls:\n\t"
+ "movl " ENTRY_CURRENT_TABLE "@GOTNTPOFF(%eax), %eax\n\t"
+ "ret");
+
++#if defined(__NetBSD__)
++__asm__("x86_current_table_helper:\n\t"
++ "movl %gs:(%eax), %eax\n\t" \
++ "testl %eax, %eax\n\t" \
++ "je 1f\n\t" \
++ "ret\n\t" \
++ "1:\n\t" \
++ "call 2f\n\t" \
++ "2:\n\t" \
++ "popl %eax\n\t" \
++ "addl $_GLOBAL_OFFSET_TABLE_+[.-2b], %eax\n\t" \
++ "call *" ENTRY_CURRENT_TABLE_GET "@GOT(%eax)\n\t" \
++ "ret");
++#endif
++
+ #ifndef GLX_X86_READONLY_TEXT
+ __asm__(".section wtext, \"awx\", @progbits");
+ #endif /* GLX_X86_READONLY_TEXT */
+@@ -56,10 +71,17 @@ __asm__(".balign 16\n"
".balign 16\n" \
func ":"
-+#if defined(__NetBSD__) && defined(MAPI_MODE_GLAPI)
-+extern const mapi_func table_noop_array[];
++#if defined(__NetBSD__)
++#define STUB_ASM_CODE(slot) \
++ "call x86_current_tls\n\t" \
++ "call x86_current_table_helper\n\t" \
++ "jmp *(4 * " slot ")(%eax)"
++#else
#define STUB_ASM_CODE(slot) \
"call x86_current_tls\n\t" \
"movl %gs:(%eax), %eax\n\t" \
-+ "testl %eax, %eax\n\t" \
-+ "je 1f\n\t" \
-+ "jmp *(4 * " slot ")(%eax)\n\t" \
-+ "1:\n\t" \
-+ "call 2f\n" \
-+ "2:\n\t" \
-+ "popl %eax\n\t" \
-+ "addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t" \
-+ "movl table_noop_array@GOT(%eax), %eax\n\t" \
"jmp *(4 * " slot ")(%eax)"
-+#else
-+#define STUB_ASM_CODE(slot) \
-+ "call x86_current_tls\n\t" \
-+ "movl %gs:(%eax), %eax\n\t" \
-+ "jmp *(4 * " slot ")(%eax)"
+#endif
#define MAPI_TMP_STUB_ASM_GCC
Home |
Main Index |
Thread Index |
Old Index