From: Miodrag Milanović Date: Fri, 27 May 2022 08:13:44 +0000 (+0200) Subject: Merge pull request #3053 from DanielHuisman/pr-2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0c71ed5945716e5719c09f73f056fc6a4834042;p=yosys.git Merge pull request #3053 from DanielHuisman/pr-2 Fix emcc warnings for WebAssembly build --- b0c71ed5945716e5719c09f73f056fc6a4834042 diff --cc Makefile index e4ae67473,8abfd7124..bf5daac3b --- a/Makefile +++ b/Makefile @@@ -259,16 -246,17 +259,17 @@@ ABCMKARGS += ARCHFLAGS="-DABC_USE_STDIN else ifeq ($(CONFIG),emcc) CXX = emcc LD = emcc -CXXFLAGS := -std=c++11 $(filter-out -fPIC -ggdb,$(CXXFLAGS)) +CXXFLAGS := -std=$(CXXSTD) $(filter-out -fPIC -ggdb,$(CXXFLAGS)) ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H -DABC_MEMALIGN=8" - EMCCFLAGS := -Os -Wno-warn-absolute-paths - EMCCFLAGS += --memory-init-file 0 --embed-file share -s NO_EXIT_RUNTIME=1 - EMCCFLAGS += -s EXPORTED_FUNCTIONS="['_main','_run','_prompt','_errmsg','_memset']" - EMCCFLAGS += -s TOTAL_MEMORY=134217728 - EMCCFLAGS += -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' + EMCC_CXXFLAGS := -Os -Wno-warn-absolute-paths + EMCC_LDFLAGS := --memory-init-file 0 --embed-file share + EMCC_LDFLAGS := -s NO_EXIT_RUNTIME=1 + EMCC_LDFLAGS += -s EXPORTED_FUNCTIONS="['_main','_run','_prompt','_errmsg','_memset']" + EMCC_LDFLAGS += -s TOTAL_MEMORY=134217728 + EMCC_LDFLAGS += -s EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' # https://github.com/kripken/emscripten/blob/master/src/settings.js - CXXFLAGS += $(EMCCFLAGS) - LDFLAGS += $(EMCCFLAGS) + CXXFLAGS += $(EMCC_CXXFLAGS) + LDFLAGS += $(EMCC_LDFLAGS) LDLIBS = EXE = .js