1 .include "../Makefile.inc"
2 .include "Makefile.src"
3 .PATH: ${GCCDIR}/libgcc
4 .PATH: ${GCCDIR}/libgcc/soft-fp
5 .PATH: ${GCCDIR}/libgcc/config/i386
11 CFLAGS+= -I${GCCDIR}/libgcc
12 CFLAGS+= -I${GCCDIR}/libgcc/config/i386
14 CFLAGS+= -fbuilding-libgcc
15 CFLAGS+= -fno-stack-protector
16 CFLAGS+= -fvisibility=hidden
19 CFLAGS+= -DHAVE_CC_TLS
20 CFLAGS+= -DHIDE_EXPORTS
22 # FUNCS and SOFTFUNCS defined in Makefile.src
23 SRCS+= ${FUNCS:S/$/.c/} ${SOFTFUNCS:S/$/.c/}
24 CLEANFILES+= ${FUNCS:S/$/.c/}
27 SRCS+= gthr-default.h sfp-machine.h
29 beforedepend: cc_prep cc_tools csu
30 .ORDER: cc_prep cc_tools csu ${SRCS}
32 # This is kinda messy, but it's easier then rearranging the top level
33 # build. gcc's libgcc generates source files which depend on generated
34 # header files, which means we have to generate our tools set before
35 # we can build libgcc. The toolset is normally built afterwards.
37 # XXX for the world stage we could theoretically use the cc_tools generated
38 # in the btools stage, but it's easier to regenerate them.
41 cd ${CCDIR}/cc_prep; ${MAKE} depend
44 cd ${CCDIR}/cc_tools; ${MAKE} depend
47 cd ${.CURDIR}/../csu; ${MAKE} depend
49 .if ${GCC_CPU} == "i386"
51 ${GCCDIR}/gcc/config/i386/ammintrin.h \
52 ${GCCDIR}/gcc/config/i386/avx2intrin.h \
53 ${GCCDIR}/gcc/config/i386/avxintrin.h \
54 ${GCCDIR}/gcc/config/i386/bmi2intrin.h \
55 ${GCCDIR}/gcc/config/i386/bmiintrin.h \
56 ${GCCDIR}/gcc/config/i386/bmmintrin.h \
57 ${GCCDIR}/gcc/config/i386/emmintrin.h \
58 ${GCCDIR}/gcc/config/i386/f16cintrin.h \
59 ${GCCDIR}/gcc/config/i386/fma4intrin.h \
60 ${GCCDIR}/gcc/config/i386/fmaintrin.h \
61 ${GCCDIR}/gcc/config/i386/ia32intrin.h \
62 ${GCCDIR}/gcc/config/i386/immintrin.h \
63 ${GCCDIR}/gcc/config/i386/lwpintrin.h \
64 ${GCCDIR}/gcc/config/i386/lzcntintrin.h \
65 ${GCCDIR}/gcc/config/i386/mmintrin.h \
66 ${GCCDIR}/gcc/config/i386/nmmintrin.h \
67 ${GCCDIR}/gcc/config/i386/pmmintrin.h \
68 ${GCCDIR}/gcc/config/i386/popcntintrin.h \
69 ${GCCDIR}/gcc/config/i386/smmintrin.h \
70 ${GCCDIR}/gcc/config/i386/tbmintrin.h \
71 ${GCCDIR}/gcc/config/i386/tmmintrin.h \
72 ${GCCDIR}/gcc/config/i386/wmmintrin.h \
73 ${GCCDIR}/gcc/config/i386/x86intrin.h \
74 ${GCCDIR}/gcc/config/i386/xmmintrin.h \
75 ${GCCDIR}/gcc/config/i386/xopintrin.h \
76 ${GCCDIR}/gcc/config/i386/cpuid.h \
77 ${GCCDIR}/gcc/config/i386/mm3dnow.h \
78 ${GCCDIR}/gcc/config/i386/cross-stdarg.h \
79 ${GCCDIR}/gcc/ginclude/tgmath.h
82 SRCS+= mm_malloc.h unwind.h
84 INCS= ${EXTRA_HEADERS} mm_malloc.h unwind.h
85 INCSDIR= /usr/libdata/gcc${GCCSHORTVER}
88 mm_malloc.h: ${GCCDIR}/gcc/config/i386/gmm_malloc.h
89 cp ${.ALLSRC} ${.TARGET}
91 gthr-default.h: gthr-posix.h
92 cp ${.ALLSRC} ${.TARGET}
94 sfp-machine.h: ${GCCDIR}/libgcc/config/i386/sfp-machine.h
95 cp ${.ALLSRC} ${.TARGET}
97 enable-execute-stack.c: enable-execute-stack-freebsd.c
98 cp ${.ALLSRC} ${.TARGET}
100 unwind.h: unwind-generic.h
101 cp ${.ALLSRC} ${.TARGET}
103 CLEANFILES+= mm_malloc.h unwind.h gthr-default.h enable-execute-stack.c
105 .include <bsd.lib.mk>