diff --git a/lib/libc/amd64/SYS.h b/lib/libc/amd64/SYS.h index c8a86f5ee2d5..7c2a3dc2d06a 100644 --- a/lib/libc/amd64/SYS.h +++ b/lib/libc/amd64/SYS.h @@ -35,7 +35,7 @@ * * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91 * - * $Id: SYS.h,v 1.4 1996/05/05 07:56:03 peter Exp $ + * $Id: SYS.h,v 1.5 1996/08/20 08:19:54 julian Exp $ */ #include @@ -83,9 +83,9 @@ * For the thread_safe versions, we prepend _thread_sys_ to the function * name so that the 'C' wrapper can go around the real name. */ -#define PSYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); ENTRY(_thread_sys_/**/x); lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b +#define PSYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); ENTRY(__CONCAT(_thread_sys_,x)); lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b #define PRSYSCALL(x) PSYSCALL(x); ret -#define PPSEUDO(x,y) ENTRY(_thread_sys_/**/x); lea __CONCAT(SYS_,y), %eax; KERNCALL; ret +#define PPSEUDO(x,y) ENTRY(__CONCAT(_thread_sys_,x)); lea __CONCAT(SYS_,y), %eax; KERNCALL; ret #else /* * The non-threaded library defaults to traditional syscalls where diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h index c8a86f5ee2d5..7c2a3dc2d06a 100644 --- a/lib/libc/i386/SYS.h +++ b/lib/libc/i386/SYS.h @@ -35,7 +35,7 @@ * * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91 * - * $Id: SYS.h,v 1.4 1996/05/05 07:56:03 peter Exp $ + * $Id: SYS.h,v 1.5 1996/08/20 08:19:54 julian Exp $ */ #include @@ -83,9 +83,9 @@ * For the thread_safe versions, we prepend _thread_sys_ to the function * name so that the 'C' wrapper can go around the real name. */ -#define PSYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); ENTRY(_thread_sys_/**/x); lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b +#define PSYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); ENTRY(__CONCAT(_thread_sys_,x)); lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b #define PRSYSCALL(x) PSYSCALL(x); ret -#define PPSEUDO(x,y) ENTRY(_thread_sys_/**/x); lea __CONCAT(SYS_,y), %eax; KERNCALL; ret +#define PPSEUDO(x,y) ENTRY(__CONCAT(_thread_sys_,x)); lea __CONCAT(SYS_,y), %eax; KERNCALL; ret #else /* * The non-threaded library defaults to traditional syscalls where diff --git a/lib/libc_r/sys/Makefile.inc b/lib/libc_r/sys/Makefile.inc index bca46e44f510..6470b67795af 100644 --- a/lib/libc_r/sys/Makefile.inc +++ b/lib/libc_r/sys/Makefile.inc @@ -68,24 +68,24 @@ ${SASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h ${THREADASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.o - @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' | \ - ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o - @${LD} -x -r ${.PREFIX}.o - @mv a.out ${.PREFIX}.o + @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.PREFIX}.S + @${CC} ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.o + @rm -f ${.PREFIX}.S PTHREADASM= ${THREADASM:.o=.po} ${PTHREADASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.po - @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' | \ - ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po - @${LD} -x -r ${.PREFIX}.po - @mv a.out ${.PREFIX}.po + @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.PREFIX}.S + @${CC} -DPROF ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.po + @rm -f ${.PREFIX}.S STHREADASM= ${THREADASM:.o=.so} ${STHREADASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.so - @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so + @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.PREFIX}.S + ${CC} -fpic -DPIC ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.so + @${LD} -O ${.TARGET} -x -r ${.TARGET} + @rm -f ${.PREFIX}.S ${PSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.o @@ -110,21 +110,21 @@ ${SPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h ${THREADPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.o - @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o - @${LD} -x -r ${.PREFIX}.o - @mv a.out ${.PREFIX}.o + @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' > ${.PREFIX}.S + @${CC} ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.o + @rm -f ${.PREFIX}.S THREADPPSEUDO=${THREADPSEUDO:.o=.po} ${THREADPPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.po - @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po - @${LD} -x -r ${.PREFIX}.po - @mv a.out ${.PREFIX}.po + @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' > ${.PREFIX}.S + @${CC} -DPROF ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.po + @rm -f ${.PREFIX}.S THREADSPSEUDO=${THREADPSEUDO:.o=.so} ${THREADSPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.so - @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so + @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' > ${.PREFIX}.S + ${CC} -fpic -DPIC ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.so + @${LD} -O ${.TARGET} -x -r ${.TARGET} + @rm -f ${.PREFIX}.S diff --git a/lib/libkse/sys/Makefile.inc b/lib/libkse/sys/Makefile.inc index bca46e44f510..6470b67795af 100644 --- a/lib/libkse/sys/Makefile.inc +++ b/lib/libkse/sys/Makefile.inc @@ -68,24 +68,24 @@ ${SASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h ${THREADASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.o - @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' | \ - ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o - @${LD} -x -r ${.PREFIX}.o - @mv a.out ${.PREFIX}.o + @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.PREFIX}.S + @${CC} ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.o + @rm -f ${.PREFIX}.S PTHREADASM= ${THREADASM:.o=.po} ${PTHREADASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.po - @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' | \ - ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po - @${LD} -x -r ${.PREFIX}.po - @mv a.out ${.PREFIX}.po + @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.PREFIX}.S + @${CC} -DPROF ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.po + @rm -f ${.PREFIX}.S STHREADASM= ${THREADASM:.o=.so} ${STHREADASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.so - @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so + @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.PREFIX}.S + ${CC} -fpic -DPIC ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.so + @${LD} -O ${.TARGET} -x -r ${.TARGET} + @rm -f ${.PREFIX}.S ${PSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.o @@ -110,21 +110,21 @@ ${SPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h ${THREADPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.o - @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o - @${LD} -x -r ${.PREFIX}.o - @mv a.out ${.PREFIX}.o + @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' > ${.PREFIX}.S + @${CC} ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.o + @rm -f ${.PREFIX}.S THREADPPSEUDO=${THREADPSEUDO:.o=.po} ${THREADPPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.po - @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po - @${LD} -x -r ${.PREFIX}.po - @mv a.out ${.PREFIX}.po + @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' > ${.PREFIX}.S + @${CC} -DPROF ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.po + @rm -f ${.PREFIX}.S THREADSPSEUDO=${THREADPSEUDO:.o=.so} ${THREADSPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.so - @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so + @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' > ${.PREFIX}.S + ${CC} -fpic -DPIC ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.so + @${LD} -O ${.TARGET} -x -r ${.TARGET} + @rm -f ${.PREFIX}.S diff --git a/lib/libpthread/sys/Makefile.inc b/lib/libpthread/sys/Makefile.inc index bca46e44f510..6470b67795af 100644 --- a/lib/libpthread/sys/Makefile.inc +++ b/lib/libpthread/sys/Makefile.inc @@ -68,24 +68,24 @@ ${SASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h ${THREADASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.o - @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' | \ - ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o - @${LD} -x -r ${.PREFIX}.o - @mv a.out ${.PREFIX}.o + @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.PREFIX}.S + @${CC} ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.o + @rm -f ${.PREFIX}.S PTHREADASM= ${THREADASM:.o=.po} ${PTHREADASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.po - @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' | \ - ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po - @${LD} -x -r ${.PREFIX}.po - @mv a.out ${.PREFIX}.po + @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.PREFIX}.S + @${CC} -DPROF ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.po + @rm -f ${.PREFIX}.S STHREADASM= ${THREADASM:.o=.so} ${STHREADASM}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.so - @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so + @printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.PREFIX}.S + ${CC} -fpic -DPIC ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.so + @${LD} -O ${.TARGET} -x -r ${.TARGET} + @rm -f ${.PREFIX}.S ${PSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.o @@ -110,21 +110,21 @@ ${SPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h ${THREADPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.o - @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o - @${LD} -x -r ${.PREFIX}.o - @mv a.out ${.PREFIX}.o + @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' > ${.PREFIX}.S + @${CC} ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.o + @rm -f ${.PREFIX}.S THREADPPSEUDO=${THREADPSEUDO:.o=.po} ${THREADPPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.po - @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po - @${LD} -x -r ${.PREFIX}.po - @mv a.out ${.PREFIX}.po + @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' > ${.PREFIX}.S + @${CC} -DPROF ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.po + @rm -f ${.PREFIX}.S THREADSPSEUDO=${THREADPSEUDO:.o=.so} ${THREADSPSEUDO}: ${.CURDIR}/../libc/${MACHINE}/SYS.h /usr/include/sys/syscall.h @${ECHO} creating ${.PREFIX}.so - @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so + @printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' > ${.PREFIX}.S + ${CC} -fpic -DPIC ${CFLAGS:M-[ID]*} ${AINC} -c ${.PREFIX}.S -o ${.PREFIX}.so + @${LD} -O ${.TARGET} -x -r ${.TARGET} + @rm -f ${.PREFIX}.S