[Scummvm-git-logs] scummvm master -> b56c0d796ebcb4a3a8ea966cc3b8ec3e02b452be
spleen1981
noreply at scummvm.org
Wed Dec 24 22:18:58 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
b56c0d796e LIBRETRO: BUILD: fix emscripten build
Commit: b56c0d796ebcb4a3a8ea966cc3b8ec3e02b452be
https://github.com/scummvm/scummvm/commit/b56c0d796ebcb4a3a8ea966cc3b8ec3e02b452be
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2025-12-24T23:18:38+01:00
Commit Message:
LIBRETRO: BUILD: fix emscripten build
Changed paths:
A backends/platform/libretro/overrides.mk
backends/platform/libretro/Makefile
diff --git a/backends/platform/libretro/Makefile b/backends/platform/libretro/Makefile
index 3c0421663ea..2b5b8f7be5b 100644
--- a/backends/platform/libretro/Makefile
+++ b/backends/platform/libretro/Makefile
@@ -383,8 +383,7 @@ else ifeq ($(platform), emscripten)
TARGET := $(TARGET_NAME)_libretro_$(platform).bc
AR_ALONE := emar
AR := emar rcs
- datadir = /share/scummvm
- DEFINES += -DEMSCRIPTEN -DUSE_CXX11 -DDATA_PATH=\"$(datadir)\"
+ DEFINES += -DEMSCRIPTEN -DUSE_CXX11
CXXFLAGS += -std=c++11
STATIC_LINKING = 1
USE_LIBCO = 0
@@ -617,6 +616,8 @@ CFLAGS += $(DEFINES) $(INCLUDES)
# Include the build instructions for all modules
include $(addprefix $(SCUMMVM_PATH)/, $(addsuffix /module.mk,$(MODULES)))
+include $(ROOT_PATH)/overrides.mk
+
# Depdir information
DEPDIRS := $(addsuffix $(DEPDIR),$(MODULE_PATHS))
diff --git a/backends/platform/libretro/overrides.mk b/backends/platform/libretro/overrides.mk
new file mode 100644
index 00000000000..7abe5fc376f
--- /dev/null
+++ b/backends/platform/libretro/overrides.mk
@@ -0,0 +1,20 @@
+# Specific platform overrides, to be dropped asap...
+
+# -DEMSCRIPTEN flag should not be needed for emscripten build of libretro core, as it is a specific Project flag
+# needed for emscripten backend. Anyways in several places, both in ScummVM and libretro-common,
+# it is used as platform flag instead of __EMSCRIPTEN__, hence we need to keep EMSCRIPTEN flag for now, and apply
+# the following workaround to solve relevant conflicts of the libretro core with emscripten backend at build time.
+ifeq ($(platform), emscripten)
+backends/fs/emscripten/%.o:
+ @:
+backends/libbackends.a:
+ @:
+MODULE_OBJS-backends := $(filter-out backends/fs/emscripten/%,$(MODULE_OBJS-backends))
+backends/libbackends.a: $(MODULE_OBJS-backends)
+ $(AR) $@ $(MODULE_OBJS-backends)
+ $(RANLIB) $@
+
+$(SCUMMVM_PATH)/gui/textviewer.o: CXXFLAGS += -UEMSCRIPTEN
+$(SCUMMVM_PATH)/gui/textviewer.o: CFLAGS += -UEMSCRIPTEN
+$(SCUMMVM_PATH)/gui/textviewer.o: CPPFLAGS += -UEMSCRIPTEN
+endif
More information about the Scummvm-git-logs
mailing list