scc

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

commit 6025315eb0012745baa2c484deb9036496272134
parent 78998efe6e308b35bbb723548e49d85b8d5d46de
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 14 Sep 2021 14:47:48 +0200

libc: Update arch/arm/linux

This code is being updated out of the tree of scc and
it is time to synchroniza both copies now.

Diffstat:
Msrc/libc/arch/arm/linux/Makefile | 6+++---
Msrc/libc/arch/arm/linux/syscall.lst | 2+-
Msrc/libc/arch/arm64/linux/Makefile | 22++++++++++++----------
Msrc/libc/arch/arm64/linux/gensys.sh | 6+++---
Msrc/libc/arch/arm64/linux/syscall.lst | 6+++---
5 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/src/libc/arch/arm/linux/Makefile b/src/libc/arch/arm/linux/Makefile @@ -5,16 +5,16 @@ include $(PROJECTDIR)/scripts/rules.mk include ../../../rules.mk GENOBJS =\ - _Exit.$O\ _close.$O\ - _brk.$O\ + _exit.$O\ _getpid.$O\ _kill.$O\ _lseek.$O\ _openat.$O\ _read.$O\ - _write.$O\ _sigaction.$O\ + _sys_brk.$O\ + _write.$O\ GENSRC = $(GENOBJS:.$O=.s) diff --git a/src/libc/arch/arm/linux/syscall.lst b/src/libc/arch/arm/linux/syscall.lst @@ -7,5 +7,5 @@ 20 _getpid 37 _kill 19 _lseek -45 _brk +45 _sys_brk 134 _sigaction diff --git a/src/libc/arch/arm64/linux/Makefile b/src/libc/arch/arm64/linux/Makefile @@ -1,35 +1,37 @@ .POSIX: -PROJECTDIR =../../../../.. +PROJECTDIR = ../../../../.. + include $(PROJECTDIR)/scripts/rules.mk include ../../../rules.mk -GENOBJS =\ - _Exit.$O\ +GENOBJS =\ _close.$O\ - _brk.$O\ + _exit.$O\ _getpid.$O\ _kill.$O\ _lseek.$O\ _openat.$O\ _read.$O\ - _write.$O\ _sigaction.$O\ - -GENSRC = $(GENOBJS:.$O=.s) + _sys_brk.$O\ + _write.$O\ OBJS =\ $(GENOBJS)\ _cerrno.$O\ _sys_errlist.$O\ +GENSRC = $(GENOBJS:.$O=.s) + all: $(OBJS) $(CRT) -crt.$O: ../crt-posix.s +$(CRT): ../crt-posix.s $(GENSRC): syscall.lst ./gensys.sh $(@:.s=) clean: - rm -f $(GENSRC) - rm -f syscall _sys_errlist.c + rm -f $(GENSRC) _sys_errlist.c + +include deps.mk diff --git a/src/libc/arch/arm64/linux/gensys.sh b/src/libc/arch/arm64/linux/gensys.sh @@ -1,12 +1,12 @@ #!/bin/sh -# # This job is very easy because app and kernel ABI are identical # until the 4th parameter, so we only have to set the syscall # number in rax -sed 's/[ ]*#.*// - /^$/d' syscall.lst | +sed -n " + s/[ ]*#.*// + /$1/p" syscall.lst | while read num name do cat <<EOF > $name.s diff --git a/src/libc/arch/arm64/linux/syscall.lst b/src/libc/arch/arm64/linux/syscall.lst @@ -1,11 +1,11 @@ #number name 56 _openat 57 _close +62 _lseek 63 _read 64 _write 93 _Exit -172 _getpid 129 _kill -62 _lseek 134 _sigaction -214 _brk +172 _getpid +214 _sys_brk