linux-qubasis

linux oasis port as a qubes template

git clone https://9o.is/git/linux-qubasis.git

commit 004fc0fae6d36ddba0c9ffc00e5a14af92b3d829
parent 1a96043b4c3a53ddddcab8da515cf70b5a99c81b
Author: Jul <jul@9o.is>
Date:   Fri, 28 Nov 2025 03:03:06 -0500

add pixman

Diffstat:
M.gitmodules | 4++++
Mpkg/gen.sh | 1+
Mpkg/genfn.sh | 2+-
Apkg/pixman/config.h | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/pixman/gen.sh | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/pixman/patch/0001-Prevent-empty-top-level-declaration.patch | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/probe/HAVE___BUILTIN_CLZ | 4++++
Mpkg/probe/gen.sh | 1+
8 files changed, 225 insertions(+), 1 deletion(-)

diff --git a/.gitmodules b/.gitmodules @@ -78,6 +78,10 @@ path = pkg/pax/src url = https://git.sr.ht/~mcf/pax ignore = all +[submodule "pixman"] + path = pkg/pixman/src + url = https://gitlab.freedesktop.org/pixman/pixman.git + ignore = all [submodule "qubes-core-qrexec"] path = pkg/qubes-core-qrexec/src url = https://github.com/QubesOS/qubes-core-qrexec diff --git a/pkg/gen.sh b/pkg/gen.sh @@ -44,6 +44,7 @@ pkg openbsd pkg pax pkg pcre pkg perp +pkg pixman pkg probe pkg python pkg qubes-core-qrexec diff --git a/pkg/genfn.sh b/pkg/genfn.sh @@ -165,7 +165,7 @@ compile() { while [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; do case $1 in - -I*|-W*|-D*|-p*) + -I*|-W*|-D*|-p*|-m*) _cflags="$_cflags $1" shift ;; diff --git a/pkg/pixman/config.h b/pkg/pixman/config.h @@ -0,0 +1,75 @@ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ +#define HAVE_ALARM 1 +#ifdef HAVE___BUILTIN_CLZ +# define HAVE_BUILTIN_CLZ /**/ +#endif +#define HAVE_DLFCN_H 1 +#define HAVE_FEDIVBYZERO 1 +/* #undef HAVE_FEENABLEEXCEPT */ +#define HAVE_FENV_H 1 +#define HAVE_FLOAT128 /**/ +#define HAVE_GCC_VECTOR_EXTENSIONS /**/ +/* #undef HAVE_GETISAX */ +#define HAVE_GETPAGESIZE 1 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_INTTYPES_H 1 +/* #undef HAVE_LIBPIXMAN_1 */ +/* #undef HAVE_LIBPNG */ +#define HAVE_MEMORY_H 1 +#define HAVE_MMAP 1 +#define HAVE_MPROTECT 1 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_PTHREADS /**/ +#define HAVE_SIGACTION 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_UNISTD_H 1 +#define LT_OBJDIR ".libs/" +#define PACKAGE "pixman" +#define PACKAGE_BUGREPORT "pixman@lists.freedesktop.org" +#define PACKAGE_NAME "pixman" +#define PACKAGE_STRING "pixman 0.40.0" +#define PACKAGE_TARNAME "pixman" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "0.40.0" +/* #undef PIXMAN_GNUPLOT */ +/* #undef PIXMAN_TIMERS */ +#define SIZEOF_LONG 8 +#define STDC_HEADERS 1 +#ifdef HAVE__THREAD_LOCAL +# define TLS _Thread_local +#endif +#define TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR /**/ +/* #undef USE_ARM_IWMMXT */ +/* #undef USE_ARM_NEON */ +/* #undef USE_ARM_SIMD */ +#define USE_GCC_INLINE_ASM 1 +/* #undef USE_LOONGSON_MMI */ +/* #undef USE_MIPS_DSPR2 */ +/* #undef USE_OPENMP */ +/* #undef USE_VMX */ +#define VERSION "0.40.0" +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif +#ifndef __cplusplus +/* #undef inline */ +#endif +/* #undef sqrtf */ + +#ifdef __x86_64__ +# define USE_SSE2 1 +# define USE_SSE3 1 +# define USE_X86_MMX 1 +#endif diff --git a/pkg/pixman/gen.sh b/pkg/pixman/gen.sh @@ -0,0 +1,79 @@ +git pixman-0.38.4 + +cflags " + -DHAVE_CONFIG_H + -I$outdir + -I$outdir/include + -Wno-pedantic + -Wno-expansion-to-defined + -Wno-unused-parameter + -Wno-unused-local-typedefs + -Wno-missing-field-initializers + -Wno-sign-compare + -Wno-unused-const-variable + -Wno-old-style-declaration + -Wno-shift-negative-value +" + +dep " + $dir/headers + $outdir/config.h +" + +include " + pixman/pixman.h + $outdir/pixman-version.h +" + +sed pixman-version.h pixman/pixman-version.h.in +bind expr " + -e s,@PIXMAN_VERSION_MAJOR@,0, + -e s,@PIXMAN_VERSION_MINOR@,40, + -e s,@PIXMAN_VERSION_MICRO@,0, +" + +cat config.h " + $pkgdir/probe/HAVE__THREAD_LOCAL + $pkgdir/probe/HAVE___BUILTIN_CLZ + $dir/config.h +" + +compile -mmmx pixman/pixman-mmx.c +compile -msse2 pixman/pixman-sse2.c +compile -mssse3 pixman/pixman-ssse3.c + +lib libpixman.a --src-prefix pixman " + pixman-access-accessors.c + pixman-access.c + pixman-arm.c + pixman-bits-image.c + pixman-combine-float.c + pixman-combine32.c + pixman-conical-gradient.c + pixman-edge-accessors.c + pixman-edge.c + pixman-fast-path.c + pixman-filter.c + pixman-general.c + pixman-glyph.c + pixman-gradient-walker.c + pixman-image.c + pixman-implementation.c + pixman-linear-gradient.c + pixman-matrix.c + pixman-mips.c + pixman-noop.c + pixman-ppc.c + pixman-radial-gradient.c + pixman-region16.c + pixman-region32.c + pixman-solid-fill.c + pixman-timer.c + pixman-trap.c + pixman-utils.c + pixman-x86.c + pixman.c + pixman/pixman-mmx.c.o + pixman/pixman-sse2.c.o + pixman/pixman-ssse3.c.o +" diff --git a/pkg/pixman/patch/0001-Prevent-empty-top-level-declaration.patch b/pkg/pixman/patch/0001-Prevent-empty-top-level-declaration.patch @@ -0,0 +1,60 @@ +From 76c1b0d85878fb3eb6cba54b5a67ad3df095bad7 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 11 Jul 2019 00:12:19 -0700 +Subject: [PATCH] Prevent empty top-level declaration +Upstream: https://lists.freedesktop.org/archives/pixman/2019-November/004896.html + +The expansion of PIXMAN_DEFINE_THREAD_LOCAL(...) may end in a +function definition, so the following semicolon is considered an +empty top-level declaration, which is not allowed in ISO C. +--- + pixman/pixman-compiler.h | 6 +++--- + pixman/pixman-implementation.c | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/pixman/pixman-compiler.h b/pixman/pixman-compiler.h +index a02aa49..6394156 100644 +--- a/pixman/pixman-compiler.h ++++ b/pixman/pixman-compiler.h +@@ -109,14 +109,14 @@ + #if defined(PIXMAN_NO_TLS) + + # define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \ +- static type name ++ static type name; + # define PIXMAN_GET_THREAD_LOCAL(name) \ + (&name) + + #elif defined(TLS) + + # define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \ +- static TLS type name ++ static TLS type name; + # define PIXMAN_GET_THREAD_LOCAL(name) \ + (&name) + +@@ -176,7 +176,7 @@ + #elif defined(_MSC_VER) + + # define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \ +- static __declspec(thread) type name ++ static __declspec(thread) type name; + # define PIXMAN_GET_THREAD_LOCAL(name) \ + (&name) + +diff --git a/pixman/pixman-implementation.c b/pixman/pixman-implementation.c +index 2c7de4c..5a2cbfe 100644 +--- a/pixman/pixman-implementation.c ++++ b/pixman/pixman-implementation.c +@@ -63,7 +63,7 @@ typedef struct + } cache [N_CACHED_FAST_PATHS]; + } cache_t; + +-PIXMAN_DEFINE_THREAD_LOCAL (cache_t, fast_path_cache); ++PIXMAN_DEFINE_THREAD_LOCAL (cache_t, fast_path_cache) + + static void + dummy_composite_rect (pixman_implementation_t *imp, +-- +2.26.2 + diff --git a/pkg/probe/HAVE___BUILTIN_CLZ b/pkg/probe/HAVE___BUILTIN_CLZ @@ -0,0 +1,4 @@ +unsigned x = -1; +int main(void) { + return __builtin_clz(x); +} diff --git a/pkg/probe/gen.sh b/pkg/probe/gen.sh @@ -20,6 +20,7 @@ _probe HAVE__MM_CLMULEPI64_SI128 _probe HAVE__MM_MOVEMASK_EPI8 _probe HAVE___BUILTIN_ASSUME_ALIGNED _probe HAVE___BUILTIN_BSWAP16 +_probe HAVE___BUILTIN_CLZ _probesize SIZEOF_SIZE_T _probesize SIZEOF_LONG