Clean up some gcc50 remains.
[dragonfly.git] / gnu / usr.bin / cc47 / Makefile.inc
1 .if !target(__<cc.Makefile.inc>__)
2 __<cc.Makefile.inc>__:
3
4 GCCCOMPLETEVER= 4.7.4
5 GCCDATESTAMP=   2014-06-12
6 GCCPOINTVER=    ${GCCCOMPLETEVER:R}
7 GCCSHORTVER=    ${GCCPOINTVER:S/.//}
8
9 CFLAGS+=        -DGCCPOINTVER=\"${GCCPOINTVER}\"
10 CFLAGS+=        -DGCCSHORTVER=\"${GCCSHORTVER}\"
11 CFLAGS+=        -DBASEVER=\"${GCCCOMPLETEVER}\"
12
13 CFLAGS+=        -DDEFAULT_TARGET_VERSION=\"${version}\"
14 CFLAGS+=        -DDEFAULT_TARGET_MACHINE=\"${target_machine}\"
15
16 BINDIR?=        /usr/libexec/gcc${GCCSHORTVER}
17
18 GCCDIR=         ${.CURDIR}/${TOP_PREFIX}../../../../contrib/gcc-${GCCPOINTVER}
19 OTOPDIR=        ${.OBJDIR}/${TOP_PREFIX}..
20 STOPDIR=        ${.CURDIR}/${TOP_PREFIX}..
21
22 TOOLDIR=        ${OTOPDIR}/cc_tools/tools
23
24 # for now do not let the use of -flto
25 .if ${CFLAGS:M-flto}
26 CFLAGS+=        -fno-lto
27 LDFLAGS+=       -flto
28 .endif
29
30 .if defined(LOCAL_CONFIG)
31 CFLAGS+=        -I${.CURDIR}
32 CFLAGS+=        -I${.OBJDIR}
33 .endif
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}
49 CFLAGS+=        -I${TOOLDIR}
50
51 CFLAGS+=        -DIN_GCC -DHAVE_CONFIG_H
52 CFLAGS+=        -DPREFIX1=\"${TOOLS_PREFIX}/usr\"
53 CFLAGS+=        -DPREFIX2=\"${USRDATA_PREFIX}/usr\"
54
55 .include "Makefile.tgt"
56
57 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
58 CFLAGS+= -DCROSS_COMPILE
59 .endif
60
61 # when building with newer GCCs it creates just too much noise
62 .if ${CCVER:Mgcc*} && !${CCVER:Mgcc4[789]}
63 CWARNFLAGS+=    -Wno-switch-bool
64 .endif
65
66 # only gcc 4.8 and later has support for -Og
67 .if defined(WORLD_CCOPTLEVEL) && ${WORLD_CCOPTLEVEL:Mg} && ${CCVER:Mgcc47}
68 WORLD_CCOPTLEVEL:=      1
69 .MAKEFLAGS: WORLD_CCOPTLEVEL=1
70 .endif
71
72 .if defined(GCC_LANG_DIR)
73 .PATH: ${GCCDIR}/${GCC_LANG_DIR}
74 .endif
75
76 .if !defined(GCC_NO_PATH)
77 .PATH: ${OTOPDIR}/cc_prep
78 .PATH: ${STOPDIR}/cc_prep
79 .PATH: ${GCCDIR}/gcc
80 .PATH: ${GCCDIR}/gcc/c-family
81 .PATH: ${GCCDIR}/gcc/config 
82 .PATH: ${GCCDIR}/gcc/config/${GCC_CPU}
83 .PATH: ${TOOLDIR}
84 .endif
85
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
92
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
97
98 GMPLIBS=        ${LIBMPC} ${LIBMPFR} ${LIBGMP}
99 STDLIBS=        ${LIBCOMMONTARG} ${LIBCOMMON} ${LIBCPP} ${LIBIBERTY} ${LIBDECNUMBER} 
100 BACKENDLIBS=    ${GMPLIBS} ${LIBZ}
101
102 .if !defined(GCC_NO_LIBS)
103 LDADD+= ${STDLIBS}
104 DPADD+= ${STDLIBS}
105 .endif
106
107 .endif