Module Name:    src
Committed By:   mrg
Date:           Sun Nov 13 09:36:37 UTC 2022

Modified Files:
        src/external/mit/xorg/lib/pixman: Makefile
Added Files:
        src/external/mit/xorg/lib/pixman: Makefile.cflags
        src/external/mit/xorg/lib/pixman/test: Makefile

Log Message:
add build infrastructure to build the pixman tests

not built or installed by default.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/external/mit/xorg/lib/pixman/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mit/xorg/lib/pixman/Makefile.cflags
cvs rdiff -u -r0 -r1.1 src/external/mit/xorg/lib/pixman/test/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/pixman/Makefile
diff -u src/external/mit/xorg/lib/pixman/Makefile:1.40 src/external/mit/xorg/lib/pixman/Makefile:1.41
--- src/external/mit/xorg/lib/pixman/Makefile:1.40	Sat Nov 12 07:43:33 2022
+++ src/external/mit/xorg/lib/pixman/Makefile	Sun Nov 13 09:36:37 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.40 2022/11/12 07:43:33 mrg Exp $
+#	$NetBSD: Makefile,v 1.41 2022/11/13 09:36:37 mrg Exp $
 
 NOLINT=	1	# defined
 
@@ -54,20 +54,20 @@ COPTS.pixman-mmx.c=	-mmmx -fvisibility=h
 .  if defined(HAVE_LLVM)
 COPTS.pixman-mmx.c+=	-Wno-error=attributes
 .  endif
-CPPFLAGS+=		-DUSE_X86_MMX
+#CPPFLAGS+=		-DUSE_X86_MMX
 MKDEPFLAGS+=		-mmmx
 . endif
 SRCS+=	pixman-sse2.c pixman-ssse3.c
 COPTS.pixman-sse2.c=	-msse2 -fvisibility=hidden
 COPTS.pixman-ssse3.c=	-msse3 -mssse3 -fvisibility=hidden
-CPPFLAGS+=		-DUSE_SSE2 -DUSE_SSSE3
+#CPPFLAGS+=		-DUSE_SSE2 -DUSE_SSSE3
 MKDEPFLAGS+=		-msse2 -msse3 -mssse3 -fvisibility=hidden
 .endif
 
 .if ${MACHINE_ARCH} == "powerpc"
 SRCS+=	pixman-vmx.c
 COPTS.pixman-vmx.c=	-maltivec
-CPPFLAGS+=		-DUSE_VMX
+#CPPFLAGS+=		-DUSE_VMX
 MKDEPFLAGS+=		-maltivec
 .endif
 
@@ -76,21 +76,18 @@ MKDEPFLAGS+=		-maltivec
 SRCS+=		pixman-arm-simd.c 		\
 		pixman-arm-simd-asm.S		\
 		pixman-arm-simd-asm-scaled.S
-CPPFLAGS+=	-DUSE_ARM_SIMD
 # ARM NEON
 SRCS+=		pixman-arm-neon.c		\
 		pixman-arm-neon-asm.S		\
 		pixman-arm-neon-asm-bilinear.S
-CPPFLAGS+=	-DUSE_ARM_NEON
 
 AFLAGS+=	${${ACTIVE_CC} == "clang" :? -fno-integrated-as :}
 # ARM iwMMX
 #SRCS+=		pixman-mmx.c
 #COPTS.pixman-mmx.c=	-mcpu=iwmmxt
-#CPPFLAGS+=	-DUSE_ARM_IWMMXT
 .endif
 
-.if !empty(MACHINE_ARCH:Maarch64*) && 0
+.if !empty(MACHINE_ARCH:Maarch64*)
 # ARM64 NEON
 SRCS+=		pixman-arm-neon.c			\
 		pixman-arma64-neon-asm.S		\
@@ -104,7 +101,7 @@ CPPFLAGS+=	-DUSE_ARM_A64_NEON
 .if !empty(MACHINE_ARCH:Mmips*64el) && empty(COPTS:M-march=*)
 # Loongson MMI
 SRCS+=		pixman-mmx.c
-CPPFLAGS+=	-DUSE_LOONGSON_MMI
+#CPPFLAGS+=	-DUSE_LOONGSON_MMI
 # SIMD instructions use floatpoint registers so we need to enable their use
 COPTS.pixman-mmx.c=	-march=loongson2f -mhard-float -Wa,-mhard-float
 .endif
@@ -114,14 +111,11 @@ COPTS.pixman-mmx.c=	-march=loongson2f -m
 COPTS.pixman-fast-path.c+=	-O1
 .endif
 
+.include "Makefile.cflags"
+
 INCS=	pixman.h pixman-version.h
 INCSDIR=${X11INCDIR}/pixman-1
 
-CPPFLAGS+=	-DHAVE_CONFIG_H \
-		-I${X11SRCDIR.pixman}/../include \
-		-I${X11SRCDIR.pixman}/../combine \
-		-I${X11SRCDIR.pixman}/pixman
-
 # With pixman 0.28.3, HAVE_PTHREAD_SETSPECIFIC is much faster than TLS
 CPPFLAGS+=	-DHAVE_PTHREAD_SETSPECIFIC
 #CPPFLAGS+=	-DTLS=__thread

Added files:

Index: src/external/mit/xorg/lib/pixman/Makefile.cflags
diff -u /dev/null src/external/mit/xorg/lib/pixman/Makefile.cflags:1.1
--- /dev/null	Sun Nov 13 09:36:37 2022
+++ src/external/mit/xorg/lib/pixman/Makefile.cflags	Sun Nov 13 09:36:37 2022
@@ -0,0 +1,31 @@
+#	$NetBSD: Makefile.cflags,v 1.1 2022/11/13 09:36:37 mrg Exp $
+
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+. if ${MACHINE_ARCH} == "i386"
+CPPFLAGS+=		-DUSE_X86_MMX
+. endif
+CPPFLAGS+=		-DUSE_SSE2 -DUSE_SSSE3
+.endif
+
+.if ${MACHINE_ARCH} == "powerpc"
+CPPFLAGS+=		-DUSE_VMX
+.endif
+
+.if !empty(MACHINE_ARCH:Mearm*)
+CPPFLAGS+=	-DUSE_ARM_SIMD
+CPPFLAGS+=	-DUSE_ARM_NEON
+#CPPFLAGS+=	-DUSE_ARM_IWMMXT
+.endif
+
+.if !empty(MACHINE_ARCH:Maarch64*)
+CPPFLAGS+=	-DUSE_ARM_A64_NEON
+.endif
+
+.if !empty(MACHINE_ARCH:Mmips*64el) && empty(COPTS:M-march=*)
+CPPFLAGS+=	-DUSE_LOONGSON_MMI
+.endif
+
+CPPFLAGS+=	-DHAVE_CONFIG_H \
+		-I${X11SRCDIR.pixman}/../include \
+		-I${X11SRCDIR.pixman}/../combine \
+		-I${X11SRCDIR.pixman}/pixman

Index: src/external/mit/xorg/lib/pixman/test/Makefile
diff -u /dev/null src/external/mit/xorg/lib/pixman/test/Makefile:1.1
--- /dev/null	Sun Nov 13 09:36:37 2022
+++ src/external/mit/xorg/lib/pixman/test/Makefile	Sun Nov 13 09:36:37 2022
@@ -0,0 +1,60 @@
+
+#	$NetBSD: Makefile,v 1.1 2022/11/13 09:36:37 mrg Exp $
+
+NOINSTALL=1
+NOMAN=1
+
+.include <bsd.own.mk>
+
+PROGS=					\
+	oob-test			\
+	infinite-loop			\
+	trap-crasher			\
+	fence-image-self-test		\
+	region-translate-test		\
+	fetch-test			\
+	a1-trap-test			\
+	prng-test			\
+	radial-invalid			\
+	pdf-op-test			\
+	region-test			\
+	combiner-test			\
+	scaling-crash-test		\
+	alpha-loop			\
+	scaling-helpers-test		\
+	thread-test			\
+	rotate-test			\
+	alphamap			\
+	gradient-crash-test		\
+	pixel-test			\
+	matrix-test			\
+	filter-reduction-test		\
+	composite-traps-test		\
+	region-contains-test		\
+	glyph-test			\
+	solid-test			\
+	stress-test			\
+	cover-test			\
+	blitters-test			\
+	affine-test			\
+	scaling-test			\
+	composite			\
+	tolerance-test
+
+ADDSRCS+=	utils.c utils-prng.c
+
+.for _p in ${PROGS}
+SRCS.${_p}=	${_p}.c ${ADDSRCS}
+.endfor
+
+CPPFLAGS+=	-I${X11SRCDIR.pixman}/pixman
+
+LDFLAGS+=	-lpthread
+LDADD+=		-lpixman-1
+
+.include "../Makefile.cflags"
+
+.PATH:	${X11SRCDIR.pixman}/test
+
+.include <bsd.x11.mk>
+.include <bsd.prog.mk>

Reply via email to