From 4101bcfa18c0f12a3294971f2f68f354d3e1d864 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Tue, 22 Aug 2023 21:01:03 +0100 Subject: [PATCH] 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 --- lib/libzstd/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libzstd/Makefile b/lib/libzstd/Makefile index 7b8211d0a584..080b6247fee8 100644 --- a/lib/libzstd/Makefile +++ b/lib/libzstd/Makefile @@ -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