summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-09-03 11:29:43 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-09-03 11:29:43 +0000
commit7991e34e639661b8ba04ffcbc9c0450bd5d6e529 (patch)
treeeeb2394f86e9086b299ae3a8d407a3b15e15447c /lib
parent4112c90a93f98c236a2689f9dd99d55a6b51b65f (diff)
Avoid problems with undefined symbols on ld.bfd archs caused by order of
.a files. problem reported by jca@ on sparc64 with ports which link libgbm ok jca@
Diffstat (limited to 'lib')
-rw-r--r--lib/mesa/mk/libgbm/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/mesa/mk/libgbm/Makefile b/lib/mesa/mk/libgbm/Makefile
index e14d41fcd..3072a1d4d 100644
--- a/lib/mesa/mk/libgbm/Makefile
+++ b/lib/mesa/mk/libgbm/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.2 2020/08/28 16:07:19 jsg Exp $
+# $OpenBSD: Makefile,v 1.3 2020/09/03 11:29:42 jsg Exp $
.include <bsd.xconf.mk>
@@ -18,15 +18,19 @@ CPPFLAGS+= -I${MESA_SRC}/src/gbm/main \
-I${MESA_SRC}/src/gbm/backends/dri \
-I${MESA_SRC}/src/loader
-LDADD+= ${.CURDIR}/../libmesa_util/${__objdir}/libmesa_util.a \
- ${.CURDIR}/../libxmlconfig/${__objdir}/libxmlconfig.a \
+LDADD+= -Wl,--as-needed -Wl,--start-group \
${.CURDIR}/../libloader/${__objdir}/libloader.a \
+ ${.CURDIR}/../libmesa_util/${__objdir}/libmesa_util.a \
+ ${.CURDIR}/../libmesa_format/${__objdir}/libmesa_format.a \
+ ${.CURDIR}/../libxmlconfig/${__objdir}/libxmlconfig.a \
-lz -lm -lexpat
.if ${XENOCARA_BUILD_DRI:L} == "yes"
LDADD+= -L${X11BASE}/lib -ldrm
.endif
+LDADD+= -Wl,--end-group
+
obj: _xenocara_obj
beforeinstall: