git: e52a9177d9e4 - main - libsys: reduce makefile declaration duplication

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Thu, 29 Feb 2024 19:19:19 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=e52a9177d9e43518e86d470be9cdbdcd7a699b8a

commit e52a9177d9e43518e86d470be9cdbdcd7a699b8a
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-02-29 19:19:01 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-02-29 19:19:01 +0000

    libsys: reduce makefile declaration duplication
    
    Every PSEUDO entry (_foo.o) has a corresponding NOASM entry (foo.o) to
    suppress its addition to ASM.  Check PSEUDO instead when adding entries
    to ASM.  No functional change.
    
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D44106
---
 lib/libsys/Makefile.sys | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys
index 6b83e5812f76..cafe197ec15e 100644
--- a/lib/libsys/Makefile.sys
+++ b/lib/libsys/Makefile.sys
@@ -15,9 +15,7 @@
 # While historically machine dependent, all architectures have the following
 # declarations in common:
 #
-NOASM=	exit.o \
-	getlogin.o \
-	yield.o
+NOASM=	yield.o
 PSEUDO=	_exit.o \
 	_getlogin.o
 .include "${LIBSYS_SRCTOP}/${LIBC_ARCH}/Makefile.sys"
@@ -26,7 +24,6 @@ PSEUDO=	_exit.o \
 .endif
 
 SRCS+= clock_gettime.c gettimeofday.c __vdso_gettimeofday.c
-NOASM+=  clock_gettime.o gettimeofday.o
 PSEUDO+= _clock_gettime.o _gettimeofday.o
 
 # Sources common to both syscall interfaces:
@@ -43,7 +40,6 @@ SRCS+=	creat.c
 SRCS+=	lockf.c wait.c wait3.c waitpid.c waitid.c
 SRCS+=	recv.c recvmmsg.c send.c sendmmsg.c
 
-NOASM+=  sched_getcpu.o
 PSEUDO+= _sched_getcpu.o
 
 SRCS+= brk.c
@@ -105,18 +101,17 @@ INTERPOSED = \
 	writev
 
 SRCS+=	${INTERPOSED:S/$/.c/}
-NOASM+=	${INTERPOSED:S/$/.o/}
 PSEUDO+=	${INTERPOSED:C/^.*$/_&.o/}
 
 # Add machine dependent asm sources:
 SRCS+=${MDASM}
 
 # Look though the complete list of syscalls (MIASM) for names that are
-# not defined with machine dependent implementations (MDASM) and are
-# not declared for no generation of default code (NOASM).  Add each
-# syscall that satisfies these conditions to the ASM list.
+# not defined with machine dependent implementations (MDASM), not declared
+# without a trival <sys> symbol (PSEUDO).  Add each syscall that satisfies
+# these conditions to the ASM list.
 .for _asm in ${MIASM}
-.if !${MDASM:R:M${_asm:R}} && !${NOASM:R:M${_asm:R}}
+.if !${MDASM:R:M${_asm:R}} && !${NOASM:R:M${_asm:R}} && !${PSEUDO:R:M_${_asm:R}}
 ASM+=$(_asm)
 .endif
 .endfor