1# $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.2.2.5 2002/07/19 08:09:32 ru Exp $ 2# $DragonFly: src/share/mk/bsd.cpu.mk,v 1.14 2007/01/15 18:29:44 corecode Exp $ 3 4# include compiler-specific bsd.cpu.mk. Note that CCVER may or may not 5# be passed as an environment variable. If not set we make it consistent 6# within make but do not otherwise export it. 7# 8# _CCVER is used to detect changes to CCVER made in Makefile's after the 9# fact. 10# 11# HOST_CCVER is used by the native system compiler and defaults to CCVER. 12# It is not subject to local CCVER overrides in Makefiles and it is inherited 13# by all sub-makes. 14 15CCVER ?= gcc34 16_CCVER := ${CCVER} 17HOST_CCVER?= ${_CCVER} 18 19.if ${CCVER} == "gcc34" 20. include <bsd.cpu.gcc34.mk> 21.elif ${CCVER} == "gcc41" 22. include <bsd.cpu.gcc41.mk> 23.elif defined(CCVER_BSD_CPU_MK) 24. if ${CCVER_BSD_CPU_MK} != "" 25. include "${CCVER_BSD_CPU_MK}" 26. endif 27.else 28.error "Either set CCVER to a known compiler or specify CCVER_BSD_CPU_MK" 29.endif 30 31# /usr/bin/cc depend on the CCVER environment variable, make sure CCVER is 32# exported for /usr/bin/cc and friends. Note that CCVER is unsupported when 33# cross compiling from 4.x or older versions of DFly and should not be set 34# by the user. 35# 36.if defined(.DIRECTIVE_MAKEENV) 37.makeenv CCVER 38.makeenv HOST_CCVER 39.endif 40 41# We can reassign _CPUCFLAGS and CFLAGS will evaluate properly to the 42# new value, we do not have to add the variable to CFLAGS twice. 43# 44.if !defined(NO_CPU_CFLAGS) && !defined(_CPUCFLAGS_ASSIGNED) 45_CPUCFLAGS_ASSIGNED=TRUE 46CFLAGS += ${_CPUCFLAGS} 47.endif 48 49