Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/MesaLib MesaLib: Make ELF TLS optional.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ccb55fdb805d
branches:  trunk
changeset: 428691:ccb55fdb805d
user:      nia <nia%pkgsrc.org@localhost>
date:      Thu Apr 09 16:48:08 2020 +0000

description:
MesaLib: Make ELF TLS optional.

diffstat:

 graphics/MesaLib/Makefile   |   3 ++-
 graphics/MesaLib/options.mk |  22 ++++++++++++++++++++--
 2 files changed, 22 insertions(+), 3 deletions(-)

diffs (68 lines):

diff -r 7289595e0ba4 -r ccb55fdb805d graphics/MesaLib/Makefile
--- a/graphics/MesaLib/Makefile Thu Apr 09 16:46:56 2020 +0000
+++ b/graphics/MesaLib/Makefile Thu Apr 09 16:48:08 2020 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.191 2020/04/07 13:20:40 nia Exp $
+# $NetBSD: Makefile,v 1.192 2020/04/09 16:48:08 nia Exp $
 
 DISTNAME=      mesa-20.0.4
 PKGNAME=       ${DISTNAME:S/mesa/MesaLib/}
+PKGREVISION=   1
 CATEGORIES=    graphics
 MASTER_SITES=  https://mesa.freedesktop.org/archive/
 EXTRACT_SUFX=  .tar.xz
diff -r 7289595e0ba4 -r ccb55fdb805d graphics/MesaLib/options.mk
--- a/graphics/MesaLib/options.mk       Thu Apr 09 16:46:56 2020 +0000
+++ b/graphics/MesaLib/options.mk       Thu Apr 09 16:48:08 2020 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: options.mk,v 1.79 2020/01/04 01:53:55 nia Exp $
+# $NetBSD: options.mk,v 1.80 2020/04/09 16:48:08 nia Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.MesaLib
 
 .include "features.mk"
 
-PKG_SUPPORTED_OPTIONS+=                llvm vulkan x11
+PKG_SUPPORTED_OPTIONS+=                elf-tls llvm vulkan x11
 
 .if ${MESALIB_SUPPORTS_DRI} == "yes"
 PKG_SUPPORTED_OPTIONS+=                wayland
@@ -16,6 +16,8 @@
 
 PKG_SUGGESTED_OPTIONS+=                x11
 
+.include "../../mk/bsd.fast.prefs.mk"
+
 # The LLVM option enables JIT accelerated software rendering and is also
 # required to support the latest RADEON GPUs.
 #
@@ -29,6 +31,15 @@
 PKG_SUGGESTED_OPTIONS+=                llvm
 .endif
 
+# ELF TLS is broken in at least the following cases:
+# - NetBSD with SDL2 without X11
+# - Linux with musl libc
+#
+# https://gitlab.freedesktop.org/mesa/mesa/issues/966
+.if ${OPSYS} == "Linux" && !empty(GLIBC_VERSION)
+PKG_SUGGESTED_OPTIONS+=                elf-tls
+.endif
+
 .include "../../mk/bsd.options.mk"
 
 # Gallium drivers requiring LLVM
@@ -41,6 +52,13 @@
 PLIST_VARS+=   vdpau
 
 #
+# ELF TLS support
+#
+.if empty(PKG_OPTIONS:Melf-tls)
+BUILDLINK_TRANSFORM+=  rm:-DUSE_ELF_TLS
+.endif
+
+#
 # LLVM support
 #
 .if !empty(PKG_OPTIONS:Mllvm)



Home | Main Index | Thread Index | Old Index