From 7876210be67a91d3cbc8bb148be7c11c679823cc Mon Sep 17 00:00:00 2001 From: Timerix Date: Sun, 10 Aug 2025 19:06:22 +0300 Subject: [PATCH] updated tlibc --- .vscode/launch.json | 5 +++-- dependencies/tlibc | 2 +- project.config | 4 ++-- src/main.c | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index d62fcf1..4e28cc7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,7 +2,7 @@ "version": "0.2.0", "configurations": [ { - "name": "(gdb) Debug", + "name": "gdb_debug", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/bin/tcpu", @@ -12,6 +12,7 @@ "preLaunchTask": "build_exec_dbg", "stopAtEntry": false, "externalConsole": false, + "internalConsoleOptions": "neverOpen", "MIMode": "gdb", "miDebuggerPath": "gdb", "setupCommands": [ @@ -26,4 +27,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/dependencies/tlibc b/dependencies/tlibc index 0e80a56..8eeaff4 160000 --- a/dependencies/tlibc +++ b/dependencies/tlibc @@ -1 +1 @@ -Subproject commit 0e80a568922ae579213d5a99329fa32420f0bcb0 +Subproject commit 8eeaff4245d0876f5c3308991ede7696254487f7 diff --git a/project.config b/project.config index 71549b4..57869a6 100755 --- a/project.config +++ b/project.config @@ -6,8 +6,8 @@ CMP_C="gcc" CMP_CPP="g++" STD_C="c11" STD_CPP="c++11" -WARN_C="-Wall -Wextra -Werror=pointer-arith -Wno-unused-parameter" -WARN_CPP="-Wall -Wextra -Werror=pointer-arith -Wno-unused-parameter" +WARN_C="-Wall -Wextra -Werror=return-type -Werror=pointer-arith -Wno-unused-parameter" +WARN_CPP="-Wall -Wextra -Werror=return-type -Werror=pointer-arith -Wno-unused-parameter" SRC_C="$(find src -name '*.c')" SRC_CPP="$(find src -name '*.cpp')" diff --git a/src/main.c b/src/main.c index fc943f8..f139590 100644 --- a/src/main.c +++ b/src/main.c @@ -4,7 +4,7 @@ #include "compiler/Compiler.h" #include "VM/Display/Display.h" -#define arg_is(STR) (strcmp(argv[argi], STR) == 0) +#define arg_is(LITERAL) str_equals(arg_str, STR(LITERAL)) i32 compileSources(cstr source_file, cstr out_file, bool debug_log); i32 bootFromImage(cstr image_file); @@ -25,6 +25,7 @@ i32 main(const i32 argc, cstr* argv){ bool debug_log = false; for(i32 argi = 1; argi < argc; argi++){ + str arg_str = str_from_cstr(argv[argi]); if(arg_is("-h") || arg_is("--help")){ printf( "-h, --help Show this message.\n"