From a6a0a4d316ca2aef3dba1ccf76b9639d61c51247 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 26 Oct 2024 23:42:05 +0300 Subject: [PATCH] try to support older binutils EXTERN in a linker script doesn't work on ld 2.34, works on 2.43.1 --- Makefile | 3 +-- frontend/main.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f3730ee2..9cc6088f 100644 --- a/Makefile +++ b/Makefile @@ -439,8 +439,7 @@ target_: $(TARGET) $(TARGET): $(OBJS) ifeq ($(PARTIAL_LINKING), 1) - sed -e 's/.*/EXTERN(\0)/' frontend/libretro-extern > frontend/libretro-extern.T - $(LD) -o $(basename $(TARGET))1.o -r --gc-sections -T frontend/libretro-extern.T $^ + $(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 $(AR) rcs $@ $(basename $(TARGET)).o else ifeq ($(STATIC_LINKING), 1) diff --git a/frontend/main.c b/frontend/main.c index 48006a67..963f6c81 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -516,7 +516,9 @@ int emu_core_init(void) SysPrintf("Starting PCSX-ReARMed " REV "%s\n", get_build_info()); SysPrintf("build time: " __DATE__ " " __TIME__ "\n"); +#ifdef HAVE_RTHREADS pcsxr_sthread_init(); +#endif #ifndef NO_FRONTEND check_profile(); check_memcards(); -- 2.39.5