# $FreeBSD: src/lib/csu/amd64/Makefile SVN 232832 2012/03/11 kib $ SRCS= crt1.c crti.S crtn.S OBJS+= Scrt1.o gcrt1.o INSTALLOBJS+= crt1.o crti.o crtn.o Scrt1.o gcrt1.o CLEANFILES= crt1.s gcrt1.s Scrt1.s CLEANFILES+= crt1.o crti.o crtn.o Scrt1.o gcrt1.o MKDEPINTDEPS= crt1.o:crt1.s MKDEPINTDEPS+= crt1.o:gcrt1.s MKDEPINTDEPS+= crt1.o:Scrt1.s NOIMPLICITDEPEND= WARNS?= 2 CFLAGS+= -I${CSUDIR}/../common \ -I${CSUDIR}/../../libc/include CFLAGS+= -fno-omit-frame-pointer CFLAGS+= -fno-asynchronous-unwind-tables # explictly do not let the use of -flto (ld.gold blows away os version elf note) .if ${CFLAGS:M-flto} CFLAGS+= -fno-lto .endif .PATH: ${CSUDIR} ${CSUDIR}/../common # See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not # directly compiled to .o files. crt1.s: crt1.c ${CC} ${CFLAGS:N-flto} -S -o ${.TARGET} ${CSUDIR}/crt1.c sed ${SED_FIX_NOTE} ${.TARGET} crt1.o: crt1.s ${CC} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS:N-flto} -DGCRT -S -o ${.TARGET} ${CSUDIR}/crt1.c sed ${SED_FIX_NOTE} ${.TARGET} gcrt1.o: gcrt1.s ${CC} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS:N-flto} -fPIC -DPIC -S -o ${.TARGET} ${CSUDIR}/crt1.c sed ${SED_FIX_NOTE} ${.TARGET} Scrt1.o: Scrt1.s ${CC} -c -o ${.TARGET} Scrt1.s