1 .if !target(__<cc.Makefile.inc>__)
5 GCCDATESTAMP= 2014-06-12
6 GCCPOINTVER= ${GCCCOMPLETEVER:R}
7 GCCSHORTVER= ${GCCPOINTVER:S/.//}
9 CFLAGS+= -DGCCPOINTVER=\"${GCCPOINTVER}\"
10 CFLAGS+= -DGCCSHORTVER=\"${GCCSHORTVER}\"
11 CFLAGS+= -DBASEVER=\"${GCCCOMPLETEVER}\"
13 CFLAGS+= -DDEFAULT_TARGET_VERSION=\"${version}\"
14 CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"${target_machine}\"
16 BINDIR?= /usr/libexec/gcc${GCCSHORTVER}
18 GCCDIR= ${.CURDIR}/${TOP_PREFIX}../../../../contrib/gcc-${GCCPOINTVER}
19 OTOPDIR= ${.OBJDIR}/${TOP_PREFIX}..
20 STOPDIR= ${.CURDIR}/${TOP_PREFIX}..
22 TOOLDIR= ${OTOPDIR}/cc_tools/tools
24 # for now do not let the use of -flto
30 .if defined(LOCAL_CONFIG)
34 CFLAGS+= -I${OTOPDIR}/cc_prep
35 CFLAGS+= -I${STOPDIR}/cc_prep
36 CFLAGS+= -I${STOPDIR}/cc_prep/config
37 CFLAGS+= -I${GCCDIR}/gcc
38 CFLAGS+= -I${GCCDIR}/gcc/config
39 CFLAGS+= -I${GCCDIR}/include
40 CFLAGS+= -I${GCCDIR}/libcpp/include
41 CFLAGS+= -I${GCCDIR}/libdecnumber
42 CFLAGS+= -I${GCCDIR}/libdecnumber/dpd
43 CFLAGS+= -I${OTOPDIR}/libdecnumber
44 CFLAGS+= -I${STOPDIR}/../gmp
45 CFLAGS+= -I${STOPDIR}/../../../contrib/mpfr/src
46 CFLAGS+= -I${STOPDIR}/../mpfr
47 CFLAGS+= -I${STOPDIR}/../../../contrib/mpc/src
48 CFLAGS+= -I${GCCDIR}/gcc/config/${GCC_CPU}
51 CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H
52 CFLAGS+= -DPREFIX1=\"${TOOLS_PREFIX}/usr\"
53 CFLAGS+= -DPREFIX2=\"${USRDATA_PREFIX}/usr\"
55 .include "Makefile.tgt"
57 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
58 CFLAGS+= -DCROSS_COMPILE
61 # when building with gcc50 creates just too much noise
62 .if ${CCVER:Mgcc*} && !${CCVER:Mgcc4[789]}
63 CWARNFLAGS+= -Wno-switch-bool
66 # only gcc 4.8 and later has support for -Og
67 .if defined(WORLD_CCOPTLEVEL) && ${WORLD_CCOPTLEVEL:Mg} && ${CCVER:Mgcc47}
69 .MAKEFLAGS: WORLD_CCOPTLEVEL=1
72 .if defined(GCC_LANG_DIR)
73 .PATH: ${GCCDIR}/${GCC_LANG_DIR}
76 .if !defined(GCC_NO_PATH)
77 .PATH: ${OTOPDIR}/cc_prep
78 .PATH: ${STOPDIR}/cc_prep
80 .PATH: ${GCCDIR}/gcc/c-family
81 .PATH: ${GCCDIR}/gcc/config
82 .PATH: ${GCCDIR}/gcc/config/${GCC_CPU}
86 LIBIBERTY= ${OTOPDIR}/libiberty/libiberty.a
87 LIBBACKEND= ${OTOPDIR}/libbackend/libbackend.a
88 LIBCPP= ${OTOPDIR}/libcpp/libcpp.a
89 LIBDECNUMBER= ${OTOPDIR}/libdecnumber/libdecnumber.a
90 LIBCOMMON= ${OTOPDIR}/libcommon/libcommon.a
91 LIBCOMMONTARG= ${OTOPDIR}/libcommon-target/libcommon-target.a
93 LIBGMP= ${OTOPDIR}/../gmp/libgmp.a
94 LIBMPFR= ${OTOPDIR}/../mpfr/libmpfr.a
95 LIBMPC= ${OTOPDIR}/../mpc/libmpc.a
96 LIBZ= ${OTOPDIR}/../../../lib/libz/libz.a
98 GMPLIBS= ${LIBMPC} ${LIBMPFR} ${LIBGMP}
99 STDLIBS= ${LIBCOMMONTARG} ${LIBCOMMON} ${LIBCPP} ${LIBIBERTY} ${LIBDECNUMBER}
100 BACKENDLIBS= ${GMPLIBS} ${LIBZ}
102 .if !defined(GCC_NO_LIBS)