Skip to content
2 changes: 2 additions & 0 deletions pkg/dav1d/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
#define CONFIG_8BPC 1
#define CONFIG_LOG 1
#define ENDIANNESS_BIG 0
#if defined(__x86_64__) && !defined(__ILP32__)
#define HAVE_ASM 1
#define HAVE_AVX512ICL 1
#endif
#define HAVE_CLOCK_GETTIME 1
#define HAVE_DLSYM 1
#define HAVE_POSIX_MEMALIGN 1
Expand Down
1 change: 1 addition & 0 deletions pkg/linux-headers/gen.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local arch = ({
aarch64='arm64',
x86_64='x86',
riscv64='riscv',
})[config.target.platform:match('[^-]*')]
sub('tools.ninja', function()
toolchain(config.host)
Expand Down
34 changes: 34 additions & 0 deletions pkg/linux-headers/riscv.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
return {
-- <cd src/arch/riscv/include/uapi && find * -name '*.h' -exec printf "\t'%s',\n" {} + | LC_COLLATE=C sort
'asm/auxvec.h',
'asm/bitsperlong.h',
'asm/bpf_perf_event.h',
'asm/byteorder.h',
'asm/elf.h',
'asm/hwcap.h',
'asm/hwprobe.h',
'asm/kvm.h',
'asm/perf_regs.h',
'asm/ptrace.h',
'asm/setup.h',
'asm/sigcontext.h',
'asm/ucontext.h',
'asm/unistd.h',
'asm/vendor/mips.h',
'asm/vendor/sifive.h',
'asm/vendor/thead.h',
unistd = {
-- arch/riscv/kernel/Makefile.syscalls
{
dst='unistd_32.h',
src='scripts/syscall.tbl',
abi='common|32|riscv|memfd_secret',
},
{
dst='unistd_64.h',
src='scripts/syscall.tbl',
abi='common|64|riscv|rlimit|memfd_secret',
},
},
generic={},
}
39 changes: 39 additions & 0 deletions pkg/musl/riscv64.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
return {
srcs={
-- <cd src && printf "\t\t'%s',\n" src/*/riscv64/*.[csS]
'src/fenv/riscv64/fenv-sf.c',
'src/fenv/riscv64/fenv.S',
'src/ldso/riscv64/dlsym.s',
'src/ldso/riscv64/tlsdesc.s',
'src/math/riscv64/copysign.c',
'src/math/riscv64/copysignf.c',
'src/math/riscv64/fabs.c',
'src/math/riscv64/fabsf.c',
'src/math/riscv64/fma.c',
'src/math/riscv64/fmaf.c',
'src/math/riscv64/fmax.c',
'src/math/riscv64/fmaxf.c',
'src/math/riscv64/fmin.c',
'src/math/riscv64/fminf.c',
'src/math/riscv64/sqrt.c',
'src/math/riscv64/sqrtf.c',
'src/process/riscv64/vfork.s',
'src/setjmp/riscv64/longjmp.S',
'src/setjmp/riscv64/setjmp.S',
'src/signal/riscv64/restore.s',
'src/signal/riscv64/sigsetjmp.s',
'src/thread/riscv64/__set_thread_area.s',
'src/thread/riscv64/__unmapself.s',
'src/thread/riscv64/clone.s',
'src/thread/riscv64/syscall_cp.s',
},
bits={
-- <cd src/arch/riscv64/bits && printf "\t\t'%s',\n" *.h
'fenv.h',
'float.h',
'setjmp.h',
'signal.h',
'user.h',
},
}

4 changes: 4 additions & 0 deletions pkg/pcre/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,20 @@
/* #undef PTHREAD_CREATE_JOINABLE */
#define STDC_HEADERS 1
#ifdef __GNUC__
#if defined(__x86_64__) || defined(__aarch64__)
#define SUPPORT_JIT /**/
#endif
#endif
/* #undef SUPPORT_LIBBZ2 */
/* #undef SUPPORT_LIBEDIT */
/* #undef SUPPORT_LIBREADLINE */
/* #undef SUPPORT_LIBZ */
/* #undef SUPPORT_PCRE16 */
/* #undef SUPPORT_PCRE32 */
#define SUPPORT_PCRE8 /**/
#if defined(__x86_64__) || defined(__aarch64__)
#define SUPPORT_PCREGREP_JIT /**/
#endif
#define SUPPORT_UCP /**/
#define SUPPORT_UTF /**/
/* #undef SUPPORT_VALGRIND */
Expand Down
7 changes: 6 additions & 1 deletion pkg/strace/gen.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
local targets = {
riscv64={
cflags={'-D RISCV64=1'},
ioctls=0,
},
aarch64={
cflags={'-D AARCH64=1'},
ioctls=1,
Expand Down Expand Up @@ -75,7 +79,7 @@ makempers('printers.h', 'printers.awk')
makempers('native_printer_decls.h', 'printerdecls.awk')
makempers('native_printer_defs.h', 'printerdefs.awk')

build('cpp', '$outdir/syscallent.i', '$srcdir/src/linux/x86_64/syscallent.h')
build('cpp', '$outdir/syscallent.i', '$srcdir/src/linux/'..arch..'/syscallent.h')
build('awk', '$outdir/scno-syscallent.h', {'$outdir/syscallent.i', '|', '$dir/scno.awk'}, {
expr='-f $dir/scno.awk',
})
Expand All @@ -92,6 +96,7 @@ local syscalls = expand{'$srcdir/src/linux/', {
'generic/subcallent.h',
'generic/syscallent-common.h',
'x86_64/syscallent.h',
'riscv64/syscallent.h',
}}
build('awk', '$outdir/sen.h', {syscalls, '|', '$dir/sen.awk'}, {
expr='-f $dir/sen.awk',
Expand Down