Skip to content

Commit 810426d

Browse files
committed
mame: force 'char' to be signed on ARM platforms
Forcing 'char' to be signed fixes crashing in some drivers, needed on ARM. The default behavior for 'char' is arch/ISA specific, see: https://stackoverflow.com/questions/46463064
1 parent a9602fc commit 810426d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scriptmodules/emulators/mame.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ function build_mame() {
4444
rpSwap on 4096
4545
fi
4646

47-
# Compile MAME
4847
local params=(NOWERROR=1 ARCHOPTS=-U_FORTIFY_SOURCE PYTHON_EXECUTABLE=python3)
48+
# when building on ARM enable 'fsigned-char' for compiled code, fixes crashes in a few drivers
49+
isPlatform "arm" || isPlatform "aarch64" && params+=(ARCHOPTS_CXX=-fsigned-char)
4950
QT_SELECT=5 make "${params[@]}"
5051
strip mame
5152

0 commit comments

Comments
 (0)