Switch the default binutils from 2.17 to 2.21.
[dragonfly.git] / share / mk / bsd.cpu.mk
CommitLineData
984263bc
MD
1# $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.2.2.5 2002/07/19 08:09:32 ru Exp $
2
5228fe46
MD
3# include compiler-specific bsd.cpu.mk. Note that CCVER may or may not
4# be passed as an environment variable. If not set we make it consistent
5# within make but do not otherwise export it.
6#
7# _CCVER is used to detect changes to CCVER made in Makefile's after the
8# fact.
4db2a28c
MD
9#
10# HOST_CCVER is used by the native system compiler and defaults to CCVER.
11# It is not subject to local CCVER overrides in Makefiles and it is inherited
12# by all sub-makes.
c0cbcbce
MD
13#
14# If the host system does not have the desired compiler for HOST_CCVER
15# we back off to something it probably does have.
4db2a28c 16
30c91f0c 17_DEFAULT_CCVER= gcc44
4f5ea479
SS
18
19CCVER ?= ${_DEFAULT_CCVER}
5228fe46 20_CCVER := ${CCVER}
4f5ea479 21.if exists(/usr/libexec/${_CCVER}/cc) || exists(/usr/libexec/custom/cc)
4db2a28c 22HOST_CCVER?= ${_CCVER}
c0cbcbce 23.else
4f5ea479 24HOST_CCVER?= ${_DEFAULT_CCVER}
c97b9141 25.endif
984263bc 26
b1242318 27_DEFAULT_BINUTILSVER= binutils221
123dec51
SS
28HOST_BINUTILSVER?= ${_DEFAULT_BINUTILSVER}
29
eb45cc97
SZ
30.if defined(FORCE_CPUTYPE)
31CPUTYPE= ${FORCE_CPUTYPE}
32.endif
33
4f5ea479 34.if defined(CCVER_BSD_CPU_MK)
85d641d8
JS
35. if ${CCVER_BSD_CPU_MK} != ""
36. include "${CCVER_BSD_CPU_MK}"
984263bc 37. endif
4f5ea479
SS
38.elif ${CCVER} == "gcc41"
39. include <bsd.cpu.gcc41.mk>
40.elif ${CCVER} == "gcc44"
41. include <bsd.cpu.gcc44.mk>
85d641d8 42.else
c97b9141 43. include <bsd.cpu.custom.mk>
5228fe46
MD
44.endif
45
46# /usr/bin/cc depend on the CCVER environment variable, make sure CCVER is
47# exported for /usr/bin/cc and friends. Note that CCVER is unsupported when
48# cross compiling from 4.x or older versions of DFly and should not be set
49# by the user.
50#
5228fe46 51.makeenv CCVER
4db2a28c 52.makeenv HOST_CCVER
984263bc 53
5228fe46
MD
54# We can reassign _CPUCFLAGS and CFLAGS will evaluate properly to the
55# new value, we do not have to add the variable to CFLAGS twice.
56#
57.if !defined(NO_CPU_CFLAGS) && !defined(_CPUCFLAGS_ASSIGNED)
58_CPUCFLAGS_ASSIGNED=TRUE
59CFLAGS += ${_CPUCFLAGS}
984263bc 60.endif
85d641d8 61