package/zstd: observe Buildroot optimisation flags
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 <nolange79@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
8dfd7a1f90
commit
8d56423d3d
@ -12,6 +12,7 @@ ZSTD_LICENSE_FILES = LICENSE COPYING
|
|||||||
ZSTD_CPE_ID_VENDOR = facebook
|
ZSTD_CPE_ID_VENDOR = facebook
|
||||||
ZSTD_CPE_ID_PRODUCT = zstandard
|
ZSTD_CPE_ID_PRODUCT = zstandard
|
||||||
|
|
||||||
|
ZSTD_OPTS += ZSTD_LEGACY_SUPPORT=0
|
||||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||||
ZSTD_DEPENDENCIES += zlib
|
ZSTD_DEPENDENCIES += zlib
|
||||||
ZSTD_OPTS += HAVE_ZLIB=1
|
ZSTD_OPTS += HAVE_ZLIB=1
|
||||||
@ -33,6 +34,9 @@ else
|
|||||||
ZSTD_OPTS += HAVE_LZ4=0
|
ZSTD_OPTS += HAVE_LZ4=0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# zstd will append -O3 after $(CFLAGS), use MOREFLAGS to override again
|
||||||
|
ZSTD_OPTS += MOREFLAGS="$(TARGET_OPTIMIZATION)"
|
||||||
|
|
||||||
ifeq ($(BR2_STATIC_LIBS),y)
|
ifeq ($(BR2_STATIC_LIBS),y)
|
||||||
ZSTD_BUILD_LIBS = libzstd.a
|
ZSTD_BUILD_LIBS = libzstd.a
|
||||||
ZSTD_INSTALL_LIBS = install-static
|
ZSTD_INSTALL_LIBS = install-static
|
||||||
|
Loading…
Reference in New Issue
Block a user