scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit fce016bf1b5fd8ebccfe0cbf93cd492458a1fb9a
parent a4293d8a43304f4acd52220f80347ead43cff2f9
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon,  1 Jun 2020 07:05:48 +0200

Merge remote-tracking branch 'origin/master'

Diffstat:
Msrc/libc/arch/amd64/deps.mk | 2+-
Msrc/libc/arch/amd64/linux/_getheap.c | 2+-
Msrc/libc/arch/amd64/linux/deps.mk | 2+-
Msrc/libc/arch/amd64/netbsd/Makefile | 2+-
Msrc/libc/arch/amd64/netbsd/crt.s | 2+-
Msrc/libc/arch/amd64/openbsd/Makefile | 2+-
Msrc/libc/arch/amd64/openbsd/crt.s | 2+-
Msrc/libc/arch/arm32/deps.mk | 2+-
Msrc/libc/arch/arm32/linux/_getheap.c | 2+-
Msrc/libc/arch/arm32/linux/deps.mk | 2+-
Msrc/libc/arch/arm64/deps.mk | 2+-
Msrc/libc/arch/arm64/linux/_getheap.c | 2+-
Msrc/libc/arch/i386/deps.mk | 2+-
Msrc/libc/arch/i386/linux/_getheap.c | 2+-
Msrc/libc/arch/i386/linux/deps.mk | 2+-
Asrc/libc/arch/linux/_getheap.c | 10++++++++++
Rsrc/libc/arch/crt-netbsd.s -> src/libc/arch/netbsd/crt.s | 0
Rsrc/libc/arch/crt-openbsd.s -> src/libc/arch/openbsd/crt.s | 0
Msrc/libc/arch/ppc32/deps.mk | 6++++++
Msrc/libc/arch/ppc32/linux/_getheap.c | 2+-
Msrc/libc/arch/ppc32/linux/deps.mk | 1+
21 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/src/libc/arch/amd64/deps.mk b/src/libc/arch/amd64/deps.mk @@ -10,7 +10,7 @@ ./dragonfly/raise.o: ./dragonfly/../../posix/raise.c ./dragonfly/signal.o: ./dragonfly/../../posix/signal.c ./dragonfly/time.o: ./dragonfly/../../posix/time.c -./linux/_getheap.o: ./linux/../../posix/_getheap.c +./linux/_getheap.o: ./linux/../../linux/_getheap.c ./linux/_tzone.o: ./linux/../../posix/_tzone.c ./linux/getenv.o: ./linux/../../posix/getenv.c ./linux/raise.o: ./linux/../../posix/raise.c diff --git a/src/libc/arch/amd64/linux/_getheap.c b/src/libc/arch/amd64/linux/_getheap.c @@ -1 +1 @@ -#include "../../posix/_getheap.c" +#include "../../linux/_getheap.c" diff --git a/src/libc/arch/amd64/linux/deps.mk b/src/libc/arch/amd64/linux/deps.mk @@ -1,5 +1,5 @@ #deps -./_getheap.o: ./../../posix/_getheap.c +./_getheap.o: ./../../linux/_getheap.c ./_tzone.o: ./../../posix/_tzone.c ./getenv.o: ./../../posix/getenv.c ./raise.o: ./../../posix/raise.c diff --git a/src/libc/arch/amd64/netbsd/Makefile b/src/libc/arch/amd64/netbsd/Makefile @@ -34,7 +34,7 @@ all: $(LIBC) $(CRT) $(LIBC): $(OBJS) $(MKLST) -crt.$O: ../crt-posix.s ../../crt-netbsd.s +crt.$O: ../crt-posix.s ../netbsd/crt.s $(GENSRC): syscall.lst gensys.sh $(@:.s=) diff --git a/src/libc/arch/amd64/netbsd/crt.s b/src/libc/arch/amd64/netbsd/crt.s @@ -1,2 +1,2 @@ - .include "../../crt-netbsd.s" + .include "../../netbsd/crt.s" .include "../crt-posix.s" diff --git a/src/libc/arch/amd64/openbsd/Makefile b/src/libc/arch/amd64/openbsd/Makefile @@ -32,7 +32,7 @@ all: $(LIBC) $(CRT) $(LIBC): $(OBJS) $(MKLST) -crt.$O: ../crt-posix.s ../../crt-openbsd.s +crt.$O: ../crt-posix.s ../openbsd/crt.s $(GENSRC): syscall.lst gensys.sh $(@:.s=) diff --git a/src/libc/arch/amd64/openbsd/crt.s b/src/libc/arch/amd64/openbsd/crt.s @@ -1,2 +1,2 @@ - .include "../../crt-openbsd.s" + .include "../../openbsd/crt.s" .include "../crt-posix.s" diff --git a/src/libc/arch/arm32/deps.mk b/src/libc/arch/arm32/deps.mk @@ -1,5 +1,5 @@ #deps -./linux/_getheap.o: ./linux/../../posix/_getheap.c +./linux/_getheap.o: ./linux/../../linux/_getheap.c ./linux/_open.o: ./linux/../../../syscall.h ./linux/_tzone.o: ./linux/../../posix/_tzone.c ./linux/getenv.o: ./linux/../../posix/getenv.c diff --git a/src/libc/arch/arm32/linux/_getheap.c b/src/libc/arch/arm32/linux/_getheap.c @@ -1 +1 @@ -#include "../../posix/_getheap.c" +#include "../../linux/_getheap.c" diff --git a/src/libc/arch/arm32/linux/deps.mk b/src/libc/arch/arm32/linux/deps.mk @@ -1,5 +1,5 @@ #deps -./_getheap.o: ./../../posix/_getheap.c +./_getheap.o: ./../../linux/_getheap.c ./_open.o: ./../../../syscall.h ./_tzone.o: ./../../posix/_tzone.c ./getenv.o: ./../../posix/getenv.c diff --git a/src/libc/arch/arm64/deps.mk b/src/libc/arch/arm64/deps.mk @@ -1,5 +1,5 @@ #deps -./linux/_getheap.o: ./linux/../../posix/_getheap.c +./linux/_getheap.o: ./linux/../../linux/_getheap.c ./linux/_open.o: ./linux/../../../syscall.h ./linux/_tzone.o: ./linux/../../posix/_tzone.c ./linux/getenv.o: ./linux/../../posix/getenv.c diff --git a/src/libc/arch/arm64/linux/_getheap.c b/src/libc/arch/arm64/linux/_getheap.c @@ -1 +1 @@ -#include "../../posix/_getheap.c" +#include "../../linux/_getheap.c" diff --git a/src/libc/arch/i386/deps.mk b/src/libc/arch/i386/deps.mk @@ -1,5 +1,5 @@ #deps -./linux/_getheap.o: ./linux/../../posix/_getheap.c +./linux/_getheap.o: ./linux/../../linux/_getheap.c ./linux/raise.o: ./linux/../../posix/raise.c ./linux/signal.o: ./linux/../../posix/signal.c ./memchr.o: ./../../string/memchr.c diff --git a/src/libc/arch/i386/linux/_getheap.c b/src/libc/arch/i386/linux/_getheap.c @@ -1 +1 @@ -#include "../../posix/_getheap.c" +#include "../../linux/_getheap.c" diff --git a/src/libc/arch/i386/linux/deps.mk b/src/libc/arch/i386/linux/deps.mk @@ -1,4 +1,4 @@ #deps -./_getheap.o: ./../../posix/_getheap.c +./_getheap.o: ./../../linux/_getheap.c ./raise.o: ./../../posix/raise.c ./signal.o: ./../../posix/signal.c diff --git a/src/libc/arch/linux/_getheap.c b/src/libc/arch/linux/_getheap.c @@ -0,0 +1,10 @@ +#include <stddef.h> + +#include "../../libc.h" +#include "../../syscall.h" + +void * +_getheap(void) +{ + return _brk(0); +} diff --git a/src/libc/arch/crt-netbsd.s b/src/libc/arch/netbsd/crt.s diff --git a/src/libc/arch/crt-openbsd.s b/src/libc/arch/openbsd/crt.s diff --git a/src/libc/arch/ppc32/deps.mk b/src/libc/arch/ppc32/deps.mk @@ -1 +1,7 @@ #deps +./linux/_getheap.o: ./linux/../../linux/_getheap.c +./memchr.o: ./../../string/memchr.c +./memcmp.o: ./../../string/memcmp.c +./memcpy.o: ./../../string/memcpy.c +./memmove.o: ./../../string/memmove.c +./memset.o: ./../../string/memset.c diff --git a/src/libc/arch/ppc32/linux/_getheap.c b/src/libc/arch/ppc32/linux/_getheap.c @@ -1 +1 @@ -#include "../../posix/_getheap.c" +#include "../../linux/_getheap.c" diff --git a/src/libc/arch/ppc32/linux/deps.mk b/src/libc/arch/ppc32/linux/deps.mk @@ -1 +1,2 @@ #deps +./_getheap.o: ./../../linux/_getheap.c