diff --git a/Makefile b/Makefile index ca8778162..12ed1e51b 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ export TARGET_PC_SYSTEMS = linux export TARGET_MCU_SYSTEMS = $(addprefix stm32f,3 4) export TARGET_PC_MODS = musl sanitize valgrind \ - musl-valgrind + musl-valgrind float64 export TARGET_MCU_MODS = diff --git a/Makefile.mk b/Makefile.mk index 263b774e6..43e288bc4 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -160,6 +160,16 @@ else OPTION_LIBC := raw endif +ifeq ($(filter float64,$(TARGET_MODS)), float64) + ifeq ($(OPTION_MCU),enable) + $(error MCU target doesn\'t support float64) + endif + + OPTION_FLOAT64 := enable +else + OPTION_FLOAT64 := disable +endif + ifeq ($(filter sanitize,$(TARGET_MODS)), sanitize) ifeq ($(OPTION_LIBC),musl) $(error ASAN and LIBC_MUSL are mutually exclusive) @@ -335,6 +345,10 @@ ifeq ($(OPTION_NDEBUG),enable) DEFINES_JERRY += -DJERRY_NDEBUG endif +ifeq ($(OPTION_FLOAT64),enable) + DEFINES_JERRY += -DCONFIG_ECMA_NUMBER_TYPE=CONFIG_ECMA_NUMBER_FLOAT64 +endif + ifeq ($(OPTION_MCU),disable) MACHINE_TYPE=$(shell uname -m) ifeq ($(MACHINE_TYPE),x86_64)