The makefile now uses -fPIC by default as well.
It only uses -fPIC when it detects that the compiler enables it by default. Since cproc is using gcc as a preprocessor, if gcc is built with
--enable-default-pie
it defines__PIC__
by default, which is not correct since qbe doesn't generate position-independent code.I pushed a couple of commits to fix this. Now, you should be able to do
CC=cproc ./configure --target=x86_64-linux-musl && make -k lib/libc.a
to see all the errors.There are only a handful of unique errors, but these are all major features that need support from QBE (apart from _Complex maybe):
$ make -k lib/libc.a 2>&1 | grep -e error: -e cproc-qbe: | sort -u ./arch/x86_64/atomic_arch.h:3:2: error: inline assembly is not yet supported ./arch/x86_64/syscall_arch.h:6:2: error: inline assembly is not yet supported ./include/complex.h:16:8: error: _Complex is not yet supported cproc-qbe: long double is not yet supported src/network/if_nameindex.c:95:52: error: VLAs are not yet supported src/process/execl.c:12:20: error: VLAs are not yet supported src/process/execle.c:12:20: error: VLAs are not yet supported src/process/execlp.c:12:20: error: VLAs are not yet supported src/process/execvp.c:29:15: error: VLAs are not yet supported src/search/lsearch.c:6:17: error: VLAs are not yet supported src/string/explicit_bzero.c:6:2: error: inline assembly is not yet supported $