Compile with -ffp-mode=full for armclang (#2517) This is needed due to multiple uses of NaN and Infinity which is not supported with the default -ffp-mode=std. BUG=#2518
diff --git a/tensorflow/lite/micro/tools/make/Makefile b/tensorflow/lite/micro/tools/make/Makefile index 8eaed42..90b0c29 100644 --- a/tensorflow/lite/micro/tools/make/Makefile +++ b/tensorflow/lite/micro/tools/make/Makefile
@@ -860,6 +860,7 @@ # These are microcontroller-specific rules for converting the ELF output # of the linker into a binary image that can be loaded directly. ifeq ($(TOOLCHAIN), armclang) + CXXFLAGS += -ffp-mode=full FROMELF := ${TARGET_TOOLCHAIN_ROOT}$(TARGET_TOOLCHAIN_PREFIX)fromelf $(BINDIR)%.bin: $(BINDIR)% @mkdir -p $(dir $@)
diff --git a/tensorflow/lite/micro/tools/make/targets/cortex_m_corstone_300_makefile.inc b/tensorflow/lite/micro/tools/make/targets/cortex_m_corstone_300_makefile.inc index 64d0662..c0ae058 100644 --- a/tensorflow/lite/micro/tools/make/targets/cortex_m_corstone_300_makefile.inc +++ b/tensorflow/lite/micro/tools/make/targets/cortex_m_corstone_300_makefile.inc
@@ -97,8 +97,7 @@ FLAGS_ARMC = \ --target=arm-arm-none-eabi \ -Wno-unused-private-field \ - -mcpu=$(MCPU_OPTION) \ - -ffp-mode=full + -mcpu=$(MCPU_OPTION) # Pass comma separated linker options to armlink ARMC6_LDFLAGS += -Wl,--strict,--summary_stderr,--info,summarysizes,--map