[CM] S7 questions and libc issue
Fernando Oleo Blanco
irvise_ml at irvise.xyz
Sat May 14 14:52:40 PDT 2022
Am Sat, 14 May 2022 13:45:09 -0700
schrieb <bil at ccrma.Stanford.EDU>:
> > gcc s7.c -o repl -DWITH_MAIN -I. -O2 -g -ldl -lm -Wl,-export-dynamic
> > -Wno-stringop-overflow
> > fernando at linux:~/Builds/S7-scheme/s7> ./s7 r7rs.scm
>
> You built the program "repl", then ran "s7". Try running repl.
>
I was being extremely dense... I works... I feel a bit ashamed...
However, this may be interesting. It does not work with TCC. It still
interprets the .so as a .scm. Here is the comparison between GCC and
TCC (git master):
```
fernando at linux:~/Builds/S7-scheme/s7> rm repl
fernando at linux:~/Builds/S7-scheme/s7> tcc s7.c -o repl -DWITH_MAIN -I.
-O2 -g -ldl -lm -Wl,-export-dynamic -Wno-stringop-overflow
fernando at linux:~/Builds/S7-scheme/s7> ./repl r7rs.scm
s7: 16-May-2022
load r7rs.scm
loading libc_s7.so
;unbound variable (symbol "\x7f;ELF\x02;\x01;\x01;")
; (symbol "\x7f;ELF\x02;\x01;\x01;")
; libc_s7.so, line 1, position: 7
; ((format *stderr* "writing ~A~%" c-file-n...
; ((load so-file-name cur-env))
; ((curlet))
fernando at linux:~/Builds/S7-scheme/s7> rm repl
fernando at linux:~/Builds/S7-scheme/s7> gcc s7.c -o repl -DWITH_MAIN -I.
-O2 -g -ldl -lm -Wl,-export-dynamic -Wno-stringop-overflow
fernando at linux:~/Builds/S7-scheme/s7> rm libc_s7.*
fernando at linux:~/Builds/S7-scheme/s7> ./repl r7rs.scm
s7: 16-May-2022
load r7rs.scm
writing libc_s7.c
loading libc_s7.so
fernando at linux:~/Builds/S7-scheme/s7>
```
Though do not take this as a bug report. It may be just TCC being TCC.
I tried with no optimisations (-O0) and the same error was produced.
Best regards,
Fer
More information about the Cmdist
mailing list