diff --git a/deps/openlibm.mk b/deps/openlibm.mk index 7af66c6f66deec..77dd6233b6d381 100644 --- a/deps/openlibm.mk +++ b/deps/openlibm.mk @@ -7,9 +7,13 @@ $(eval $(call git-external,openlibm,OPENLIBM,,,$(BUILDDIR))) OPENLIBM_FLAGS := ARCH="$(ARCH)" REAL_ARCH="$(MARCH)" CC="$(CC)" FC="$(FC)" AR="$(AR)" OS="$(OS)" USECLANG=$(USECLANG) USEGCC=$(USEGCC) +# We do this awful awful thing where we override `__fenv_static` to be `OLM_DLLEXPORT` so that the fenv methods +# like `fesetround()` are exported on all platforms. +OPENLIBM_CFLAGS := "-D__fenv_static=OLM_DLLEXPORT" + ifneq ($(USE_BINARYBUILDER_OPENLIBM), 1) $(BUILDDIR)/$(OPENLIBM_SRC_DIR)/build-compiled: $(BUILDDIR)/$(OPENLIBM_SRC_DIR)/source-extracted - $(MAKE) -C $(dir $<) $(OPENLIBM_FLAGS) $(MAKE_COMMON) + CFLAGS_add="$(OPENLIBM_CFLAGS)" $(MAKE) -C $(dir $<) $(OPENLIBM_FLAGS) $(MAKE_COMMON) echo 1 > $@ $(eval $(call staged-install, \