1This patch contains preliminary support for using SCC's libc with Qute <https://git.8pit.net/qute/>.23To compile a libc.a for Qute, first compile SCC:45 $ guix shell -CPW -D simple-cc gdb6 [env]$ make -j10 CFLAGS="-g -O0" SCCMAKE=make CC=gcc HOSTCC=gcc78Afterward, build Qute's libc.a with SCC:910 $ make -f main.mk -j10 CFLAGS="-g -O0" SCCMAKE=make CC=$(pwd)/bin/scc CONF=amd64-qute libc1112This will generate `./lib/scc/amd64-qute/libc.a` which can then be preloaded using Qute.1314---1516Consider the following example:1718 #include <assert.h>19 #include <stdlib.h>2021 extern void qute_make_symbolic(void *ptr, size_t nelem, size_t elsiz, const char *name);2223 int main(void) {24 int a;25 qute_make_symbolic(&a, 1, sizeof(a), "a");2627 if (a <= 0)28 exit(0);29 assert(a > 0);30 return 0;31 }3233Compile this as follows to QBE using SCC:3435 $ ./bin/scc -c -o test.qbe test.c -R3637Afterward, execute the resulting `test.qbe` file using Qute:3839 $ qute-symex -p ./lib/scc/amd64-qute/libc.a test.qbe4041---4243stdio support is currently work in progress, but some stuff works already:4445 #include <stdio.h>4647 void greet(const char *name) {48 printf("Hello, %s!\n", name);49 }5051 int main(void) {52 greet("Addison");53 }5455Compile this as follows to QBE using SCC:5657 $ ./bin/scc -c -R stdio-test.c5859Afterward, execute the resulting binary concretely:6061 $ qute -p ./lib/scc/amd64-qute/libc.a stdio-test.qbe62 Hello, Addison!