1# $FreeBSD: src/lib/csu/amd64/Makefile SVN 232832 2012/03/11 kib $ 2 3SRCS= crt1.c crti.S crtn.S 4OBJS+= Scrt1.o gcrt1.o 5INSTALLOBJS+= crt1.o crti.o crtn.o Scrt1.o gcrt1.o 6CLEANFILES= crt1.s gcrt1.s Scrt1.s 7CLEANFILES+= crt1.o crti.o crtn.o Scrt1.o gcrt1.o 8WARNS?= 2 9 10CFLAGS+= -I${CSUDIR}/../common \ 11 -I${CSUDIR}/../../libc/include 12CFLAGS+= -fno-omit-frame-pointer 13CFLAGS+= -fno-asynchronous-unwind-tables 14 15# explictly do not let the use of -flto (ld.gold blows away os version elf note) 16.if ${CFLAGS:M-flto} 17CFLAGS+= -fno-lto 18.endif 19 20.PATH: ${CSUDIR} ${CSUDIR}/../common 21 22# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not 23# directly compiled to .o files. 24 25crt1.s: crt1.c 26 ${CC} ${CFLAGS:N-flto} -S -o ${.TARGET} ${CSUDIR}/crt1.c 27 sed ${SED_FIX_NOTE} ${.TARGET} 28 29crt1.o: crt1.s 30 ${CC} -c -o ${.TARGET} crt1.s 31 32gcrt1.s: crt1.c 33 ${CC} ${CFLAGS:N-flto} -DGCRT -S -o ${.TARGET} ${CSUDIR}/crt1.c 34 sed ${SED_FIX_NOTE} ${.TARGET} 35 36gcrt1.o: gcrt1.s 37 ${CC} -c -o ${.TARGET} gcrt1.s 38 39Scrt1.s: crt1.c 40 ${CC} ${CFLAGS:N-flto} -fPIC -DPIC -S -o ${.TARGET} ${CSUDIR}/crt1.c 41 sed ${SED_FIX_NOTE} ${.TARGET} 42 43Scrt1.o: Scrt1.s 44 ${CC} -c -o ${.TARGET} Scrt1.s 45