1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Rethink the way thr_libc.So is generated. Relying on GCC to extract

only needed symbols from libc_pic is not working on sparc64.

Requested by: jake
This commit is contained in:
Alexander Kabaev 2003-09-02 19:37:11 +00:00
parent e20595fe25
commit 523be360f1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119693
4 changed files with 64 additions and 20 deletions

View File

@ -39,9 +39,3 @@ PRECIOUSLIB= yes
.include "${.CURDIR}/thread/Makefile.inc"
.include <bsd.lib.mk>
# Can't put thr_support.c in SRCS but want it in .depend.
${DEPENDFILE}: thr_support.c
# LIBC_PIC is defined only after <bsd.lib.mk> is included.
thr_libc.So: ${LIBC_PIC}

View File

@ -1,9 +1,37 @@
# $FreeBSD$
.PATH: ${.CURDIR}/support
.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string
CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH}
SYSCALLS= clock_gettime \
kse_create \
kse_exit \
kse_release \
kse_thr_interrupt \
kse_wakeup \
sigaction \
sigprocmask \
sigtimedwait \
write
SYSCALL_SRC= ${SYSCALLS:S/$/.S/}
SYSCALL_OBJ= ${SYSCALLS:S/$/.So/}
${SYSCALL_SRC}:
printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
LIBC_OBJS= sigsetops.So \
bcopy.So \
bzero.So \
memcpy.So \
memset.So \
strcpy.So \
strlen.So
SOBJS+= thr_libc.So
CLEANFILES+= thr_support.So
CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS}
thr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS}
${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC}
thr_libc.So: thr_support.So
${CC} -nostdlib -o ${.TARGET} -r thr_support.So -lc_pic

View File

@ -39,9 +39,3 @@ PRECIOUSLIB= yes
.include "${.CURDIR}/thread/Makefile.inc"
.include <bsd.lib.mk>
# Can't put thr_support.c in SRCS but want it in .depend.
${DEPENDFILE}: thr_support.c
# LIBC_PIC is defined only after <bsd.lib.mk> is included.
thr_libc.So: ${LIBC_PIC}

View File

@ -1,9 +1,37 @@
# $FreeBSD$
.PATH: ${.CURDIR}/support
.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string
CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH}
SYSCALLS= clock_gettime \
kse_create \
kse_exit \
kse_release \
kse_thr_interrupt \
kse_wakeup \
sigaction \
sigprocmask \
sigtimedwait \
write
SYSCALL_SRC= ${SYSCALLS:S/$/.S/}
SYSCALL_OBJ= ${SYSCALLS:S/$/.So/}
${SYSCALL_SRC}:
printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
LIBC_OBJS= sigsetops.So \
bcopy.So \
bzero.So \
memcpy.So \
memset.So \
strcpy.So \
strlen.So
SOBJS+= thr_libc.So
CLEANFILES+= thr_support.So
CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS}
thr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS}
${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC}
thr_libc.So: thr_support.So
${CC} -nostdlib -o ${.TARGET} -r thr_support.So -lc_pic