Skip to content

Commit

Permalink
libzstd: Explicitly define ZSTD_DISABLE_ASM
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jrtc27 committed Aug 22, 2023
1 parent c9b2751 commit 4101bcf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/libzstd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4101bcf

Please sign in to comment.