diff --git a/package/libdeflate/libdeflate.mk b/package/libdeflate/libdeflate.mk index 67e97c6e5e..c09a033325 100644 --- a/package/libdeflate/libdeflate.mk +++ b/package/libdeflate/libdeflate.mk @@ -9,8 +9,17 @@ LIBDEFLATE_SITE = $(call github,ebiggers,libdeflate,v$(LIBDEFLATE_VERSION)) LIBDEFLATE_LICENSE = MIT LIBDEFLATE_LICENSE_FILES = COPYING LIBDEFLATE_INSTALL_STAGING = YES + +LIBDEFLATE_CFLAGS = -D_DEFAULT_SOURCE + +# Thumb build is broken, build in ARM mode, since all architectures +# that support Thumb1 also support ARM. +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +LIBDEFLATE_CFLAGS += -marm +endif + LIBDEFLATE_CONF_OPTS = \ - -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -D_DEFAULT_SOURCE" + -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) $(LIBDEFLATE_CFLAGS)" ifeq ($(BR2_SHARED_LIBS),y) LIBDEFLATE_CONF_OPTS += \