Submitted by: john birell (jb@cimlogic.com.au)
fixups for makefiles and for Thread-safe sycalls
This commit is contained in:
parent
07e872b15c
commit
0d28ad3615
@ -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 <sys/syscall.h>
|
||||
@ -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
|
||||
|
@ -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 <sys/syscall.h>
|
||||
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user