Skip to content

Commit a6a0a4d

Browse files
committed
try to support older binutils
EXTERN in a linker script doesn't work on ld 2.34, works on 2.43.1
1 parent e6f13b4 commit a6a0a4d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ target_: $(TARGET)
439439

440440
$(TARGET): $(OBJS)
441441
ifeq ($(PARTIAL_LINKING), 1)
442-
sed -e 's/.*/EXTERN(\0)/' frontend/libretro-extern > frontend/libretro-extern.T
443-
$(LD) -o $(basename $(TARGET))1.o -r --gc-sections -T frontend/libretro-extern.T $^
442+
$(LD) -o $(basename $(TARGET))1.o -r --gc-sections $(addprefix -u , $(shell cat frontend/libretro-extern)) $^
444443
$(OBJCOPY) --keep-global-symbols=frontend/libretro-extern $(basename $(TARGET))1.o $(basename $(TARGET)).o
445444
$(AR) rcs $@ $(basename $(TARGET)).o
446445
else ifeq ($(STATIC_LINKING), 1)

frontend/main.c

+2
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,9 @@ int emu_core_init(void)
516516
SysPrintf("Starting PCSX-ReARMed " REV "%s\n", get_build_info());
517517
SysPrintf("build time: " __DATE__ " " __TIME__ "\n");
518518

519+
#ifdef HAVE_RTHREADS
519520
pcsxr_sthread_init();
521+
#endif
520522
#ifndef NO_FRONTEND
521523
check_profile();
522524
check_memcards();

0 commit comments

Comments
 (0)