vita: try to fix alloc
authornotaz <notasas@gmail.com>
Sun, 15 Dec 2024 22:35:53 +0000 (00:35 +0200)
committernotaz <notasas@gmail.com>
Sun, 15 Dec 2024 22:39:57 +0000 (00:39 +0200)
libretro/pcsx_rearmed#856

Makefile
Makefile.libretro

index 5227572..e0c6935 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -475,8 +475,12 @@ target_: $(TARGET)
 
 $(TARGET): $(OBJS)
 ifeq ($(PARTIAL_LINKING), 1)
-       $(LD) -o $(basename $(TARGET))1.o -r --gc-sections $(addprefix -u , $(shell cat frontend/libretro-extern)) $^
-       $(OBJCOPY) --keep-global-symbols=frontend/libretro-extern $(basename $(TARGET))1.o $(basename $(TARGET)).o
+       $(LD) -o $(basename $(TARGET))1.o -r --gc-sections \
+               $(addprefix -u ,$(shell cat frontend/libretro-extern)) \
+               $(addprefix -u ,$(EXTRA_EXTERN_SYMS)) $^
+       $(OBJCOPY) --keep-global-symbols=frontend/libretro-extern \
+               $(addprefix -G ,$(EXTRA_EXTERN_SYMS)) \
+               $(basename $(TARGET))1.o $(basename $(TARGET)).o
        $(AR) rcs $@ $(basename $(TARGET)).o
 else ifeq ($(STATIC_LINKING), 1)
        $(AR) rcs $@ $^
index dc9aefa..c8f99f9 100644 (file)
@@ -348,6 +348,7 @@ else ifeq ($(platform), vita)
        NO_MMAP := 1
        NO_POSIX_MEMALIGN := 1
        HAVE_PHYSICAL_CDROM = 0
+       EXTRA_EXTERN_SYMS += _newlib_vm_size_user
 
 # CTR(3DS)
 else ifeq ($(platform), ctr)