diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk index a0976b0701..5a96c11309 100644 --- a/package/zstd/zstd.mk +++ b/package/zstd/zstd.mk @@ -12,6 +12,7 @@ ZSTD_LICENSE_FILES = LICENSE COPYING ZSTD_CPE_ID_VENDOR = facebook ZSTD_CPE_ID_PRODUCT = zstandard +ZSTD_OPTS += ZSTD_LEGACY_SUPPORT=0 ifeq ($(BR2_PACKAGE_ZLIB),y) ZSTD_DEPENDENCIES += zlib ZSTD_OPTS += HAVE_ZLIB=1 @@ -33,6 +34,9 @@ else ZSTD_OPTS += HAVE_LZ4=0 endif +# zstd will append -O3 after $(CFLAGS), use MOREFLAGS to override again +ZSTD_OPTS += MOREFLAGS="$(TARGET_OPTIMIZATION)" + ifeq ($(BR2_STATIC_LIBS),y) ZSTD_BUILD_LIBS = libzstd.a ZSTD_INSTALL_LIBS = install-static