shithub: scc

Download patch

ref: a2e3a665294b6d10575f0108a5ec56ead724ae17
parent: 78557956a11d64da5519d76561f5ff1c318d1124
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Aug 28 14:05:02 EDT 2018

[lib/c] Fix compilation in linux

BSD makes has some default rules that don't work in the same
in linux. It was known that these rules were going to be problematic
but I wanted to try them.

--- a/lib/c/target/amd64-sysv-linux/Makefile
+++ b/lib/c/target/amd64-sysv-linux/Makefile
@@ -9,7 +9,5 @@
 
 include syscall.mk
 include ../script/objlst.mk
+include ../posix/objlst.mk
 include ../script/common.mk
-
-raise.o: ../posix/raise.c ../../syscall.h
-signal.o: ../posix/signal.c ../../syscall.h
--- a/lib/c/target/amd64-sysv-netbsd/Makefile
+++ b/lib/c/target/amd64-sysv-netbsd/Makefile
@@ -9,7 +9,5 @@
 
 include syscall.mk
 include ../script/objlst.mk
+include ../posix/objlst.mk
 include ../script/common.mk
-
-raise.o: ../posix/raise.c ../../syscall.h
-signal.o: ../posix/signal.c ../../syscall.h
--- a/lib/c/target/amd64-sysv-openbsd/Makefile
+++ b/lib/c/target/amd64-sysv-openbsd/Makefile
@@ -9,7 +9,5 @@
 
 include syscall.mk
 include ../script/objlst.mk
+include ../posix/objlst.mk
 include ../script/common.mk
-
-raise.o: ../posix/raise.c ../../syscall.h
-signal.o: ../posix/signal.c ../../syscall.h
--- /dev/null
+++ b/lib/c/target/posix/objlst.mk
@@ -1,0 +1,6 @@
+
+raise.o: ../posix/raise.c ../../syscall.h
+	$(CC) $(SCC_CFLAGS) ../posix/raise.c -c
+
+signal.o: ../posix/signal.c ../../syscall.h
+	$(CC) $(SCC_CFLAGS) ../posix/signal.c -c