Commit Graph

1850 Commits

Author SHA1 Message Date
Eugene Sandulenko
dc7e6a5282
CONFIGURE: Define HAVE_AMD64 when applicable 2022-12-23 18:42:52 +01:00
Cameron Cawley
cc8de3a293 CONFIGURE: Enable SID emulation in the DS and 3DS ports 2022-12-22 23:46:52 +01:00
Carlo Bramini
12fbecac55 CONFIGURE: Allow Cygwin as development platform.
I would like to suggest to allow the use of Cygwin as development platform.

This is not intended for providing builds for this environment (although SCUMMVM can be already built on it without problems), but for having an easy way for testing POSIX code on Windows.
There could be some alternatives, like the (defunt) Microsoft POSIX subsystem, the (also defunct) Windows Services for UNIX or the WSL1 and WSL2, but they are all painful experiences, at least for me, especially when debugging graphical applications connected to an X server or working with physical devices (try to believe). Alternatively, it is also possible to make a full virtual machine by using emulators like QEMU, but it has not the same advantages of having the code running natively, especially when sharing the same files..
So, this should be seen as a tool for developers, nothing more than that, because at the time of writing this seems to be the best and most comfortable way for debugging a change to the ports using POSIX code.

However, to avoid unintentional execution, the user must activate the support for Cygwin by providing --enable-cygwin-build at configure time, otherwise the process will halt again.
Even when support for Cygwin is activated, a warning message is still shown to the user, for informing him on what he is doing.
2022-12-22 23:29:19 +01:00
Vladimir Serbinenko
923c1be2c7 CONFIGURE: Set CXX/AS/AR/RANLIB automatically on 3DS
This is not strictly necesarry but makes configuration simpler
2022-12-14 12:17:39 +01:00
Donovan Watteau
b79e5a3b2d CONFIGURE: Do more getconf checks before using its output
Based on its POSIX specification.
2022-12-11 21:48:33 +01:00
Donovan Watteau
700a8071e5 BUILD: Check if there's an fseeko/ftello with 64-bit off_t
Some systems have fseeko but you need to check that off_t is a 64-bit
value (and this requires some magic incantation on some platforms),
others need fseeko64(), Windows has a different symbol, and then some
systems only have an fseek() that's limited to <2GB files.

This is a first step in trying to improve this.
2022-12-11 21:48:33 +01:00
Donovan Watteau
5bfaf89729 CONFIGURE: Use -gstabs+ for macOS <= 10.5 debug builds
We're using a newer toolchain there, but macOS 10.4 and 10.5 still rely
on an ancient version of GDB which chokes on C++11 symbols (such as
decltype(nullptr)), even when forcing DWARF-2 symbols only with -gdwarf2
-gstrict-dwarf.

-gstabs+ is more limited, but at least that one works with GDB, so use
it when making a debug build for those systems.
2022-11-19 11:26:50 +01:00
Donovan Watteau
0725e2eaf5 CONFIGURE: Add support for DragonFly BSD
Changes taken from their ports system.
2022-11-12 21:19:47 +01:00
Le Philousophe
02377d632a CONFIGURE: Allow to enable all subengines of an engine
By specifying -all (or _all) at the end of the engine in --enable-engine, all of
its subengines get enabled too.
2022-11-10 08:19:23 +01:00
Le Philousophe
ca2ba5ff14 CONFIGURE: Don't use [ command
It wasn't used elsewhere and is the same as test
2022-11-10 08:19:23 +01:00
Orgad Shaneh
246a062950 CONFIGURE/CREATE_PROJECT: Silence address-of-packed-member GCC 12 warning
It appears a lot, and these casts are intentional and look safe.

Example:
../scummvm/engines/glk/alan3/actor.cpp: In function 'Glk::Alan3::ScriptEntry* Glk::Alan3::scriptOf(int)':
../scummvm/engines/glk/alan3/lists.h:35:52: warning: converting a packed 'Glk::Alan3::ScriptEntry' pointer (alignment 1) to a 'Glk::Alan3::Aword' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
   35 | #define isEndOfArray(x) implementationOfIsEndOfList((Aword *) (x))
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
../scummvm/engines/glk/alan3/actor.cpp:38:84: note: in expansion of macro 'isEndOfArray'
   38 |                 for (scr = (ScriptEntry *) pointerTo(header->scriptTableAddress); !isEndOfArray(scr); scr++)
      |                                                                                    ^~~~~~~~~~~~
In file included from ../scummvm/engines/glk/alan3/actor.h:25,
                 from ../scummvm/engines/glk/alan3/actor.cpp:22:
../scummvm/engines/glk/alan3/acode.h:453:8: note: defined here
  453 | struct ScriptEntry {    /* SCRIPT TABLE */
      |        ^~~~~~~~~~~
2022-10-27 02:26:02 +03:00
Donovan Watteau
3b543d06ff CONFIGURE: Make configure --help around 30% faster 2022-10-08 01:04:12 +02:00
eientei95
658e4114f4 CONFIGURE: Use grep -F instead of deprecated fgrep 2022-09-17 12:26:30 +02:00
Hubert Maier
63b709be99
AMIGAOS: Use LTO, -O3 and dead code elimination by default (#4238) 2022-09-10 18:26:31 +02:00
Hubert Maier
79e1c95ed7 CONFIGURE: Fix even more typos 2022-08-28 00:02:54 +03:00
Hubert Maier
26f0349b4c CONFIGURE: Fix typo 2022-08-26 13:11:36 +03:00
Donovan Watteau
8a73f5d496 CONFIGURE: Enable SCUMM_NEED_ALIGNMENT when using --enable-ubsan
-fsanitize=undefined implies -fsanitize=alignment, so we need to define
SCUMM_NEED_ALIGNMENT for UBSan builds, otherwise many false positives
will be reported, such as for engines/scumm/smush/codec47.cpp.

That's also a good way of having more tests for the SCUMM_NEED_ALIGNMENT
code paths during development :)
2022-08-19 23:59:57 +03:00
Lars Sundström
4133cf4b9f IOS7: Add GameController capability
Add the GameController framework to the project and enable support for
controller user interaction in the Info.plist file. This allows for
Game Controller compatible devices to notify the application when
connected.

Add GameController framework to configure and ports.mk if not using
Xcode to build the target.
2022-08-08 21:08:56 +01:00
Le Philousophe
f925c14971 VITA: Move link optimizations at the end of configure 2022-08-07 18:15:09 +02:00
Le Philousophe
2a84d3e988 VITA: Add plugins support 2022-08-07 18:15:09 +02:00
Le Philousophe
bffb6e244a BASE: Allow platforms to not include the help messages
This allows to save some space on constrained devices which still allow
for command line.
Enable this space saving on DS and enable back command line support.
Cleanup old workaround for 3DS.
2022-07-29 13:08:22 +02:00
Le Philousophe
062c2982ec RISCOS: Prevent garbage collection of plugins code 2022-07-14 10:56:55 +02:00
Hubert Maier
9e4995d354 AMIGAOS: Revert dynamic detection features 2022-07-13 18:18:37 +02:00
Cameron Cawley
80f90a15a5 RISCOS: Use makerun to calculate the wimpslot 2022-07-08 22:07:32 +01:00
Cameron Cawley
68f9501be4 RISCOS: Remove the -mno-poke-function-name compiler flag 2022-07-07 21:36:12 +01:00
Eugene Sandulenko
c271694143
JANITORIAL: Remove trailing spaces 2022-07-03 14:28:53 +02:00
Cameron Cawley
33fae23594 CONFIGURE: Fix compilation with SDL 2.23.0 or later 2022-07-02 22:49:33 +02:00
Hubert Maier
c8edaa945f AMIGAOS: Add DEBUG_BUILD define to configure 2022-06-22 01:40:23 +02:00
Cameron Cawley
ba98eb99bb RISCOS: Disable the ARM assembly code for now 2022-06-21 00:36:26 +01:00
Hubert Maier
3d9ccee456 CONFIGURE: Remove special case for GLES2 2022-06-20 22:18:35 +03:00
Cameron Cawley
ea7a15a2c4 RISCOS: Increase the optimization level 2022-06-20 00:30:42 +03:00
Cameron Cawley
be82c63d77 RISCOS: Improve flags when building with plugins 2022-06-19 00:36:25 +01:00
Orgad Shaneh
9e5ef28456 CONFIGURE: Deduplicate simple compiler flag support tests 2022-06-19 01:33:12 +03:00
Le Philousophe
84baac903a RISCOS: Add LDFLAGS to plugins too 2022-06-18 17:42:38 +02:00
Le Philousophe
bab7027bab PLUGINS: Fix PLUGIN_LDFLAGS value inherited from environment
It was not always taken into account because lines in _mak_plugins were
overwriting it
2022-06-18 17:38:12 +02:00
Le Philousophe
02808a019a RISCOS: Add an ELF plugin provider
This will allow do dynamically load plugins and not be limited by
24-bits relocations
2022-06-17 21:31:04 +02:00
Le Philousophe
9a8ed07914 PLUGINS: Use host_os instead of backend to select PLUGIN_DIRECTORY
RiscOS uses SDL backend but needs a different PLUGIN_DIRECTORY
2022-06-17 21:31:04 +02:00
Le Philousophe
052477ab7a PLUGINS: Allow use of commas in executable name
That's how RiscOS files store their type
2022-06-17 21:31:04 +02:00
Christian Kündig
bc3679e928 EMSCRIPTEN: Major build improvements
- Updated Emscripten to version 3.1.8 (+ additional patches)
- Support for dynamic plugins
- Adding ScummvmFS with support for HTTP Range Requests for game data
- Automated games/demos bundling and ini config generation during build
- Allow passing CLI arguments via fragment identifier of the website (i.e. scummvm.html#—debuglevel=9 )
- UI improvements with nicer status messages, splash screen + favicon
- Fixed HiDPI handling and responsiveness
- Bugfix: Don't crash if gamepad support isn't available
2022-06-12 14:34:13 +02:00
Christian Kündig
8f0174689b EMSCRIPTEN: Merging parts of scummvm/scummvm#3686 for fullscreen support, disabling exit buttons (openURL has been fixed in libsdl-org/SDL@15ebad6e7d and is not needed anymore) 2022-06-12 14:34:13 +02:00
Donovan Watteau
a7922fc772 CONFIGURE: Don't use -pedantic on OpenBSD
OpenBSD is fine with std_variant=c++ with C++11, but -pedantic is still
noisy for some system header files.
2022-06-12 10:26:39 +02:00
Donovan Watteau
657b0fd8ab CONFIGURE: Let the endianness test compile if there's no __attribute__ support
__attribute__((used)) here comes from Fedora which uses LTO by default
but this is a GCC-ism, so let this code compile if the compiler is not
GCC-compatible.
2022-06-12 10:26:39 +02:00
Donovan Watteau
81e43764a0 CONFIGURE: Disable SEQ MIDI on OpenBSD
OpenBSD removed its /dev/sequencer support in 2013, and uses the sndio
API instead.
2022-06-12 10:26:39 +02:00
Thierry Crozat
4ce8636640 MACOSX: Build ARM version of Dock plugin when building ARM version of ScummVM 2022-06-05 15:08:44 +01:00
Thierry Crozat
4d2bd56cd2 BUILD: Add the original LDFLAGS and sanitizer LDFLAGS to PLUGIN_LDFLAGS
Adding the sanitizer flags to the PLUGIN_LDFLAGS fixes link errors
for the plugins when asan, tsan, or ubsan is enabled.

Adding the original LDFLAGS to PLUGIN_LDFLAGS means we no longer needs
to use both in the link command for plugins.
2022-06-02 19:23:02 +01:00
Donovan Watteau
3d82857b79 MACOS: Drop PowerPC static builds workarounds, and suggest dynamic plugins
-mlongcall -Os would work until ScummVM 2.2.0, but now the engines are
too big to fit in a single static binary on Mac PowerPC.

(On ELF platforms, some flags like -Wl,--relax or -Wl,--gc-sections
can be used as well, but macOS uses Mach-O, and its old linker doesn't
have as many workarounds.  -Wl,-dead_strip helped a bit but that's not
enough and you start hitting ld internal errors.)

So, recommend dynamic plugins on Mac PPC, now, and drop -Os -mlongcall
since working around the linker limits is not possible anymore.  Using
compiler defaults probably means less bugs when using such an obscure
toolchain, anyway.

(Making a static release it still possible, but only with a very small
set of engines.)
2022-06-02 19:17:19 +01:00
Donovan Watteau
1a9d251a68 MACOS: Don't run codesign on the bundle when running on Leopard or below
codesign didn't exist on Tiger, and didn't have a --deep option on
Leopard.

Moreover, it was rarely used on these older systems, and previous
releases of ScummVM on Mac PowerPC weren't signed either.
2022-06-02 19:17:19 +01:00
Donovan Watteau
808134e3c9 BUILD: Use strip -x when using plugins and stripping the main binary on macOS
Global symbols should be kept when building dylibs.
2022-05-22 23:42:45 +01:00
Hubert Maier
bc10c22560 AMIGAOS: Revert use of -ldl to satisfy buildbot 2022-05-22 17:41:28 +02:00
Hubert Maier
7f55b1016b AMIGAOS: Revert automatically added flags
As it seems those two optimizations flags are already automatically added by using -O2
2022-05-21 22:13:14 +03:00