diff --git a/srcpkgs/perl/template b/srcpkgs/perl/template index b0551259f45..f469487b2e6 100644 --- a/srcpkgs/perl/template +++ b/srcpkgs/perl/template @@ -165,21 +165,14 @@ do_configure() { fi LDFLAGS+=" -pthread" - # perl-cross autodetection fails. Need perl -V:lseeksize = 8. - # (default on musl.) - case "$XBPS_TARGET_MACHINE" in - i686|armv5tel|armv6l|armv7l|aarch64|ppc64le|ppc64|ppc) - HOSTLDFLAGS+=" -pthread" - export HOSTLDFLAGS - CFLAGS+=" -D_FILE_OFFSET_BITS=64 -DLARGE_FILE_SUPPORT64 ";; - *-musl) - HOSTCFLAGS+=" -D_GNU_SOURCE" - export HOSTCFLAGS - HOSTLDFLAGS+=" -pthread" - export HOSTLDFLAGS - CFLAGS+=" -DNO_POSIX_2008_LOCALE" - CFLAGS+=" -D_GNU_SOURCE";; - esac + export HOSTLDFLAGS+=" -pthread" + + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + export HOSTCFLAGS+=" -D_GNU_SOURCE" + export CFLAGS+=" -DNO_POSIX_2008_LOCALE -D_GNU_SOURCE" + else + export CFLAGS+=" -D_FILE_OFFSET_BITS=64 -DLARGE_FILE_SUPPORT64" + fi export LD="$CC" ./configure --prefix=/usr $_args \