Commit Graph
11 Commits
Author SHA1 Message Date
Rafał Florczak 9e1f084a46 Check for APPLE instead of MACOSX, use a list for passing arch flags 2025-03-12 19:00:24 -07:00
Rafał Florczak c502388d15 Set static libdir for libjpeg-turbo
Some distributions like Fedora or Arch use lib64 instead of lib for the
libs. That prevented the `LIB_PATH` from pointing at the correct file,
and as a result the linking failed on those systems.
2025-03-05 08:07:45 -08:00
Rafał Florczakandphantom10111 3c0b480b93 Replace the vendored libjpeg with the submodule of libjpeg-turbo 3.1.0
Co-authored-by: phantom10111 <[email protected]>
2025-03-03 23:33:15 -08:00
Rafał Florczak e0aad77672 Check for glu and udev in cmake 2025-03-03 23:26:54 -08:00
Rafał Florczak 8f8064c8fa Add ARM builds to the pipeline 2025-03-02 08:41:35 -08:00
Rafał Florczak 96ee25800a Use size_t and the respective %zu specifier for size-related variables
This change eliminates various compilation warnings and extra casts.
2025-01-15 08:22:21 -08:00
Rafał Florczak a0e4f6a4b0 Parallel github workflow builds 2024-08-12 13:31:18 -07:00
Rafał Florczak 5369f16e16 Implement cross-platform FTOC using clamp and static_casts
The old implementation relied on the tricks that no longer seem to
optimize anything and break strict aliasing rule, which in turn is an
undefined behavior:

/var/storage/rf/proj/itgmania/src/RageTypes.h: In function ‘unsigned char FTOC(float)’:
/var/storage/rf/proj/itgmania/src/RageTypes.h:300:42: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  300 |         int ret = reinterpret_cast<int&>(base);
      |                                          ^~~~

Compiler explorer summary: https://godbolt.org/z/5857747P3

It's also possible to eliminate this strict aliasing violation with a union,
while leaving all the tricky code (also included in the link above).

Online build of the test code that's suggested for FTOC: https://onlinegdb.com/O7N0Orl0r

ARM version of the code wasn't correct -- as in not passing the attached test.
It didn't perform accurately around the end of the input range.
2024-07-17 20:21:55 -07:00
Rafał Florczak 90aabddc7f Drop libbz2 dependency
Dynamic linking against libbz2 was problematic on some distributions.
We only needed it for pcre's CLI (which we don't use) and ffmpeg's mkv
decompression in case a user forced encoder to use it, because its usage
is discouraged by the standard.

See https://github.com/itgmania/itgmania/issues/217 for the related
discussion.
2024-06-18 05:39:51 -07:00
Rafał Florczak 903fa7eea3 Treat type-limits as errors in GNU builds 2024-05-30 17:38:47 -07:00
Rafał Florczak f7f88f9544 Guard against signedness of chars and wchars on different targets 2024-05-30 17:38:47 -07:00