Source-Changes-HG archive

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

[src/trunk]: src/external/mit/xorg/lib/pixman add build infrastructure to bui...



details:   https://anonhg.NetBSD.org/src/rev/2533931be1eb
branches:  trunk
changeset: 372316:2533931be1eb
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Nov 13 09:36:37 2022 +0000

description:
add build infrastructure to build the pixman tests

not built or installed by default.

diffstat:

 external/mit/xorg/lib/pixman/Makefile        |  22 +++------
 external/mit/xorg/lib/pixman/Makefile.cflags |  31 ++++++++++++++
 external/mit/xorg/lib/pixman/test/Makefile   |  60 ++++++++++++++++++++++++++++
 3 files changed, 99 insertions(+), 14 deletions(-)

diffs (181 lines):

diff -r 2d557cdfb111 -r 2533931be1eb external/mit/xorg/lib/pixman/Makefile
--- a/external/mit/xorg/lib/pixman/Makefile     Sun Nov 13 08:13:55 2022 +0000
+++ b/external/mit/xorg/lib/pixman/Makefile     Sun Nov 13 09:36:37 2022 +0000
@@ -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 @@
 .  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 @@
 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 @@
 .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-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
diff -r 2d557cdfb111 -r 2533931be1eb external/mit/xorg/lib/pixman/Makefile.cflags
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/xorg/lib/pixman/Makefile.cflags      Sun Nov 13 09:36:37 2022 +0000
@@ -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
diff -r 2d557cdfb111 -r 2533931be1eb external/mit/xorg/lib/pixman/test/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/xorg/lib/pixman/test/Makefile        Sun Nov 13 09:36:37 2022 +0000
@@ -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>



Home | Main Index | Thread Index | Old Index