Skip to content

Commit afec0dc

Browse files
committed
Use -mword-relocations -fno-optimize-sibling-calls in libretro PlayStation Vita builds
The Vita builds of RetroArch and some libretro cores use these two flags, supposedly to fix relocation-related bugs. (cherry picked from commit 3c43cd5)
1 parent 5754c8b commit afec0dc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

meson.build

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ if is_libretro
6464
error('LTO is required when building for PowerPC architectures. Please pass either `-Db_lto=true` or `-Druby_lto=true` to Meson.')
6565
endif
6666

67+
if is_vita
68+
compilers['c'].has_argument('-mword-relocations', required: true)
69+
compilers['cpp'].has_argument('-mword-relocations', required: true)
70+
libretro_cflags += '-mword-relocations'
71+
libretro_cppflags += '-mword-relocations'
72+
73+
compilers['c'].has_argument('-fno-optimize-sibling-calls', required: true)
74+
compilers['cpp'].has_argument('-fno-optimize-sibling-calls', required: true)
75+
libretro_cflags += '-fno-optimize-sibling-calls'
76+
libretro_cppflags += '-fno-optimize-sibling-calls'
77+
endif
78+
6779
if is_devkitarm
6880
compilers['c'].has_argument('-march=armv6k', required: true)
6981
compilers['cpp'].has_argument('-march=armv6k', required: true)

0 commit comments

Comments
 (0)