[hackers] [scc] [libc] Fix amd64 and i386 target name || Quentin Rameau

From: <git_AT_suckless.org>
Date: Fri, 17 Mar 2017 08:50:00 +0100 (CET)

commit d6f97eef2009ef0d18f75ee9748581a0d8c0c66f
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Mon Mar 13 13:01:02 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Tue Mar 14 08:31:50 2017 +0100

    [libc] Fix amd64 and i386 target name

diff --git a/libc/src/sys/amd64-linux/Makefile b/libc/src/sys/amd64-linux/Makefile
deleted file mode 100644
index f49496c..0000000
--- a/libc/src/sys/amd64-linux/Makefile
+++ /dev/null
_AT_@ -1,21 +0,0 @@
-# See LICENSE file for copyright and license details.
-.POSIX:
-
-include ../../../../config.mk
-
-OBJ_GEN = _read.o _write.o _open.o _close.o _lseek.o _brk.o\
- _rt_sigaction.o _getpid.o _Exit.o _kill.o
-
-ASM_GEN = $(OBJ_GEN:.o=.s)
-OBJ = $(OBJ_GEN)
-
-all: $(OBJ) system.mk
-
-system.mk: Makefile
- echo '$$(SYSOBJ)' = $(OBJ) > system.mk
-
-$(ASM_GEN): syscall.lst
- awk -f syscall.awk < syscall.lst
-
-clean:
- rm -f *.s *.o
diff --git a/libc/src/sys/amd64-linux/syscall.awk b/libc/src/sys/amd64-linux/syscall.awk
deleted file mode 100644
index 9a4110d..0000000
--- a/libc/src/sys/amd64-linux/syscall.awk
+++ /dev/null
_AT_@ -1,4 +0,0 @@
-/^#/ {next}
- {name=$2 ".s"
- printf "%s:\n\tmov\t%d,%%rax\n\tsyscall\n\tret\n",$2, $1 > name
- close(name)}
diff --git a/libc/src/sys/amd64-linux/syscall.lst b/libc/src/sys/amd64-linux/syscall.lst
deleted file mode 100644
index dcc5d68..0000000
--- a/libc/src/sys/amd64-linux/syscall.lst
+++ /dev/null
_AT_@ -1,11 +0,0 @@
-#number name
-0 _read
-1 _write
-2 _open
-3 _close
-3 _lseek
-12 _brk
-13 _rt_sigaction
-38 _getpid
-60 _Exit
-32 _kill
diff --git a/libc/src/sys/amd64-sysv-linux/Makefile b/libc/src/sys/amd64-sysv-linux/Makefile
new file mode 100644
index 0000000..f49496c
--- /dev/null
+++ b/libc/src/sys/amd64-sysv-linux/Makefile
_AT_@ -0,0 +1,21 @@
+# See LICENSE file for copyright and license details.
+.POSIX:
+
+include ../../../../config.mk
+
+OBJ_GEN = _read.o _write.o _open.o _close.o _lseek.o _brk.o\
+ _rt_sigaction.o _getpid.o _Exit.o _kill.o
+
+ASM_GEN = $(OBJ_GEN:.o=.s)
+OBJ = $(OBJ_GEN)
+
+all: $(OBJ) system.mk
+
+system.mk: Makefile
+ echo '$$(SYSOBJ)' = $(OBJ) > system.mk
+
+$(ASM_GEN): syscall.lst
+ awk -f syscall.awk < syscall.lst
+
+clean:
+ rm -f *.s *.o
diff --git a/libc/src/sys/amd64-sysv-linux/syscall.awk b/libc/src/sys/amd64-sysv-linux/syscall.awk
new file mode 100644
index 0000000..9a4110d
--- /dev/null
+++ b/libc/src/sys/amd64-sysv-linux/syscall.awk
_AT_@ -0,0 +1,4 @@
+/^#/ {next}
+ {name=$2 ".s"
+ printf "%s:\n\tmov\t%d,%%rax\n\tsyscall\n\tret\n",$2, $1 > name
+ close(name)}
diff --git a/libc/src/sys/amd64-sysv-linux/syscall.lst b/libc/src/sys/amd64-sysv-linux/syscall.lst
new file mode 100644
index 0000000..dcc5d68
--- /dev/null
+++ b/libc/src/sys/amd64-sysv-linux/syscall.lst
_AT_@ -0,0 +1,11 @@
+#number name
+0 _read
+1 _write
+2 _open
+3 _close
+3 _lseek
+12 _brk
+13 _rt_sigaction
+38 _getpid
+60 _Exit
+32 _kill
diff --git a/libc/src/sys/i386-sysv-linux/Makefile b/libc/src/sys/i386-sysv-linux/Makefile
new file mode 100644
index 0000000..555b8a9
--- /dev/null
+++ b/libc/src/sys/i386-sysv-linux/Makefile
_AT_@ -0,0 +1,33 @@
+# See LICENSE file for copyright and license details.
+.POSIX:
+
+include ../../../../config.mk
+-include system.mk
+-include sysgen.mk
+
+GENASM = $(GENOBJ:.o=.s)
+OBJ =
+
+all: all.bootstrap
+all.start: $(SYSOBJ)
+
+clean: clean.bootstrap
+clean.start:
+ rm -f *.o $(GENASM) system.mk sysgen.mk
+
+all.bootstrap clean.bootstrap: system.mk sysgen.mk
+ $(MAKE) -e $(_AT_:%.bootstrap=%.start)
+
+system.mk: Makefile syscall.lst
+ printf '%s ' 'SYSOBJ =' \
+ "$$(awk '/^#/{next}{printf "%s.o ", $$2}' syscall.lst)" \
+ $(OBJ) \
+ > $_AT_
+
+sysgen.mk: syscall.lst
+ printf '%s ' 'GENOBJ =' \
+ "$$(awk '/^#/{next}{printf "%s.o ", $$2}' syscall.lst)" \
+ > $_AT_
+
+$(GENASM): syscall.lst
+ awk -f syscall.awk < syscall.lst
diff --git a/libc/src/sys/i386-sysv-linux/syscall.lst b/libc/src/sys/i386-sysv-linux/syscall.lst
new file mode 100644
index 0000000..e69de29
Received on Fri Mar 17 2017 - 08:50:00 CET

This archive was generated by hypermail 2.3.0 : Fri Mar 17 2017 - 09:00:24 CET