diff options
| author | Michael Forney <mforney@mforney.org> | 2019-07-10 19:04:30 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2019-07-10 19:06:26 -0700 |
| commit | e8de3964688787b9d6b14ce173a254b0fc2e38ad (patch) | |
| tree | 041e6f07ad8ca50f4330865646df88650f15d7d2 /pkg/pixman | |
| parent | 95238ca682eadca3dd1b839b69e375d61e16af24 (diff) | |
pixman, nasm: Probe for __builtin_clz
Diffstat (limited to 'pkg/pixman')
| -rw-r--r-- | pkg/pixman/config.h | 4 | ||||
| -rw-r--r-- | pkg/pixman/gen.lua | 20 |
2 files changed, 18 insertions, 6 deletions
diff --git a/pkg/pixman/config.h b/pkg/pixman/config.h index 5725db3e..4135d6e1 100644 --- a/pkg/pixman/config.h +++ b/pkg/pixman/config.h @@ -1,6 +1,8 @@ /* #undef AC_APPLE_UNIVERSAL_BUILD */ #define HAVE_ALARM 1 -#define HAVE_BUILTIN_CLZ /**/ +#ifdef HAVE___BUILTIN_CLZ +# define HAVE_BUILTIN_CLZ /**/ +#endif #define HAVE_DLFCN_H 1 #define HAVE_FEDIVBYZERO 1 /* #undef HAVE_FEENABLEEXCEPT */ diff --git a/pkg/pixman/gen.lua b/pkg/pixman/gen.lua index addc5bd7..99583ff2 100644 --- a/pkg/pixman/gen.lua +++ b/pkg/pixman/gen.lua @@ -1,9 +1,14 @@ cflags{ '-D HAVE_CONFIG_H', - '-I $dir', + '-I $outdir', '-I $outdir/include', } +build('cat', '$outdir/config.h', { + '$builddir/probe/HAVE___BUILTIN_CLZ', + '$dir/config.h', +}) + build('sed', '$outdir/include/pixman-version.h', '$srcdir/pixman/pixman-version.h.in', { expr={ '-e s,@PIXMAN_VERSION_MAJOR@,0,', @@ -11,16 +16,21 @@ build('sed', '$outdir/include/pixman-version.h', '$srcdir/pixman/pixman-version. '-e s,@PIXMAN_VERSION_MICRO@,0,', }, }) + pkg.hdrs = { copy('$outdir/include', '$srcdir/pixman', {'pixman.h'}), '$outdir/include/pixman-version.h', } +pkg.deps = { + '$dir/headers', + '$outdir/config.h', +} -- processor-specific features cflags{'-D USE_SSE2=1', '-D USE_SSSE3=1', '-D USE_X86_MMX=1'} -cc('pixman/pixman-mmx.c', {'$dir/headers'}, {cflags='$cflags -mmmx -Winline'}) -cc('pixman/pixman-sse2.c', {'$dir/headers'}, {cflags='$cflags -msse2 -Winline'}) -cc('pixman/pixman-ssse3.c', {'$dir/headers'}, {cflags='$cflags -mssse3 -Winline'}) +cc('pixman/pixman-mmx.c', nil, {cflags='$cflags -mmmx -Winline'}) +cc('pixman/pixman-sse2.c', nil, {cflags='$cflags -msse2 -Winline'}) +cc('pixman/pixman-ssse3.c', nil, {cflags='$cflags -mssse3 -Winline'}) local cpuobjs = {'pixman-mmx.c.o', 'pixman-sse2.c.o', 'pixman-ssse3.c.o'} lib('libpixman.a', expand{'pixman/', { @@ -55,6 +65,6 @@ lib('libpixman.a', expand{'pixman/', { 'pixman-trap.c', 'pixman-utils.c', cpuobjs, -}}, {'$dir/headers'}) +}}) fetch 'git' |
