This avoids the crash but it crashes on exit too
Index: Makefile
===================================================================
RCS file: /cvsroot/src/external/mit/xorg/lib/libGL/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- Makefile 9 Apr 2019 14:31:06 -0000 1.24
+++ Makefile 11 Apr 2019 10:00:04 -0000
@@ -191,7 +191,8 @@
xcb-dri2 ${.CURDIR}/../libxcb/dri2 \
xcb-glx ${.CURDIR}/../libxcb/glx \
expat ${NETBSDSRCDIR}/external/mit/expat/lib/libexpat
\
- m ${NETBSDSRCDIR}/lib/libm
+ m ${NETBSDSRCDIR}/lib/libm \
+ pthread ${NETBSDSRCDIR}/lib/libpthread
MKLINT=no