MTD_DEPENDENCIES += busybox
endif
+MTD_MAKE_OPTS = WITHOUT_LARGEFILE=1
+
+# If extended attributes are required, the acl package must
+# also be enabled which will also include the attr package.
+ifeq ($(BR2_PACKAGE_ACL),y)
+MTD_DEPENDENCIES += acl
+MTD_MAKE_OPTS += WITHOUT_XATTR=0
+else
+MTD_MAKE_OPTS += WITHOUT_XATTR=1
+endif
+
HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-e2fsprogs
define HOST_MTD_BUILD_CMDS
define MTD_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \
- BUILDDIR=$(@D) WITHOUT_XATTR=1 WITHOUT_LARGEFILE=1 -C $(@D) \
+ BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D) \
$(addprefix $(@D)/,$(MTD_TARGETS_y)) \
$(addprefix $(@D)/,$(MTD_STAGING_y))
endef