From e0374db328c69a11aeeb424139fa9b1022e2ad22 Mon Sep 17 00:00:00 2001 From: George Stagg Date: Thu, 7 Dec 2023 09:33:35 +0000 Subject: [PATCH] Add WASM_FFLAGS Make variable when building stage 2 R --- R/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/R/Makefile b/R/Makefile index ae7b1f84..3293404e 100644 --- a/R/Makefile +++ b/R/Makefile @@ -38,6 +38,11 @@ WASM_CFLAGS := $(WASM_CFLAGS) WASM_CFLAGS += $(WASM_OPT) WASM_CFLAGS += -fPIC +WASM_FFLAGS := $(WASM_FFLAGS) +WASM_FFLAGS += --target=wasm32-unknown-emscripten +WASM_FFLAGS += -O2 +WASM_FFLAGS += -fPIC + WASM_LDFLAGS := $(WASM_LDFLAGS) WASM_LDFLAGS += -fwasm-exceptions WASM_LDFLAGS += -s SUPPORT_LONGJMP=wasm @@ -160,7 +165,7 @@ $(BUILD)/state/R-$(R_VERSION)/r-stage2-configured: $(BUILD)/state/R-$(R_VERSION) CFLAGS="$(STAGE2_CFLAGS)" \ LDFLAGS="$(STAGE2_LDFLAGS)" \ LIBnn="lib" \ - FFLAGS="-fPIC" \ + FFLAGS="$(WASM_FFLAGS)" \ FPICFLAGS="-fPIC" \ FC="$(EMFC)" \ emconfigure ../configure \