perl: add -D_GNU_SOURCE on musl to find correct prototype for memmem

Also enable -Wall so things like this can be detected earlier.
This commit is contained in:
Leah Neukirchen 2017-09-19 19:09:18 +02:00
parent 877afee9eb
commit 3ff767cb5f
1 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# Template build file for 'perl'.
pkgname=perl
version=5.26.0
revision=1
revision=2
_perl_cross_version=1.1.6
build_style=gnu-configure
hostmakedepends="less"
@ -169,13 +169,15 @@ do_configure() {
# (default on musl.)
case "$XBPS_TARGET_MACHINE" in
i686|armv6l|armv7l)
CFLAGS+=" -D_FILE_OFFSET_BITS=64 -DLARGE_FILE_SUPPORT "
CFLAGS+=" -D_FILE_OFFSET_BITS=64 -DLARGE_FILE_SUPPORT ";;
*-musl)
CFLAGS+=" -D_GNU_SOURCE";;
esac
export LD="$CC"
./configure --prefix=/usr $_args \
-Dcccdlflags="-fPIC" \
-Doptimize=" ${CFLAGS} " -Dccflags=" ${CFLAGS} " \
-Doptimize=" -Wall ${CFLAGS} " -Dccflags=" ${CFLAGS} " \
-Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}" \
-Dperl_static_inline='static __inline__' -Dd_static_inline ||
{