pkgsrc-WIP-changes archive

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

xoreos: add hacks.mk for atomic operations



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Thu Dec 24 13:38:11 2020 +0200
Changeset:	df9690d4c59cf2b1cfcab64e44426f76fca25d96

Added Files:
	xoreos/hacks.mk

Log Message:
xoreos: add hacks.mk for atomic operations

src/common/uuid.cpp needs 64-bit atomic operations
for a global uint64_t UID. Add a hacks.mk similar
to www/webkit-gtk/hacks.mk

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=df9690d4c59cf2b1cfcab64e44426f76fca25d96

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 xoreos/hacks.mk | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diffs:
diff --git a/xoreos/hacks.mk b/xoreos/hacks.mk
new file mode 100644
index 0000000000..ae075f74e0
--- /dev/null
+++ b/xoreos/hacks.mk
@@ -0,0 +1,23 @@
+# $NetBSD$
+
+.if !defined(XOREOS_HACKS_MK)
+XOREOS_HACKS_MK=	defined
+
+# [Tue Dec 15 15:49:14 SAST 2020 : yhardy]
+# On i386 archs src/common/uuid.cpp fails to compile because 64-bit
+# atomic operations are needed. Forcing -march=i586 (or better) avoids
+# that (i[56]86 provide required).
+.if ${MACHINE_ARCH} == "i386"
+PKG_HACKS+=	i386-atomicops
+CXXFLAGS+=	-march=i586
+.endif
+
+# [Tue Dec 15 15:49:14 SAST 2020 : yhardy]
+# On NetBSD/powerpc, we don't have native 8-byte atomics, but xoreos
+# needs it for a global uint64_t  UID, so here we need libatomic.
+.if ${MACHINE_ARCH} == "powerpc"
+PKG_HACKS+=     powerpc-libatomic
+.include "../../devel/libatomic/buildlink3.mk"
+.endif
+
+.endif	# XOREOS_HACKS_MK


Home | Main Index | Thread Index | Old Index