diff options
| author | EuAndreh <eu@euandre.org> | 2024-01-02 17:28:59 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2024-01-05 05:43:22 -0300 |
| commit | 2e96fc06f325110af8c7177c0c60694eed5fd245 (patch) | |
| tree | ba4e2ae8c50136cbf2f00a0edc8f31c90901bb64 /tools/add-cfi.common.awk | |
| parent | src/internal/version.h: Check-in file with fixed value for compilation (diff) | |
| download | grovel-2e96fc06f325110af8c7177c0c60694eed5fd245.tar.gz grovel-2e96fc06f325110af8c7177c0c60694eed5fd245.tar.xz | |
Fix the build system.
The improvements are:
- use most of the default "Makefile" for standard packaging;
- also use the default ".gitignore" with for the derived assets;
- don't impose so many $CFLAGS on the user. GCC still needs to be given
the `-ffreestanding` flag explicitly for us to get a good binary;
- stop using ad-hoc tools/* scripts, and avoid the code-generation
anti-pattern overall on the build. Some of the generated files were
checked-in, and some were removed;
- remove empty files;
- use POSIX make(1) over gmake;
- add fuzz targets;
- partial "install" and "uninstall" targets;
- complete "clean" target.
The shortcomings are:
- only working on x86_64. More platforms coming soon;
- code is still messy: way too many warnings, GNU/BSD specific
extensions, inline assembly, and all kinds of unportable code;
- still only works with GCC and GCC-like compilers, and completly fails
with tcc(1) and cproc(1);
- the `deps.mk` file is being maintained manually. As I work on the
source files I'll finish automating its generation with `mkdeps.sh`;
- still seems to be coupled with Linux;
- still is missing tests setup;
- still uses `#include <$NAME.h>` instead of the correct
`#include "$NAME.h"` form.
The generated libgrovel.a did match the previous lib/libc.a 100%.
Diffstat (limited to 'tools/add-cfi.common.awk')
| -rw-r--r-- | tools/add-cfi.common.awk | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tools/add-cfi.common.awk b/tools/add-cfi.common.awk deleted file mode 100644 index 04482d43..00000000 --- a/tools/add-cfi.common.awk +++ /dev/null @@ -1,26 +0,0 @@ -function hex2int(str, i) { - str = tolower(str) - - for (i = 1; i <= 16; i++) { - char = substr("0123456789abcdef", i, 1) - lookup[char] = i-1 - } - - result = 0 - for (i = 1; i <= length(str); i++) { - result = result * 16 - char = substr(str, i, 1) - result = result + lookup[char] - } - return result -} - -function parse_const(str) { - sign = sub(/^-/, "", str) - hex = sub(/^0x/, "", str) - if (hex) - n = hex2int(str) - else - n = str+0 - return sign ? -n : n -} |
