csu: Fix .eh_frame_hdr errors seen on i386
[dragonfly.git] / lib / csu / i386 / Makefile.csu
CommitLineData
2816d07c 1# $FreeBSD: src/lib/csu/i386-elf/Makefile SVN 232832 2012/03/11 kib $
fd8b66cd 2
f4df8772 3SRCS= crti.S crtn.S
e101389c
JM
4OBJS+= gcrt1.o crt1.o Scrt1.o
5INSTALLOBJS+= crt1.o crti.o crtn.o gcrt1.o Scrt1.o
f4df8772
JM
6CLEANFILES= crt1.o crti.o crtn.o gcrt1.o Scrt1.o
7CLEANFILES+= crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
8CLEANFILES+= crt1_c.s gcrt1_c.s Scrt1_c.s
1d99ff55 9WARNS?= 2
fd8b66cd 10
2f81c0d4
JM
11CFLAGS+= -I${CSUDIR}/../common \
12 -I${CSUDIR}/../../libc/include
4a0e0cd7
JM
13CFLAGS+= -fno-omit-frame-pointer
14CFLAGS+= -fno-asynchronous-unwind-tables
fd8b66cd
SS
15
16.PATH: ${CSUDIR} ${CSUDIR}/../common
17
f4df8772
JM
18# See the comment in lib/csu/common/crtbrand.c for the reason crt1_c.c is not
19# directly compiled to .o files.
e101389c 20
f4df8772
JM
21gcrt1_c.s: crt1_c.c
22 ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${CSUDIR}/crt1_c.c
2816d07c 23 sed ${SED_FIX_NOTE} ${.TARGET}
f4df8772
JM
24
25gcrt1_c.o: gcrt1_c.s
26 ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1_c.s
27
28gcrt1.o: gcrt1_c.o crt1_s.o
e101389c
JM
29 ${LD} ${LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o
30
f4df8772
JM
31crt1_c.s: crt1_c.c
32 ${CC} ${CFLAGS} -S -o ${.TARGET} ${CSUDIR}/crt1_c.c
2816d07c 33 sed ${SED_FIX_NOTE} ${.TARGET}
f4df8772
JM
34
35crt1_c.o: crt1_c.s
36 ${CC} ${CFLAGS} -c -o ${.TARGET} crt1_c.s
37
38crt1.o: crt1_c.o crt1_s.o
e101389c
JM
39 ${LD} ${LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o
40 objcopy --localize-symbol _start1 crt1.o
41
f4df8772
JM
42Scrt1_c.s: crt1_c.c
43 ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${CSUDIR}/crt1_c.c
2816d07c 44 sed ${SED_FIX_NOTE} ${.TARGET}
f4df8772
JM
45
46Scrt1_c.o: Scrt1_c.s
47 ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1_c.s
e101389c 48
f4df8772 49Scrt1.o: Scrt1_c.o crt1_s.o
e101389c
JM
50 ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o
51 objcopy --localize-symbol _start1 Scrt1.o