wrk: fix build with LuaJIT 2.1, add aarch64, ppc64 targets

This commit is contained in:
q66 2018-12-17 19:19:03 +01:00 committed by maxice8
parent 18e4ecb673
commit 9a000b747b

View file

@ -16,12 +16,13 @@ patch_args="-Np1"
pre_build() {
case "$XBPS_TARGET_MACHINE" in
aarch64*)
broken="LuaJIT not supported on $XBPS_TARGET_MACHINE"
;;
mips*)
broken="__sync_fetch_and_add_8 and __sync_val_compare_and_swap_8 supported on $XBPS_TARGET_MACHINE"
;;
aarch64*)
make obj
luajit -b -a arm64 src/wrk.lua obj/bytecode.o
;;
armv[5-7]*)
make obj
luajit -b -a arm src/wrk.lua obj/bytecode.o
@ -30,9 +31,17 @@ pre_build() {
make obj
luajit -b -a x86 src/wrk.lua obj/bytecode.o
;;
ppc64le*)
make obj
luajit -b -a ppc64le src/wrk.lua obj/bytecode.o
;;
ppc64*)
make obj
luajit -b -a ppc64 src/wrk.lua obj/bytecode.o
;;
esac
# Borrow flags from Makefile
CFLAGS="-std=c99 -Wall -D_REENTRANT -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -I${XBPS_CROSS_BASE}/usr/include/luajit-2.0 ${CFLAGS}"
CFLAGS="-std=c99 -Wall -D_REENTRANT -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -I${XBPS_CROSS_BASE}/usr/include/luajit-2.1 ${CFLAGS}"
LDFLAGS="-Wl,-E ${LDFLAGS}"
}