gcc80: Activate workaround for libgcc_pic.a.
[dragonfly.git] / gnu / lib / gcc80 / libgcc_pic / Makefile
1 .include "../Makefile.inc"
2 .include "../libgcc/Makefile.src"
3 .PATH: ${GCCDIR}/libgcc
4 .PATH: ${GCCDIR}/libgcc/soft-fp
5 .PATH: ${GCCDIR}/libgcc/config/i386
6
7 LIB=    gcc_pic
8
9 NOPROFILE=      YES
10 # Mimic libgcc_s.so, this is a special case
11 NOSHARED=       YES
12
13 CFLAGS+=        -fpic
14
15 CFLAGS+=        -I${.CURDIR}
16 CFLAGS+=        -I${.OBJDIR}
17 CFLAGS+=        -I${GCCDIR}/libgcc
18 CFLAGS+=        -I../csu
19 CFLAGS+=        -fbuilding-libgcc
20 CFLAGS+=        -fno-stack-protector
21 CFLAGS+=        -fexceptions
22 CFLAGS+=        -DIN_GCC
23 CFLAGS+=        -DIN_LIBGCC2
24 CFLAGS+=        -DHAVE_CC_TLS
25 CFLAGS+=        -DSHARED
26
27 # XXX: workaround for ld.gold issue
28 CFLAGS+=        -D_AVOID_WEAKREF
29
30 # FUNCS and SOFTFUNCS defined in Makefile.src
31 OBJS=           ${FUNCS:S/$/.o/}
32 SRCS=           ${SOFTFUNCS:S/$/.c/}
33
34 # LIB2ADDEH, gcc/Makefile
35 SRCS+=  unwind-dw2.c \
36         unwind-dw2-fde-dip.c \
37         unwind-sjlj.c \
38         unwind-c.c \
39         emutls.c
40
41 # generated sources
42 unwind.h: unwind-generic.h
43         cp ${.ALLSRC} ${.TARGET}
44
45 gthr-default.h: gthr-posix.h
46         cp ${.ALLSRC} ${.TARGET}
47
48 md-unwind-support.h: dragonfly-unwind.h
49         cp ${.ALLSRC} ${.TARGET}
50
51 sfp-machine.h: ${GCCDIR}/libgcc/config/i386/sfp-machine.h
52         cp ${.ALLSRC} ${.TARGET}
53
54 enable-execute-stack.c: enable-execute-stack-mprotect.c
55         cp ${.ALLSRC} ${.TARGET}
56
57 auto-target.h: ${.CURDIR}/../libgcc/auto-target.h
58         cp ${.ALLSRC} ${.TARGET}
59
60 CLEANFILES+=    unwind.h gthr-default.h sfp-machine.h md-unwind-support.h \
61                 enable-execute-stack.c auto-target.h
62
63 beforedepend:   unwind.h gthr-default.h sfp-machine.h md-unwind-support.h \
64                 enable-execute-stack.c auto-target.h
65
66 .include <bsd.lib.mk>