wrk: fix CFLAGS and LDFLAGS

The build for 4.0.2_1 was missing a handful of CFLAGS and LDFLAGS
necessary to correctly build and link wrk. This fixes that by simply
setting both in prebuild, borrowing their values from wrk's Makefile.
This is necessary since wrk's Makefile doesn't handle changes to CFLAGS
or LDFLAGS well (since the gnu-makefile build style passes these, and
hardening sets some flags, wrk's Makefile used only those in 4.0.2_1).

Closes: #10108 [via git-merge-pr]
This commit is contained in:
Noel Cower 2017-12-18 20:06:45 -08:00 committed by Jürgen Buchmüller
parent 4174237ceb
commit 42bce6b564
1 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'wrk'
pkgname=wrk
version=4.0.2
revision=1
revision=2
build_style=gnu-makefile
make_build_args="VER=${version} WITH_OPENSSL=/usr WITH_LUAJIT=/usr"
hostmakedepends="LuaJIT"
@ -30,6 +30,9 @@ pre_build() {
luajit -b -a x86 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 ${CFLAGS}"
LDFLAGS="-Wl,-E ${LDFLAGS}"
}
do_install() {