This shaves off a good 800 KB from all the engines. However, do keep
local atari debug messages for diagnostic purposes.
Also, use natfeats for debug output when possible else the classic
stdout/stderr (not both as before).
Fixes the script on OpenBSD's /bin/sh and the following shellcheck errors:
SC1035 (error): You are missing a required space after the !.
SC1105 (error): Shells disambiguate (( differently or not at all. For
subshell, add spaces around ( . For ((, fix parsing errors.
The second error was fixed by removing the pair of parentheses, which were
just cosmetic and not required in this case.
This version is the last one to support API level 17 (Jelly Bean).
It also gets rid of all remnants from the old binutils/GCC toolchain.
This also migrates from LLVM 9 to LLVM 12.
I had limited it to GCC 4.8 and newer, but I see in the OSX PPC builds
that GCC 4.8 still has way too many false positives there, compared to
the behavior of newer GCC releases.
They're not GNU extensions anymore, and should be part of the C++11
standard, but the older RISC OS (with GCC 4.7) probably gets something
wrong, there.
It looks like some warnings give a lot of false positives in GCC 4.7, often
when dealing with templates. GCC 4.8+ doesn't have this problem, so just
remove the noise, so that real warnings are easier to see.
This primarily covers RISC OS.
If -Werror is triggered too early in the configure script, some features
and libraries could end up being disabled, because some tests can produce
small warnings on some systems.
An example is the posix_spawn() test triggering a -Wnonnull warning on
modern Glibc systems. We could fix this test in particular, but we never
know what a future compiler upgrade will find in its new `-Wall` settings.
Just be safe and only enable -Werror when all features are done being
detected detected; --enable-Werror is meant for ScummVM's code itself,
not finding warning in system headers/components/libraries.
audio/softsynth/eas.cpp uses it, but the configure check didn't test
for it, and not all releases of Sonivox have it (it looks like it
was removed in some releases, and then added back after the API
breakage was noticed).
This would cause a build failure, later on.
We don't realy check for Sonivox >= 3.6.12, we just check for the
function availability (that's what we want, and indeed it may have
existed in some earlier releases), but mentionning 3.6.12 in the
output could help users figure out what they need.
Trac#15312.
Newer FLAC versions also need this define for Mingw.
Adding this define makes FLAC properly detected and builds works.
This doesn't work with a DLL based FLAC but, because of the define in
flac.cpp it couldn't work anyway.
A proper fix would be to switch to pkg-config for FLAC.
That's what we do for most other libraries, and this helps triggering the
cases when libsonivox has been built with GCC < 5.0, which currently fails
because of its unchecked usage of GCC builtins. It's better to fail at
this point, instead of launching a full ScummVM that will fail linking
because of that.
Prefer DWARF over stabs on older OSX; this requires a newer GDB, but we
need it for the updated toolchain anyway. This improves the debugging
experience quite a lot, and it still creates meaningful traces for the
Crash Reporter of OSX 10.4.
An updated GDB can be found in the development blog posts of TenFourFox,
or in MacPorts. Setting it up may require some work, but it's worth it.