libzstd: Explicitly define ZSTD_DISABLE_ASM

On FreeBSD, ZSTD_ASM_SUPPORTED is defined as 0, but on macOS and Linux
it is defined as 1, yet we don't build any of the assembly sources.
Rather than add them just for bootstrapping on non-FreeBSD, explicitly
define ZSTD_DISABLE_ASM so they're not needed and everything is
consistent.

This fixes building a bootstrap LLVM toolchain on non-FreeBSD amd64 (the
only architecture with assembly available).

Reviewed by:	emaste, imp
Differential Revision:	https://reviews.freebsd.org/D41543
This commit is contained in:
Jessica Clarke 2023-08-22 21:01:03 +01:00
parent c9b2751d76
commit 4101bcfa18

View File

@ -38,6 +38,11 @@ CFLAGS+= -I${ZSTDDIR}/lib -I${ZSTDDIR}/lib/common -DXXH_NAMESPACE=ZSTD_ \
-DZSTD_MULTITHREAD=1 -fvisibility=hidden
LIBADD= pthread
# ZSTD_ASM_SUPPORTED is 0 on FreeBSD but 1 on macOS and Linux. Since we build
# this as a bootstrap library and don't include any assembly sources in SRCS,
# explicitly disable assembly.
CFLAGS+= -DZSTD_DISABLE_ASM
PRIVATELIB= yes
PACKAGE= runtime