xref: /dragonfly/gnu/lib/gcc80/libgcc/Makefile (revision ed183f8c)
1.include "../Makefile.inc"
2.include "Makefile.src"
3.PATH: ${GCCDIR}/libgcc
4.PATH: ${GCCDIR}/libgcc/soft-fp
5.PATH: ${GCCDIR}/libgcc/config/i386
6
7LIB=		gcc
8
9# this is a special case
10NOSHARED=	YES
11
12CFLAGS+=	-I${.CURDIR}
13CFLAGS+=	-I${.OBJDIR}
14CFLAGS+=	-I${GCCDIR}/libgcc
15CFLAGS+=	-I${GCCDIR}/libgcc/config/i386
16CFLAGS+=	-I../csu
17CFLAGS+=	-fbuilding-libgcc
18CFLAGS+=	-fno-stack-protector
19CFLAGS+=	-fvisibility=hidden
20CFLAGS+=	-fpic
21CFLAGS+=	-DPIC
22CFLAGS+=	-DIN_GCC
23CFLAGS+=	-DIN_LIBGCC2
24CFLAGS+=	-DHAVE_CC_TLS
25CFLAGS+=	-DHIDE_EXPORTS
26
27# FUNCS and SOFTFUNCS defined in Makefile.src
28OBJS=		${FUNCS:S/$/.o/} ${FUNCS_ST:S/$/.o/}
29SRCS=		${SOFTFUNCS:S/$/.c/}
30
31#generated sources
32SRCS+=		gthr-default.h sfp-machine.h
33
34# GCC's libgcc generates source files which depend on generated
35# header files, which means we have to generate our tools set before
36# we can build libgcc.  The toolset is normally built afterwards.
37#
38# XXX for the world stage we could theoretically use the cc_tools generated
39# in the btools stage, but it's easier to regenerate them.
40#
41# Assumed to be built prior to this makefile:
42#   gnu/usr.bin/cc80/cc_prep
43#   gnu/usr.bin/cc80/cc_tools
44#   gnu/lib/gcc80/csu
45
46# derived from generated build/gcc/Makefile
47EXTRA_HEADERS = \
48	${GCCDIR}/gcc/config/i386/cpuid.h \
49	${GCCDIR}/gcc/config/i386/mmintrin.h \
50	${GCCDIR}/gcc/config/i386/mm3dnow.h \
51	${GCCDIR}/gcc/config/i386/xmmintrin.h \
52	${GCCDIR}/gcc/config/i386/emmintrin.h \
53	${GCCDIR}/gcc/config/i386/pmmintrin.h \
54	${GCCDIR}/gcc/config/i386/tmmintrin.h \
55	${GCCDIR}/gcc/config/i386/ammintrin.h \
56	${GCCDIR}/gcc/config/i386/smmintrin.h \
57	${GCCDIR}/gcc/config/i386/nmmintrin.h \
58	${GCCDIR}/gcc/config/i386/bmmintrin.h \
59	${GCCDIR}/gcc/config/i386/fma4intrin.h \
60	${GCCDIR}/gcc/config/i386/wmmintrin.h \
61	${GCCDIR}/gcc/config/i386/immintrin.h \
62	${GCCDIR}/gcc/config/i386/x86intrin.h \
63	${GCCDIR}/gcc/config/i386/avxintrin.h \
64	${GCCDIR}/gcc/config/i386/xopintrin.h \
65	${GCCDIR}/gcc/config/i386/ia32intrin.h \
66	${GCCDIR}/gcc/config/i386/cross-stdarg.h \
67	${GCCDIR}/gcc/config/i386/lwpintrin.h \
68	${GCCDIR}/gcc/config/i386/popcntintrin.h \
69	${GCCDIR}/gcc/config/i386/lzcntintrin.h \
70	${GCCDIR}/gcc/config/i386/bmiintrin.h \
71	${GCCDIR}/gcc/config/i386/bmi2intrin.h \
72	${GCCDIR}/gcc/config/i386/tbmintrin.h \
73	${GCCDIR}/gcc/config/i386/avx2intrin.h \
74	${GCCDIR}/gcc/config/i386/avx512fintrin.h \
75	${GCCDIR}/gcc/config/i386/fmaintrin.h \
76	${GCCDIR}/gcc/config/i386/f16cintrin.h \
77	${GCCDIR}/gcc/config/i386/rtmintrin.h \
78	${GCCDIR}/gcc/config/i386/xtestintrin.h \
79	${GCCDIR}/gcc/config/i386/rdseedintrin.h \
80	${GCCDIR}/gcc/config/i386/prfchwintrin.h \
81	${GCCDIR}/gcc/config/i386/adxintrin.h \
82	${GCCDIR}/gcc/config/i386/fxsrintrin.h \
83	${GCCDIR}/gcc/config/i386/xsaveintrin.h \
84	${GCCDIR}/gcc/config/i386/xsaveoptintrin.h \
85	${GCCDIR}/gcc/config/i386/avx512cdintrin.h \
86	${GCCDIR}/gcc/config/i386/avx512erintrin.h \
87	${GCCDIR}/gcc/config/i386/avx512pfintrin.h \
88	${GCCDIR}/gcc/config/i386/shaintrin.h \
89	${GCCDIR}/gcc/config/i386/clflushoptintrin.h \
90	${GCCDIR}/gcc/config/i386/xsavecintrin.h \
91	${GCCDIR}/gcc/config/i386/xsavesintrin.h \
92	${GCCDIR}/gcc/config/i386/avx512dqintrin.h \
93	${GCCDIR}/gcc/config/i386/avx512bwintrin.h \
94	${GCCDIR}/gcc/config/i386/avx512vlintrin.h \
95	${GCCDIR}/gcc/config/i386/avx512vlbwintrin.h \
96	${GCCDIR}/gcc/config/i386/avx512vldqintrin.h \
97	${GCCDIR}/gcc/config/i386/avx512ifmaintrin.h \
98	${GCCDIR}/gcc/config/i386/avx512ifmavlintrin.h \
99	${GCCDIR}/gcc/config/i386/avx512vbmiintrin.h \
100	${GCCDIR}/gcc/config/i386/avx512vbmivlintrin.h \
101	${GCCDIR}/gcc/config/i386/avx5124fmapsintrin.h \
102	${GCCDIR}/gcc/config/i386/avx5124vnniwintrin.h \
103	${GCCDIR}/gcc/config/i386/avx512vpopcntdqintrin.h \
104	${GCCDIR}/gcc/config/i386/clwbintrin.h \
105	${GCCDIR}/gcc/config/i386/mwaitxintrin.h \
106	${GCCDIR}/gcc/config/i386/clzerointrin.h \
107	${GCCDIR}/gcc/config/i386/pkuintrin.h \
108	${GCCDIR}/gcc/config/i386/sgxintrin.h \
109	${GCCDIR}/gcc/config/i386/cetintrin.h \
110	${GCCDIR}/gcc/config/i386/gfniintrin.h \
111	${GCCDIR}/gcc/config/i386/cet.h \
112	${GCCDIR}/gcc/config/i386/avx512vbmi2intrin.h \
113	${GCCDIR}/gcc/config/i386/avx512vbmi2vlintrin.h \
114	${GCCDIR}/gcc/config/i386/avx512vnniintrin.h \
115	${GCCDIR}/gcc/config/i386/avx512vnnivlintrin.h \
116	${GCCDIR}/gcc/config/i386/vaesintrin.h \
117	${GCCDIR}/gcc/config/i386/vpclmulqdqintrin.h \
118	${GCCDIR}/gcc/config/i386/avx512vpopcntdqvlintrin.h \
119	${GCCDIR}/gcc/config/i386/avx512bitalgintrin.h \
120	${GCCDIR}/gcc/config/i386/pconfigintrin.h \
121	${GCCDIR}/gcc/config/i386/wbnoinvdintrin.h \
122	${GCCDIR}/gcc/config/i386/movdirintrin.h \
123	${GCCDIR}/gcc/ginclude/stdatomic.h \
124	${GCCDIR}/gcc/ginclude/stdfix.h
125
126#generated sources
127SRCS+=	mm_malloc.h unwind.h
128
129INCS=		${EXTRA_HEADERS} mm_malloc.h unwind.h
130INCSDIR=	/usr/libdata/gcc${GCCSHORTVER}
131
132mm_malloc.h: ${GCCDIR}/gcc/config/i386/gmm_malloc.h
133	cp ${.ALLSRC} ${.TARGET}
134
135gthr-default.h: gthr-posix.h
136	cp ${.ALLSRC} ${.TARGET}
137
138sfp-machine.h: ${GCCDIR}/libgcc/config/i386/sfp-machine.h
139	cp ${.ALLSRC} ${.TARGET}
140
141enable-execute-stack.c: enable-execute-stack-mprotect.c
142	cp ${.ALLSRC} ${.TARGET}
143
144unwind.h: unwind-generic.h
145	cp ${.ALLSRC} ${.TARGET}
146
147CLEANFILES+=	mm_malloc.h unwind.h gthr-default.h enable-execute-stack.c
148
149.include <bsd.lib.mk>
150