ANDROID: add --wrap=fopen linker flag to src/Makefile

This commit is contained in:
federico.gherardi 2026-03-01 00:33:34 +01:00
parent 1517212ec6
commit cd0fa4bc47

View File

@ -607,6 +607,9 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
LDFLAGS += -Lsrc LDFLAGS += -Lsrc
# Avoid unresolved symbol pointing to external main() # Avoid unresolved symbol pointing to external main()
LDFLAGS += -Wl,-undefined,dynamic_lookup LDFLAGS += -Wl,-undefined,dynamic_lookup
# Wrap fopen at link time so all code (including third-party libs) goes
# through __wrap_fopen, which handles Android APK asset loading
LDFLAGS += -Wl,--wrap=fopen
endif endif
# Define libraries required on linking: LDLIBS # Define libraries required on linking: LDLIBS