From dc591d96b2eba4d071427f067c96fe4334a0c8e3 Mon Sep 17 00:00:00 2001 From: brooks Date: Thu, 8 Sep 2016 22:38:20 +0000 Subject: [PATCH] Reduce duplicate NOASM and PSEUDO definitions The initial value of NOASM is nearly the same in all cases and the initial value of PSEUDO is the same in all cases so reduce duplication (and hopefully, future merge conflicts) by machine independent defaults. Also document the PSEUDO variable. Reviewed by: jhb, kib Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D7820 --- lib/libc/aarch64/sys/Makefile.inc | 12 ++---------- lib/libc/amd64/sys/Makefile.inc | 4 +--- lib/libc/arm/sys/Makefile.inc | 4 +--- lib/libc/i386/sys/Makefile.inc | 5 +---- lib/libc/mips/sys/Makefile.inc | 4 +--- lib/libc/powerpc/sys/Makefile.inc | 5 ----- lib/libc/powerpc64/sys/Makefile.inc | 5 ----- lib/libc/riscv/sys/Makefile.inc | 11 +---------- lib/libc/sparc64/sys/Makefile.inc | 5 ----- lib/libc/sys/Makefile.inc | 11 +++++++++++ 10 files changed, 18 insertions(+), 48 deletions(-) diff --git a/lib/libc/aarch64/sys/Makefile.inc b/lib/libc/aarch64/sys/Makefile.inc index 1329ee8ba322..60f9a98eea5c 100644 --- a/lib/libc/aarch64/sys/Makefile.inc +++ b/lib/libc/aarch64/sys/Makefile.inc @@ -11,13 +11,5 @@ MDASM= cerror.S \ vfork.S # Don't generate default code for these syscalls: -NOASM= break.o \ - exit.o \ - getlogin.o \ - sbrk.o \ - sstk.o \ - vfork.o \ - yield.o - -PSEUDO= _exit.o \ - _getlogin.o +NOASM+= sbrk.o \ + vfork.o diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libc/amd64/sys/Makefile.inc index 04d529d0f23a..d208f0fcc111 100644 --- a/lib/libc/amd64/sys/Makefile.inc +++ b/lib/libc/amd64/sys/Makefile.inc @@ -8,6 +8,4 @@ MDASM= vfork.S brk.S cerror.S exect.S getcontext.S \ sbrk.S setlogin.S sigreturn.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getlogin.o sstk.o vfork.o yield.o - -PSEUDO= _getlogin.o _exit.o +NOASM+= vfork.o diff --git a/lib/libc/arm/sys/Makefile.inc b/lib/libc/arm/sys/Makefile.inc index f155e1f0c0f7..9b53030dd3c6 100644 --- a/lib/libc/arm/sys/Makefile.inc +++ b/lib/libc/arm/sys/Makefile.inc @@ -5,6 +5,4 @@ SRCS+= __vdso_gettc.c MDASM= Ovfork.S brk.S cerror.S sbrk.S shmat.S sigreturn.S syscall.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getlogin.o sstk.o vfork.o yield.o - -PSEUDO= _exit.o _getlogin.o +NOASM+= vfork.o diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libc/i386/sys/Makefile.inc index 30b480eccbd9..450948ec7f2f 100644 --- a/lib/libc/i386/sys/Makefile.inc +++ b/lib/libc/i386/sys/Makefile.inc @@ -10,10 +10,7 @@ SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ioperm.c i386_get_ldt.c \ MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S \ sbrk.S setlogin.S sigreturn.S syscall.S -# Don't generate default code for these syscalls: -NOASM= break.o exit.o getlogin.o sstk.o vfork.o yield.o - -PSEUDO= _getlogin.o _exit.o +NOASM+= vfork.o MAN+= i386_get_ioperm.2 i386_get_ldt.2 i386_vm86.2 MAN+= i386_set_watch.3 diff --git a/lib/libc/mips/sys/Makefile.inc b/lib/libc/mips/sys/Makefile.inc index c9ea0402c3b8..f8af45378b90 100644 --- a/lib/libc/mips/sys/Makefile.inc +++ b/lib/libc/mips/sys/Makefile.inc @@ -6,6 +6,4 @@ MDASM= Ovfork.S brk.S cerror.S exect.S \ sbrk.S syscall.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getlogin.o sstk.o vfork.o yield.o - -PSEUDO= _exit.o _getlogin.o +NOASM+= vfork.o diff --git a/lib/libc/powerpc/sys/Makefile.inc b/lib/libc/powerpc/sys/Makefile.inc index c37bd901bd91..edb469c6fbcf 100644 --- a/lib/libc/powerpc/sys/Makefile.inc +++ b/lib/libc/powerpc/sys/Makefile.inc @@ -1,8 +1,3 @@ # $FreeBSD$ MDASM+= brk.S cerror.S exect.S sbrk.S setlogin.S - -# Don't generate default code for these syscalls: -NOASM= break.o exit.o getlogin.o sstk.o yield.o - -PSEUDO= _getlogin.o _exit.o diff --git a/lib/libc/powerpc64/sys/Makefile.inc b/lib/libc/powerpc64/sys/Makefile.inc index c37bd901bd91..edb469c6fbcf 100644 --- a/lib/libc/powerpc64/sys/Makefile.inc +++ b/lib/libc/powerpc64/sys/Makefile.inc @@ -1,8 +1,3 @@ # $FreeBSD$ MDASM+= brk.S cerror.S exect.S sbrk.S setlogin.S - -# Don't generate default code for these syscalls: -NOASM= break.o exit.o getlogin.o sstk.o yield.o - -PSEUDO= _getlogin.o _exit.o diff --git a/lib/libc/riscv/sys/Makefile.inc b/lib/libc/riscv/sys/Makefile.inc index 1e1abc744096..00f1af11df35 100644 --- a/lib/libc/riscv/sys/Makefile.inc +++ b/lib/libc/riscv/sys/Makefile.inc @@ -10,13 +10,4 @@ MDASM= cerror.S \ vfork.S # Don't generate default code for these syscalls: -NOASM= break.o \ - exit.o \ - getlogin.o \ - sbrk.o \ - sstk.o \ - vfork.o \ - yield.o - -PSEUDO= _exit.o \ - _getlogin.o +NOASM+= vfork.o diff --git a/lib/libc/sparc64/sys/Makefile.inc b/lib/libc/sparc64/sys/Makefile.inc index 6a226bb71d26..65e1353cb6ac 100644 --- a/lib/libc/sparc64/sys/Makefile.inc +++ b/lib/libc/sparc64/sys/Makefile.inc @@ -13,8 +13,3 @@ SRCS+= __sparc_sigtramp_setup.c \ CFLAGS+= -I${LIBC_SRCTOP}/sparc64/fpu MDASM+= brk.S cerror.S exect.S sbrk.S setlogin.S sigaction1.S - -# Don't generate default code for these syscalls: -NOASM= break.o exit.o getlogin.o sstk.o yield.o - -PSEUDO= _getlogin.o _exit.o diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 2778cad915a4..88cf0cc813b5 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -12,7 +12,18 @@ # # MDASM names override the default syscall names in MIASM. # NOASM will prevent the default syscall code from being generated. +# PSEUDO generates _() and __sys_() symbols, but not (). # +# While historically machine dependent, all archictures have the following +# declerations in common: +# +NOASM= break.o \ + exit.o \ + getlogin.o \ + sstk.o \ + yield.o +PSEUDO= _exit.o \ + _getlogin.o .sinclude "${LIBC_SRCTOP}/${LIBC_ARCH}/sys/Makefile.inc" SRCS+= clock_gettime.c gettimeofday.c __vdso_gettimeofday.c