Closed alexalkis closed 3 years ago
if you do without -Os, no error but compiler fails sillently (return code 1 in shell)
there is a compile error due to missing CLOCK_MONOTONIC
.
is CLOCK_MONOTONIC somehow referenced in source? (I grep'ed and there was nothing found) Compiler stop reporting internal error after last commit, but there is no executable produced.
Any workarrounds? :)
$ m68k-amigaos-gcc -Os -noixemul -o myb shell/main.c core/my_basic.c -lm
shell/main.c: In function '_ticks':
shell/main.c:1270:2: warning: implicit declaration of function 'clock_gettime' [-Wimplicit-function-declaration]
clock_gettime(CLOCK_MONOTONIC, &ts);
^~~~~~~~~~~~~
shell/main.c:1270:16: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
clock_gettime(CLOCK_MONOTONIC, &ts);
...
-> #define CLOCK_MONOTONIC (clockid_t)4
Yeah, that works:
m68k-amigaos-gcc -noixemul -DCLOCK_MONOTONIC="(clockid_t)4" -Wno-multichar -Wno-overflow -Wno-unused-result -Os -o myb shell/main.c core/my_basic.c -lm
the thing is, the interpreter doesn't work. Exe runs, but can't handle (correctly) any bas file. If you compile for linux it works. I suspected unicode, I tried to disable it, still no go. Something else (or even unicode and my test was crap) is messing in libnix?
there can be many reasons - maybe start with le/be stuff:
typedef union _raw_u { mb_data_e e; char c; int_t i; real_t r; void* p; mb_val_bytes_t b; } _raw_u;
git clone https://github.com/paladin-t/my_basic cd my_basic m68k-amigaos-gcc -Os -noixemul -o myb shell/main.c core/my_basic.c
if you do without -Os, no error but compiler fails sillently (return code 1 in shell)