[Buildroot] [git commit] package/zstd: observe Buildroot optimisation flags
From: Arnout Vandecappelle (Essensium/Mind) <hidden>
Date: 2021-08-04 14:30:34
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Arnout Vandecappelle (Essensium/Mind) <hidden>
Date: 2021-08-04 14:30:34
Subsystem:
the rest · Maintainer:
Linus Torvalds
commit: https://git.buildroot.net/buildroot/commit/?id=8d56423d3d2308c620e61a952e36999c89e4d682 branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master Use Buildroot's setting for optimization, zstd's build system overrides CFLAGS (adds -O3), but MOREFLAGS can override again. Quick tests show that using -O2 (like buildroot) is actually a little faster than -O3 on x86_64 Atoms. Disable the legacy format, these are just needed for decompressing files created with pre-release version. Signed-off-by: Norbert Lange <redacted> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <redacted> --- package/zstd/zstd.mk | 4 ++++ 1 file changed, 4 insertions(+)
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
_______________________________________________ buildroot mailing list buildroot@busybox.net http://lists.busybox.net/mailman/listinfo/buildroot