freebsd-skq/lib/csu/Makefile.inc
Andrew Turner 31d62a73c2 Implement a BSD licensed crtbegin/crtend
These are needed for .ctors/.dtors and .jcr handling. The former needs
all the function pointers to be called in the correct order from the
.init/.fini section. The latter just needs to call a gcj specific function
if it exists with a pointer to the start of the .jcr section.

This is currently disabled until __dso_handle support is added.

Reviewed by:	emaste
MFC after:	1 month
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D17587
2018-10-25 17:39:41 +00:00

33 lines
641 B
Makefile

# $FreeBSD$
SSP_CFLAGS=
SED_FIX_NOTE = -i "" -e '/\.note\.tag/s/progbits/note/'
NO_WMISSING_VARIABLE_DECLARATIONS=
.include <src.opts.mk>
.if ${MK_BSD_CRTBEGIN} != "no" && !defined(BUILDING_TESTS)
OBJS+= crtbegin.o crtbeginS.o crtbeginT.o
OBJS+= crtend.o crtendS.o
CFLAGS_CRTS= -DSHARED ${PICFLAG}
crtbegin.o: crtbegin.c
crtbeginS.o: crtbegin.c
crtbeginT.o: crtbegin.c
crtend.o: crtend.c
crtendS.o: crtend.c
crtbegin.o crtend.o crtbeginT.o:
${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC}
crtbeginS.o crtendS.o:
${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} ${.ALLSRC}
.endif
.include "../Makefile.inc"