On OSXPPC, a newer toolchain is required for C++11 support.
This, in turn, requires an updated GDB for the newer symbols.
OSX Tiger can't use anything newer than DWARF v2, it seems, so
that's why we're already using -gdwarf-2 (older 'stabs' formats
weren't reliable with these toolchain and GDB releases).
I've been hitting internal GDB errors when analyzing a backtrace
in the TWP engine, until I dropped the -fvar-tracking-assignments
flag we enable by default. The GCC manual page says that "Use of
-gdwarf-4 is recommended" along with this option, so that's
probably why I was having issues.
(Debug builds on OSXPPC already have an implicit '-O0' requirement,
anyway, as so the GDB release's so old and clunky that it's unwise
to hope anything about '-O2 -g', so -fvar-tracking-assignments
wasn't that useful there anyway.)
This is a follow-up to previous commit eb904f67e5.
GNU Binutils 2.44 officially deprecated the (mostly unmaintained for
some years) Gold linker:
https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00001.html
So, make --disable-gold the default, now. Users having good reasons to
try linking with Gold anyway now need to set an explicit --enable-gold,
since we'll try to revert to GNU BFD if it's found, and if Gold appears
to be the default for some reason.
This will allow better performance for the vast majority of older
Android devices.
The Android devices lacking NEON support are really rare and will be
able to make use of an alternative APK compiled using
--disable-ext-neon.
Debian, Fedora and Slackware have been building their official ScummVM
packages with --disable-gold for a while, because of build failures on
(at least) i386:
a6afd58cf8e737fe0c41https://git.slackbuilds.org/slackbuilds/commit/games/scummvm?id=d3ce31e0215d7d6fdf7bdecac1bad499a0e0167d
I saw a similar issue on Linux ppc32 myself (linker internal error when
doing a full `-Og -g` build with all engines), and both Gentoo and Fedora
treat Gold as a deprecated linker nowadays, anyway.
Alternative linkers exist (mold, lld...), and ld.bfd often is a safe
default (and AFAICS it's not as slow at it used to be).
People really wanting to use Gold on other archs can still ask for it
with --enable-gold.
Out of simplicity, this patch doesn't handle the case where Gold would
be the default OS linker. We hope no system is doing that, if its linker
is known to have this kind of issues.
For Director engine it is marked as optional, since so far onnly
one game is using it.
This could lead to regressions since we were not tracking which
games use Indeo codecs since we added them in 2016 (Indeo 4&5) and
2010 (Indeo 3). So, there could be an AVI video which is now stops
playing and produces a warning. In this case, the 'indeo' component
must be added to the respective engine.
Add it to engines that have MIDI playback.
This essentially compiles the emulator only when an engine that
can potentially use it (e.g. MIDI) is enabled
When built with -O2, the new path handling from commit
93a8f7f4d6 causes the PSP to crash
on loading kbd.zip. This can be reproduced in PPSSPP emulator.
The fact that -O1 fixes this problem probably indicates some
undefined behavior.
Some Linux distributions enable compiler Link Time Optimization by default,
but our endianness check may fail there, if the object that is created only
contains Intermediate Representation and no regular Machine Code, especially
as not all 'strings' utilities are guaranteed to understand IR-only objects.
The -ffat-lto-objects flag (added in GCC 4.7) makes sure that this object
will always contain regular machine code, even when LTO is turned on.
From Fedora.