LTO: Prevent -flto being used by main gcc libraries.
[dragonfly.git] / gnu / lib / gcc50 / libgcc_eh / Makefile
1 .include "../Makefile.inc"
2 .PATH: ${GCCDIR}/libgcc
3 .PATH: ${GCCDIR}/libgcc/config/i386
4
5 LIB=            gcc_eh
6
7 CFLAGS+=        -I${.CURDIR}
8 CFLAGS+=        -I${.OBJDIR}
9 CFLAGS+=        -I${GCCDIR}/libgcc
10 CFLAGS+=        -I../csu
11 CFLAGS+=        -fbuilding-libgcc
12 CFLAGS+=        -fno-stack-protector
13 CFLAGS+=        -fexceptions
14 CFLAGS+=        -fvisibility=hidden
15 CFLAGS+=        -DIN_GCC
16 CFLAGS+=        -DIN_LIBGCC2
17 CFLAGS+=        -DHAVE_CC_TLS
18 CFLAGS+=        -DHIDE_EXPORTS
19
20 # for now do not let the use of -flto
21 .if ${CFLAGS:M-flto}
22 CFLAGS+=        -fno-lto
23 LDFLAGS+=       -flto
24 .endif
25
26 # LIB2ADDEH, gcc/Makefile
27 SRCS+=  unwind-dw2.c \
28         unwind-dw2-fde-dip.c \
29         unwind-sjlj.c \
30         unwind-c.c \
31         emutls.c
32
33 #generated sources
34 SRCS+=  unwind.h md-unwind-support.h gthr-default.h
35
36 unwind.h: unwind-generic.h
37         cp ${.ALLSRC} ${.TARGET}
38
39 md-unwind-support.h: dragonfly-unwind.h
40         cp ${.ALLSRC} ${.TARGET}
41
42 gthr-default.h: gthr-posix.h
43         cp ${.ALLSRC} ${.TARGET}
44
45 CLEANFILES+=    unwind.h md-unwind-support.h gthr-default.h
46
47 .include <bsd.lib.mk>