Total turd polishing: __getcwd() isn't ex, so ported in the shared version 
of libc, so let's exclude it from the static build too.

For historical reasons, the ${HIDDEN} target strips a leading underbar 
when figuring out the name of the syscall to generate a hidden stub for, 
so add another underbar when switching from ASM to HIDDEN.

ok?

Index: sys/Makefile.inc
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/sys/Makefile.inc,v
retrieving revision 1.144
diff -u -p -r1.144 Makefile.inc
--- sys/Makefile.inc    19 May 2016 05:31:22 -0000      1.144
+++ sys/Makefile.inc    30 May 2016 05:41:26 -0000
@@ -40,7 +40,7 @@ SRCS+=        ${CANCEL:%=w_%.c} w_pread.c w_pre
 
 # modules with default implementations on all architectures, unless overridden
 # below:
-ASM=   __getcwd.o __semctl.o __syscall.o __thrsigdivert.o \
+ASM=   __semctl.o __syscall.o __thrsigdivert.o \
        access.o acct.o adjfreq.o adjtime.o \
        bind.o chdir.o chflags.o chflagsat.o chmod.o chown.o chroot.o \
        clock_getres.o clock_gettime.o clock_settime.o \
@@ -112,7 +112,7 @@ PPSEUDO_NOERR=${PSEUDO_NOERR:.o=.po}
 SPSEUDO_NOERR=${PSEUDO_NOERR:.o=.so}
 DPSEUDO_NOERR=${PSEUDO_NOERR:.o=.do}
 
-HIDDEN= fork.o sigaction.o _ptrace.o ${CANCEL:=.o}
+HIDDEN= ___getcwd.o fork.o sigaction.o _ptrace.o ${CANCEL:=.o}
 GHIDDEN=${HIDDEN:.o=.go}
 PHIDDEN=${HIDDEN:.o=.po}
 SHIDDEN=${HIDDEN:.o=.so}

Reply via email to