csu: Fix .eh_frame_hdr errors seen on i386
[dragonfly.git] / lib / csu / x86_64 / Makefile.csu
CommitLineData
2816d07c 1# $FreeBSD: src/lib/csu/amd64/Makefile SVN 232832 2012/03/11 kib $
fd8b66cd 2
f4df8772 3SRCS= crt1.c crti.S crtn.S
e101389c 4OBJS+= Scrt1.o gcrt1.o
f4df8772
JM
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
1d99ff55 8WARNS?= 2
fd8b66cd
SS
9
10CFLAGS+= -I${CSUDIR}/../common \
11 -I${CSUDIR}/../../libc/include
e101389c 12CFLAGS+= -fno-omit-frame-pointer
4a0e0cd7 13CFLAGS+= -fno-asynchronous-unwind-tables
fd8b66cd
SS
14
15.PATH: ${CSUDIR} ${CSUDIR}/../common
16
f4df8772
JM
17# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not
18# directly compiled to .o files.
e101389c 19
f4df8772
JM
20crt1.s: crt1.c
21 ${CC} ${CFLAGS} -S -o ${.TARGET} ${CSUDIR}/crt1.c
2816d07c 22 sed ${SED_FIX_NOTE} ${.TARGET}
f4df8772
JM
23
24crt1.o: crt1.s
25 ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s
26
27gcrt1.s: crt1.c
28 ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${CSUDIR}/crt1.c
2816d07c 29 sed ${SED_FIX_NOTE} ${.TARGET}
f4df8772
JM
30
31gcrt1.o: gcrt1.s
32 ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s
33
34Scrt1.s: crt1.c
35 ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${CSUDIR}/crt1.c
2816d07c 36 sed ${SED_FIX_NOTE} ${.TARGET}
f4df8772
JM
37
38Scrt1.o: Scrt1.s
39 ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s