@@ -15,7 +15,7 @@ rp_module_help="ROM Extensions: .zip .7z\n\nCopy your MAME roms to either $romdi
15
15
rp_module_licence=" GPL2 https://raw.githubusercontent.com/mamedev/mame/master/COPYING"
16
16
rp_module_repo=" git https://github.com/mamedev/mame.git :_get_branch_mame"
17
17
rp_module_section=" exp"
18
- rp_module_flags=" !mali !armv6 !:\$ __gcc_version:-lt:7"
18
+ rp_module_flags=" !mali !armv6 !:\$ __gcc_version:-lt:7 nodistcc "
19
19
20
20
function _get_branch_mame() {
21
21
# starting with 0.265, GCC 10.3 or later is required for full C++17 support
@@ -52,8 +52,26 @@ function build_mame() {
52
52
53
53
local params=(NOWERROR=1 ARCHOPTS=" -U_FORTIFY_SOURCE -Wl,-s" PYTHON_EXECUTABLE=python3 OPTIMIZE=2 USE_SYSTEM_LIB_FLAC=1)
54
54
isPlatform " x11" && params+=(USE_QTDEBUG=1) || params+=(USE_QTDEBUG=0)
55
+
56
+ # array for storing ARCHOPTS_CXX parameters
57
+ local arch_opts_cxx=()
58
+
55
59
# when building on ARM enable 'fsigned-char' for compiled code, fixes crashes in a few drivers
56
- isPlatform " arm" || isPlatform " aarch64" && params+=(ARCHOPTS_CXX=-fsigned-char)
60
+ isPlatform " arm" || isPlatform " aarch64" && arch_opts_cxx+=(-fsigned-char)
61
+
62
+ # workaround g++-12 compiler bug/compilation issue on 32bit arm userland with aarch64 kernel on the rpi3 (cortex-a53)
63
+ # disabling -ftree-slp-vectorize works around the issue:
64
+ # {standard input}: Assembler messages:
65
+ # {standard input}:4045: Error: co-processor offset out of range
66
+ # make[2]: *** [skeleton.make:2727: obj/Release/src/mame/skeleton/scopus.o] Error 1
67
+ if [[ " $__gcc_version " -eq 12 ]] && isPlatform " rpi3" && isPlatform " 32bit" && [[ " $( uname -m) " == " aarch64" ]]; then
68
+ arch_opts_cxx+=(-fno-tree-slp-vectorize)
69
+ fi
70
+
71
+ # if we have any arch opts set, add them
72
+ if [[ ${# arch_opts_cxx[@]} -gt 0 ]]; then
73
+ params+=(ARCHOPTS_CXX=" ${arch_opts_cxx[*]} " )
74
+ fi
57
75
58
76
# force arm on arm platform - fixes building mame on when using 32bit arm userland with aarch64 kernel
59
77
isPlatform " arm" && params+=(PLATFORM=arm)
0 commit comments