summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-05-10 16:45:19 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2020-05-10 16:45:19 +0200
commitcc41902750e66aa6dc179aabbcfcd2eb50b8254a (patch)
treee00374d1a144bd4fb64cc7ef604ac190098263b5
parentb58c6adee700a96280915998b352e0ce5bb07f7a (diff)
downloadcompilertests-cc41902750e66aa6dc179aabbcfcd2eb50b8254a.tar.gz
compilertests-cc41902750e66aa6dc179aabbcfcd2eb50b8254a.tar.bz2
retested compiler and assembler with all 4 C compilers
-rw-r--r--ecomp-c/README30
1 files changed, 29 insertions, 1 deletions
diff --git a/ecomp-c/README b/ecomp-c/README
index 58bf2db..cdef821 100644
--- a/ecomp-c/README
+++ b/ecomp-c/README
@@ -22,6 +22,7 @@ cat libc-hosted.c ec.c | clang -g -O3 -m32 -march=i386 -Werror -Wall -pedantic -
cat libc-freestanding.c ec.c | pcc -g -O0 -march=i386 -ffreestanding -nostdlib -Wl,-emain -Werror -Wall -std=c89 -o ec -x c -
cat libc-freestanding.c ec.c | pcc -g -O1 -march=i386 -ffreestanding -nostdlib -Wl,-emain -Werror -Wall -std=c89 -o ec -x c -
# to use libc and syscall of the host
+# valgrind fails in SIGILL at unhandled instruction bytes: 0xC8 0x4 0x0 0x0
cat libc-hosted.c ec.c | pcc -g -O1 -march=i386 -Werror -Wall -std=c89 -o ec -lbsd -x c -
# -nostdlib segfaults with tcc 0.9.27
@@ -40,11 +41,38 @@ assembler
---------
cat libc-freestanding.c asm-i386.c | gcc -g -O0 -m32 -march=i386 -ffreestanding -fno-stack-protector -nostdlib -emain -Werror -Wno-noreturn -Wall -pedantic -fno-pic -std=c89 -o asm-i386 -x c -
+# optimized with own libc, syscalls need -fno-omit-frame-pointer otherwise they clobber the stack
+cat libc-freestanding.c asm-i386.c | gcc -g -O1 -m32 -march=i386 -fno-omit-frame-pointer -ffreestanding -fno-stack-protector -nostdlib -emain -Werror -Wno-noreturn -Wall -pedantic -fno-pic -std=c89 -o asm-i386 -x c -
+cat libc-freestanding.c asm-i386.c | gcc -g -O2 -m32 -march=i386 -fno-omit-frame-pointer -ffreestanding -fno-stack-protector -nostdlib -emain -Werror -Wno-noreturn -Wall -pedantic -fno-pic -std=c89 -o asm-i386 -x c -
+cat libc-freestanding.c asm-i386.c | gcc -g -O3 -m32 -march=i386 -fno-omit-frame-pointer -ffreestanding -fno-stack-protector -nostdlib -emain -Werror -Wno-noreturn -Wall -pedantic -fno-pic -std=c89 -o asm-i386 -x c -
+
+# to use libc and syscall of the host
cat libc-hosted.c asm-i386.c | gcc -g -O0 -m32 -march=i386 -fno-stack-protector -Werror -Wno-noreturn -Wall -pedantic -fno-pic -std=c89 -o asm-i386 -x c - -lbsd
+cat libc-hosted.c asm-i386.c | gcc -g -O3 -m32 -march=i386 -Werror -Wall -pedantic -std=c89 -o asm-i386.c -lbsd -x c -
cat libc-freestanding.c asm-i386.c | clang -g -O0 -m32 -march=i386 -ffreestanding -fno-stack-protector -nostdlib -Wl,-emain -Werror -Wall -pedantic -std=c89 -o asm-i386 -x c -
-cat libc-freestanding.c asm-i386.c | pcc -g -O0 -march=i386 -ffreestanding -nostdlib -Wl,-emain -Werror -Wall -std=c89 -o asm-i386 -x c -
+# ENOSYS in syscall wrappers, is the optimizer clobbering something here?
+cat libc-freestanding.c asm-i386.c | clang -g -O1 -m32 -march=i386 -fno-omit-frame-pointer -ffreestanding -fno-stack-protector -nostdlib -Wl,-emain -Werror -Wall -pedantic -std=c89 -o asm-i386 -x c -
+cat libc-freestanding.c asm-i386.c | clang -g -O2 -m32 -march=i386 -fno-omit-frame-pointer -ffreestanding -fno-stack-protector -nostdlib -Wl,-emain -Werror -Wall -pedantic -std=c89 -o asm-i386 -x c -
+cat libc-freestanding.c asm-i386.c | clang -g -O3 -m32 -march=i386 -fno-omit-frame-pointer -ffreestanding -fno-stack-protector -nostdlib -Wl,-emain -Werror -Wall -pedantic -std=c89 -o asm-i386 -x c -
+# to use libc and syscall of the host
+cat libc-hosted.c asm-i386.c | clang -g -O3 -m32 -march=i386 -Werror -Wall -pedantic -std=c89 -o asm-i386 -lbsd -x c -
+
+cat libc-freestanding.c asm-i386.c | pcc -g -O1 -march=i386 -ffreestanding -nostdlib -Wl,-emain -Werror -Wall -std=c89 -o asm-i386 -x c -
+# to use libc and syscall of the host
+# valgrind fails in SIGILL at unhandled instruction bytes: 0xC8 0x4 0x0 0x0
+cat libc-hosted.c asm-i386.c | pcc -g -O1 -march=i386 -Werror -Wall -std=c89 -o asm-i386 -lbsd -x c -
+
cat libc-freestanding.c asm-i386.c _start-stub.c | tcc -g -m32 -march=i386 -nostdlib -std=c89 -Werror -Wall -o asm-i386 -
+cat libc-freestanding.c asm-i386.c _start-stub.c | tcc -g -m32 -march=i386 -nostdlib -std=c89 -Werror -Wall -o asm-i386 -
+
+# -nostdlib segfaults with tcc 0.9.27
+# hangs with git version above 0.9.27
+cat libc-freestanding.c asm-i386.c | tcc -g -m32 -march=i386 -fno-builtin -std=c89 -Werror -Wall -o asm-i386 -
+# needs git version above 0.9.27
+cat libc-freestanding.c asm-i386.c _start-stub.c | tcc -g -m32 -march=i386 -nostdlib -std=c89 -Werror -Wall -o asm-i386 -
+# to use libc and syscall of the host
+cat libc-hosted.c asm-i386.c | tcc -g -m32 -march=i386 -std=c89 -Werror -Wall -o asm-i386 -lbsd -
# for debugging freestandig mode
cat libc-freestanding.c asm-i386.c > test.c