Skip to content

Commit fe923e9

Browse files
committed
Drop support for GCC < 10.3, clang 6, SDL < 2.0.14 and Qt 5.10.
1 parent 4d166f4 commit fe923e9

File tree

6 files changed

+56
-125
lines changed

6 files changed

+56
-125
lines changed

docs/source/initialsetup/compilingmame.rst

+15-16
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ All Platforms
99
-------------
1010

1111
* To compile MAME, you need a C++17 compiler and runtime library. We
12-
support building with GCC version 7.2 or later and clang version 6 or
13-
later. MAME should run with GNU libstdc++ version 7.2 or later or
14-
libc++ version 7 or later. The initial release of any major version
12+
support building with GCC version 10.3 or later and clang version 11
13+
or later. MAME should run with GNU libstdc++ version 10.3 or later or
14+
libc++ version 11 or later. The initial release of any major version
1515
of GCC should be avoided. For example, if you want to compile MAME
16-
with GCC 10, you should use version 10.3 or later.
16+
with GCC 12, you should use version 12.1 or later.
1717

1818
* Whenever you are changing build parameters, (for example changing
1919
optimisation settings, or adding tools to the compile list), or system
@@ -98,7 +98,7 @@ building MAME on a 64-bit system. Instructions may need to be adjusted for
9898
use the portable SDL (Simple DirectMedia Layer) interfaces instead, you can
9999
add **OSD=sdl** to the make options. The main emulator binary will have an
100100
``sdl`` prefix prepended (e.g. ``sdlmame.exe``). You
101-
will need to install the MSYS2 packages for SDL 2 version 2.0.6 or later.
101+
will need to install the MSYS2 packages for SDL 2 version 2.0.14 or later.
102102
* By default, MAME will include the native Windows debugger. To also include
103103
the portable Qt debugger, add **USE_QTDEBUG=1** to the make options. You
104104
will need to install the MSYS2 packages for Qt 5.
@@ -251,10 +251,15 @@ Fedora Linux
251251
------------
252252

253253
You’ll need a few prerequisites from your Linux distribution. Make sure you get
254-
SDL2 2.0.6 or later as earlier versions lack required functionality::
254+
SDL 2 version 2.0.14 or later as earlier versions lack required functionality::
255255

256256
sudo dnf install gcc gcc-c++ SDL2-devel SDL2_ttf-devel libXi-devel libXinerama-devel qt5-qtbase-devel qt5-qttools expat-devel fontconfig-devel alsa-lib-devel pulseaudio-libs-devel
257257

258+
If you want to use the more efficient LLVM tools for archiving static libraries
259+
and linking, you’ll need to install the corresponding packages::
260+
261+
sudo dnf install lld llvm
262+
258263
Compilation is exactly as described above in All Platforms.
259264

260265
To build the HTML user/developer documentation, you’ll need Sphinx, as well as
@@ -273,7 +278,7 @@ Debian and Ubuntu (including Raspberry Pi and ODROID devices)
273278
-------------------------------------------------------------
274279

275280
You’ll need a few prerequisites from your Linux distribution. Make sure you get
276-
SDL2 2.0.6 or later as earlier versions lack required functionality::
281+
SDL 2 version 2.0.14 or later as earlier versions lack required functionality::
277282

278283
sudo apt-get install git build-essential python3 libsdl2-dev libsdl2-ttf-dev libfontconfig-dev libpulse-dev qtbase5-dev qtbase5-dev-tools qtchooser qt5-qmake
279284

@@ -299,9 +304,8 @@ Compilation is exactly as described above in All Platforms.
299304
Apple macOS
300305
-----------
301306

302-
You’ll need a few prerequisites to get started. Make sure you’re on OS X 10.14
303-
Mojave or later for Intel Macs or macOS 11.0 Big Sur for Apple Silicon. You will
304-
need SDL2 2.0.6 or later for Intel or SDL2 2.0.14 on Apple Silicon. You’ll also
307+
You’ll need a few prerequisites to get started. Make sure you’re on macOS 11.0
308+
Big Sur or later. You will need SDL 2 version 2.0.14 or later. You’ll also
305309
need to install Python 3 – it’s currently included with the Xcode command line
306310
tools, but you can also install a stand-alone version or get it via the Homebrew
307311
package manager.
@@ -317,7 +321,7 @@ package manager.
317321
* Type **xcode-select --install** to install additional tools necessary for MAME
318322
(also available as a package on ADC).
319323

320-
Next you’ll need to get SDL2 installed.
324+
Next you’ll need to get SDL 2 installed.
321325

322326
* Go to `this site <http://libsdl.org/download-2.0.php>`_ and download the
323327
*macOS* .dmg file
@@ -677,11 +681,6 @@ USE_SYSTEM_LIB_PORTMIDI
677681
USE_SYSTEM_LIB_PORTAUDIO
678682
Set to **1** to prefer the system installation of the PortAudio library over
679683
the version provided with the MAME source.
680-
USE_BUNDLED_LIB_SDL2
681-
Set to **1** to prefer the version of SDL provided with the MAME source over
682-
the system installation. (This is enabled by default for Visual Studio and
683-
Android builds. For other configurations, the system installation of SDL is
684-
preferred.)
685684
USE_SYSTEM_LIB_UTF8PROC
686685
Set to **1** to prefer the system installation of the Julia utf8proc library
687686
over the version provided with the MAME source.

scripts/genie.lua

+10-25
Original file line numberDiff line numberDiff line change
@@ -1035,8 +1035,8 @@ end
10351035

10361036
local version = str_to_version(_OPTIONS["gcc_version"])
10371037
if string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android") then
1038-
if version < 60000 then
1039-
print("Clang version 6.0 or later needed")
1038+
if version < 70000 then
1039+
print("Clang version 7.0 or later needed")
10401040
os.exit(-1)
10411041
end
10421042
buildoptions {
@@ -1052,12 +1052,6 @@ end
10521052
"-Wno-unused-value",
10531053
"-Wno-unused-const-variable",
10541054
}
1055-
if (version < 70000) or ((version < 100001) and (_OPTIONS["targetos"] == 'macosx')) then
1056-
buildoptions { -- clang 6.0 complains that [[maybe_unused]] is ignored for static data members
1057-
"-Wno-error=ignored-attributes",
1058-
"-Wno-error=unused-const-variable",
1059-
}
1060-
end
10611055
if ((version >= 100000) and (_OPTIONS["targetos"] ~= 'macosx')) or (version >= 120000) then
10621056
buildoptions {
10631057
"-Wno-xor-used-as-pow", -- clang 10.0 complains that expressions like 10 ^ 7 look like exponention
@@ -1069,8 +1063,8 @@ end
10691063
}
10701064
end
10711065
else
1072-
if version < 70000 then
1073-
print("GCC version 7.0 or later needed")
1066+
if version < 100300 then
1067+
print("GCC version 10.3 or later needed")
10741068
os.exit(-1)
10751069
end
10761070
buildoptions_cpp {
@@ -1082,23 +1076,14 @@ end
10821076
buildoptions {
10831077
"-Wno-error=unused-result", -- needed for fgets,fread on linux
10841078
-- array bounds checking seems to be buggy in 4.8.1 (try it on video/stvvdp1.c and video/model1.c without -Wno-array-bounds)
1085-
"-Wno-array-bounds",
1079+
"-Wno-error=array-bounds",
10861080
"-Wno-error=attributes", -- GCC fails to recognize some uses of [[maybe_unused]]
1081+
"-Wno-error=stringop-truncation", -- ImGui again
1082+
"-Wno-error=stringop-overflow", -- formats/victor9k_dsk.cpp bugs the compiler
1083+
}
1084+
buildoptions_cpp {
1085+
"-Wno-error=class-memaccess", -- many instances in ImGui and BGFX
10871086
}
1088-
if version < 100300 then
1089-
buildoptions_cpp {
1090-
"-flifetime-dse=1", -- GCC 10.2 and earlier take issue with Sol's get<std::optional<T> >() otherwise - possibly an issue with libstdc++ itself
1091-
}
1092-
end
1093-
if version >= 80000 then
1094-
buildoptions {
1095-
"-Wno-stringop-truncation", -- ImGui again
1096-
"-Wno-stringop-overflow", -- formats/victor9k_dsk.cpp bugs the compiler
1097-
}
1098-
buildoptions_cpp {
1099-
"-Wno-class-memaccess", -- many instances in ImGui and BGFX
1100-
}
1101-
end
11021087
if version >= 110000 then
11031088
buildoptions {
11041089
"-Wno-nonnull", -- luaengine.cpp lambdas do not need "this" captured but GCC 11.1 erroneously insists

src/devices/bus/gameboy/mbc6.cpp

+19-23
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ class mbc6_device : public mbc_8k_device_base
102102
void install_ram() ATTR_COLD;
103103

104104
required_device<intelfsh8_device> m_flash;
105-
memory_view m_view_rom_low;
106-
memory_view m_view_rom_high;
105+
memory_view m_view_rom[2];
107106
memory_view m_view_ram;
108107
memory_bank_array_creator<2> m_bank_ram;
109108
u8 m_bank_mask_ram;
@@ -123,8 +122,7 @@ mbc6_device::mbc6_device(
123122
u32 clock) :
124123
mbc_8k_device_base(mconfig, GB_ROM_MBC6, tag, owner, clock),
125124
m_flash(*this, "flash"),
126-
m_view_rom_low(*this, "romlow"),
127-
m_view_rom_high(*this, "romhigh" ),
125+
m_view_rom{ { *this, "romlow"}, { *this, "romhigh" } },
128126
m_view_ram(*this, "ram"),
129127
m_bank_ram(*this, { "ramlow", "ramhigh" }),
130128
m_bank_mask_ram(0U),
@@ -145,12 +143,12 @@ std::error_condition mbc6_device::load(std::string &message)
145143
return image_error::BADSOFTWARE;
146144

147145
// install views for ROM/flash and RAM
148-
cart_space()->install_view(0x4000, 0x5fff, m_view_rom_low);
149-
cart_space()->install_view(0x6000, 0x7fff, m_view_rom_high);
146+
cart_space()->install_view(0x4000, 0x5fff, m_view_rom[0]);
147+
cart_space()->install_view(0x6000, 0x7fff, m_view_rom[1]);
150148
cart_space()->install_view(0xa000, 0xbfff, m_view_ram);
151149

152150
// set up ROM and RAM as appropriate
153-
install_rom(*cart_space(), m_view_rom_low[0], m_view_rom_high[0]);
151+
install_rom(*cart_space(), m_view_rom[0][0], m_view_rom[1][0]);
154152
install_ram();
155153

156154
// install memory controller handlers
@@ -177,11 +175,11 @@ std::error_condition mbc6_device::load(std::string &message)
177175
emu::rw_delegate(*this, FUNC(mbc6_device::select_flash)));
178176

179177
// install Flash handlers
180-
m_view_rom_low[1].install_readwrite_handler(
178+
m_view_rom[0][1].install_readwrite_handler(
181179
0x4000, 0x5fff,
182180
emu::rw_delegate(*this, FUNC(mbc6_device::read_flash<0>)),
183181
emu::rw_delegate(*this, FUNC(mbc6_device::write_flash<0>)));
184-
m_view_rom_high[1].install_readwrite_handler(
182+
m_view_rom[1][1].install_readwrite_handler(
185183
0x6000, 0x7fff,
186184
emu::rw_delegate(*this, FUNC(mbc6_device::read_flash<1>)),
187185
emu::rw_delegate(*this, FUNC(mbc6_device::write_flash<1>)));
@@ -230,8 +228,8 @@ void mbc6_device::device_reset()
230228
m_flash_enable = 0U;
231229
m_flash_writable = 0U;
232230

233-
m_view_rom_low.select(0);
234-
m_view_rom_high.select(0);
231+
m_view_rom[0].select(0);
232+
m_view_rom[1].select(0);
235233
m_view_ram.disable();
236234

237235
if (m_bank_mask_ram)
@@ -270,7 +268,6 @@ void mbc6_device::write_flash(offs_t offset, u8 data)
270268
void mbc6_device::bank_switch_rom(offs_t offset, u8 data)
271269
{
272270
auto const bank(BIT(offset, 12));
273-
memory_view &view(bank ? m_view_rom_high : m_view_rom_low);
274271
m_bank_sel_rom[bank] = data;
275272

276273
if (!m_flash_select[bank])
@@ -281,11 +278,11 @@ void mbc6_device::bank_switch_rom(offs_t offset, u8 data)
281278
"%s: ROM bank %s unmapped\n",
282279
machine().describe_context(),
283280
bank ? "high" : "low");
284-
view.disable(); // is there a chip select for a second program ROM?
281+
m_view_rom[bank].disable(); // is there a chip select for a second program ROM?
285282
}
286283
else
287284
{
288-
view.select(0);
285+
m_view_rom[bank].select(0);
289286
}
290287
}
291288

@@ -299,7 +296,6 @@ void mbc6_device::bank_switch_rom(offs_t offset, u8 data)
299296
void mbc6_device::select_flash(offs_t offset, u8 data)
300297
{
301298
auto const bank(BIT(offset, 12));
302-
memory_view &view(bank ? m_view_rom_high : m_view_rom_low);
303299
m_flash_select[bank] = BIT(data, 3);
304300
if (m_flash_select[bank])
305301
{
@@ -309,25 +305,25 @@ void mbc6_device::select_flash(offs_t offset, u8 data)
309305
bank ? "high" : "low",
310306
m_flash_enable ? "enabled" : "disabled");
311307
if (m_flash_enable)
312-
view.select(1);
308+
m_view_rom[bank].select(1);
313309
else
314-
view.disable();
310+
m_view_rom[bank].disable();
315311
}
316312
else if (BIT(m_bank_sel_rom[bank], 7))
317313
{
318314
LOG(
319315
"%s: ROM bank %s unmapped\n",
320316
machine().describe_context(),
321317
bank ? "high" : "low");
322-
view.disable(); // is there a chip select for a second program ROM?
318+
m_view_rom[bank].disable(); // is there a chip select for a second program ROM?
323319
}
324320
else
325321
{
326322
LOG(
327323
"%s: ROM bank %s selected\n",
328324
machine().describe_context(),
329325
bank ? "high" : "low");
330-
view.select(0);
326+
m_view_rom[bank].select(0);
331327
}
332328

333329
// game writes 0xc6 when selecting ROM during boot - what do the other bits do?
@@ -368,17 +364,17 @@ void mbc6_device::enable_flash(u8 data)
368364
{
369365
LOG("%s: Flash enabled\n", machine().describe_context());
370366
if (m_flash_select[0])
371-
m_view_rom_low.select(1);
367+
m_view_rom[0].select(1);
372368
if (m_flash_select[1])
373-
m_view_rom_high.select(1);
369+
m_view_rom[1].select(1);
374370
}
375371
else
376372
{
377373
LOG("%s: Flash disabled\n", machine().describe_context());
378374
if (m_flash_select[0])
379-
m_view_rom_low.disable();
375+
m_view_rom[0].disable();
380376
if (m_flash_select[1])
381-
m_view_rom_high.disable();
377+
m_view_rom[1].disable();
382378
}
383379

384380
if (data & ~0x01)

src/osd/modules/debugger/qt/debuggerview.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
#include <QtWidgets/QApplication>
1717
#include <QtWidgets/QScrollBar>
1818

19-
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
20-
#define horizontalAdvance width
21-
#endif
22-
2319

2420
namespace osd::debugger::qt {
2521

src/osd/modules/debugger/qt/memorywindow.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
#include <QtWidgets/QToolTip>
2626
#include <QtWidgets/QVBoxLayout>
2727

28-
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
29-
#define horizontalAdvance width
30-
#endif
31-
3228

3329
namespace osd::debugger::qt {
3430

0 commit comments

Comments
 (0)