csu: Add .note.ABI-tag and .note.GNU-stack
[dragonfly.git] / lib / csu / x86_64 / Makefile.csu
CommitLineData
f4df8772 1# $FreeBSD: src/lib/csu/amd64/Makefile SVN 217375 2011/01/13 dim $
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
fd8b66cd
SS
13
14.PATH: ${CSUDIR} ${CSUDIR}/../common
15
f4df8772
JM
16# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not
17# directly compiled to .o files.
e101389c 18
f4df8772
JM
19crt1.s: crt1.c
20 ${CC} ${CFLAGS} -S -o ${.TARGET} ${CSUDIR}/crt1.c
21 sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET}
22
23crt1.o: crt1.s
24 ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s
25
26gcrt1.s: crt1.c
27 ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${CSUDIR}/crt1.c
28 sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET}
29
30gcrt1.o: gcrt1.s
31 ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s
32
33Scrt1.s: crt1.c
34 ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${CSUDIR}/crt1.c
35 sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET}
36
37Scrt1.o: Scrt1.s
38 ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s