Commit Graph

256 Commits

Author SHA1 Message Date
Rangi
752b273aec Extend RGBASM and RGBLINK verbosity flags to have multiple levels like RGBGFX (#1772) 2025-08-02 17:10:10 -04:00
Rangi42
75aed1afd5 Factor out an UpperMap for case-insensitive matching 2025-07-28 00:00:24 -04:00
Rangi42
b2747dfbd8 Factor out common usage-help code 2025-07-27 19:20:04 -04:00
Rangi42
16e16cdf51 Split up the linkerscript lexer and layout actions 2025-07-27 13:38:20 -04:00
Rangi42
a353637a90 Split RGBLINK linkerscript parser functions into their own file 2025-07-27 11:31:25 -04:00
Rangi42
f3cbfcecf4 Split RGBASM parser action functions into their own file 2025-07-26 16:20:25 -04:00
Rangi
0df5b7b86d Implement warning diagnostic flags for RGBFIX (#1766)
* Implement warning diagnostic flags for RGBFIX

* `-m/--mbc-type help` prints to stdout

* Support `-m list` as well as `-m help`

* Make invalid `rgbfix -l` characters a fatal error, like other invalid CLI arguments

* Refactor fix/main.cpp into multiple files
2025-07-26 12:11:52 -04:00
Rangi42
1849a35e61 Rename proto-palettes to color sets (copied from rsgbds) 2025-07-23 21:13:46 -04:00
Rangi
7e151f16c3 Factor out a single PNG-reading function to encapsulate the libpng API (#1765) 2025-07-23 15:53:33 -04:00
Rangi42
8e84850679 Run clang-tidy with make tidy 2025-07-18 10:10:34 -04:00
Rangi42
e31256c0d4 Remove rgbasm-only -lm from Makefile 2025-07-18 08:22:40 -04:00
Rangi
5e43ece578 Remove errx and errors.hpp (#1737) 2025-07-09 11:04:23 -04:00
Rangi
35962dedc4 Refactor warnings and errors (#1728)
* Remove `err` and `warn`, keep `errx` and `warnx`, using them in RGBGFX too

* Separate RGBGFX and RGBLINK warnings/errors from main options

* Separate `report` function into `error` and `fatal` messages

* Implicit newlines for most RGBASM errors
2025-07-08 12:58:23 -04:00
Rangi
c9765ec158 Factor out program-independent warning diagnostic code (#1725) 2025-07-07 18:34:34 -04:00
Rangi
41c94aa448 Omit the version number from distrbuted release archive filenames (#1685) 2025-05-06 13:28:54 +02:00
Rangi42
c841672059 Don't use tabs for alignment 2025-03-31 19:13:46 -04:00
Rangi
03452c6d4f Allow git describe to get the version for FreeBSD and Cygwin in CI (#1640)
* Specify `safe.directory`
* Fetch tags
* Fetch all commits
2025-01-29 19:57:15 -05:00
Rangi
8363f25d47 Enable more sanitizers in make develop (#1588)
- `-fsanitize=undefined` encompasses multiple checks we were specifying

- "detect_leaks=1" for `__asan_default_options` checks for memory leaks
  (except for with macOS clang++, which does not support LSan)

- `-fsanitize=float-divide-by-zero` is an extra UBSan check
  (and reveals a UB bug to fix with fixed-point `DIV` and `LOG`)
2024-12-31 10:02:20 +01:00
Sylvie
c1b85554a8 Document obsolete syntax in rgbasm-old(5) (#1571) 2024-12-10 12:34:37 -05:00
Sylvie
b877c81c32 Use C++-style casts (#1576) 2024-12-09 21:56:54 -05:00
Sylvie
d5ded84501 Move definition of _POSIX_C_SOURCE to include/platform.hpp (#1524) 2024-09-29 23:53:15 +02:00
Sylvie
7330c2c606 Replace unmangle with cygpath (#1490)
Use `-m` not `-w` so paths use forward slashes
2024-08-31 00:10:44 -04:00
Rangi42
0adff57e2c Sync warning flags between Makefile and CMakeLists.txt 2024-08-08 16:02:11 -04:00
ISSOtm
60f9e86361 Pass libpng CFLAGS when building rgbgfx_test.cpp too
Don't ask me how this hasn't broken earlier, but hey, now it's fixed
2024-08-08 20:30:31 +02:00
ISSOtm
1ad9383042 Disable optimisations in make debug
I am starting to feel aggravated by `$1 = <optimized out>`
2024-08-08 11:15:19 +02:00
Sylvie
0433714d77 Allow a suffix (e.g. the version) to be added when installing (#1406) 2024-06-18 22:06:43 +02:00
Rangi42
6b5248f15b Add a build target for include-what-you-use 2024-03-29 20:49:09 -04:00
Rangi42
6560b7819d Add make profile, optimized for callgrind 2024-03-21 11:42:12 -04:00
Sylvie
68f6ab5c32 Add test cases for SECTION UNION defining multiple identical labels (#1349)
Exported labels should fail to link; non-exported ones should be okay.
2024-03-13 13:34:44 -04:00
ISSOtm
b9596890c9 Disable a Clang warning
Fixes `make develop` with Clang 17.
The warning only triggers on the auto-generated `yynerrs_` in `src/asm/parser.cpp`,
so it's not very useful to us right now.
2024-03-13 00:04:11 +01:00
Sylvie
292adb27a3 Adapt the RGBASM parser to C++ (#1333)
This uses variants instead of a `%union`, and "complete symbols"
that can call complex constructors.
2024-03-06 20:40:36 -05:00
Rangi42
cdb9315366 Use std::vector for rgbfix ROMX data
Statically links libstdc++ for 32-bit MinGW
2024-02-29 13:44:08 -05:00
Rangi42
d53bba97e8 Remove our custom hashmap 2024-02-29 13:44:08 -05:00
Sylvie
54d6a22d19 Build with pedantically standard C++ (#1309)
* Remove array designators (not standard C++)

* Build with pedantically standard C++
2024-02-23 16:46:53 -05:00
Eldred Habert
efaef7039e Make sure to detect Git info from *our* Git repo (#1303) 2024-02-18 17:08:30 -05:00
Rangi
1f3985a164 Fix build compatibility for macOS 10.14 and below (#1280)
macOS 10.15 introduced full `std::filesystem::path` support.
Before that our use of it would cause the build to fail.
This was not caught because "-mmacosx-version-min=10.9" was only
being passed to clang++ for release builds.

This passes that flag in a new static CI test build, and introduces
a hack developed by @LIJI32 to silence the availability errors,
since we use features already available in macOS 10.9.

This means we are testing both "vanilla" building,
and building static binaries using the same configuration
as during release, which should help avoiding last-minute
surprises.
2023-12-29 22:47:11 +01:00
Rangi
5a3a215b0e Don't delete script.cpp after building (#1272)
Ensure consistency in linker script parser interface

Make the declaration and definition visible when compiling
so that the compiler can warn about inconsistencies.

Co-authored-by: ISSOtm <me@eldred.fr>
2023-12-17 11:42:07 -05:00
Eldred Habert
fd78a9ae83 Port linkerscript parser to Bison (#1266)
Notable side effects:
* Use the standard-conformant MSVC preproc
* Add test for linker script INCLUDE
* Improve wording of placement conflict errors
* Fix errors from not newline-terminated files
* Teach checkdiff about the linker script doc
* Call linker script "commands" "directives" instead

---------

Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com>
2023-12-11 02:29:37 +01:00
Rangi
1402615bc0 Refactor how Makefile invokes Bison for reusability (#1259)
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
2023-12-01 13:29:05 -05:00
Rangi
a218622d73 Remove checkpatch, since it's tuned for C not C++ (#1250)
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
2023-11-22 19:26:08 +01:00
Rangi
765ae3f484 Build a code coverage report with gcov and lcov (#1221) 2023-11-08 00:03:26 +01:00
Rangi
f3dbf17b78 AUTHORS and more copyright comments are redundant with CONTRIBUTORS.rst (#1227) 2023-11-07 17:57:59 -05:00
Rangi
1e70e703a7 Build everything as C++ (#1176) 2023-11-07 21:45:56 +01:00
Rangi
99727cbe99 #!/bin/bash -> #!/usr/bin/env bash (#1216) 2023-11-04 23:37:34 +01:00
Rangi
477e9812d4 Actually use PNGCFLAGS to build rgbgfx (#1209) 2023-11-03 08:37:18 +01:00
Rangi
e7d0428a2e Explicitly specify which files build with PNGCFLAGS (#1201) 2023-11-02 17:36:46 +01:00
ISSOtm
36bfeea8dc Silence spurious GCC warning 2023-08-26 22:57:06 +02:00
Eldred Habert
168950855d Create statically-linked Linux binaries on release (#1148)
Co-authored-by: Antonio Vivace <avivace4@gmail.com>
2023-07-08 22:04:00 +02:00
ISSOtm
ec2d1312ef Remove auto parameter to -flto
Not all supported compilers support the argument;
the move was a bit premature.
2022-11-15 19:49:04 +01:00
ISSOtm
28737d5778 Enable GLIBCXX_ASSERTIONS in make develop
Not sure it's very portable, but this is only the dev config
2022-10-12 01:23:37 +02:00