ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y)
# i.MX8M needs a different binary
define HOST_IMX_MKIMAGE_BUILD_CMDS
- $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)/iMX8M -f soc.mak mkimage_imx8
+ $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
+ CFLAGS="$(HOST_CFLAGS) -std=c99" \
+ -C $(@D)/iMX8M -f soc.mak mkimage_imx8
endef
define HOST_IMX_MKIMAGE_INSTALL_CMDS
$(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8
else
# i.MX8 and i.MX8X
define HOST_IMX_MKIMAGE_BUILD_CMDS
- $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) MKIMG=mkimage_imx8 mkimage_imx8
+ $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
+ CFLAGS="$(HOST_CFLAGS) -std=c99" \
+ -C $(@D) MKIMG=mkimage_imx8 mkimage_imx8
endef
define HOST_IMX_MKIMAGE_INSTALL_CMDS
$(INSTALL) -D -m 755 $(@D)/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8