diff options
-rw-r--r-- | mk/compiler/sunpro.mk | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk index 75542f50a3f..d6198243856 100644 --- a/mk/compiler/sunpro.mk +++ b/mk/compiler/sunpro.mk @@ -1,4 +1,4 @@ -# $NetBSD: sunpro.mk,v 1.43 2007/11/30 16:55:28 rhaen Exp $ +# $NetBSD: sunpro.mk,v 1.44 2008/06/17 11:23:48 sketch Exp $ # # This is the compiler definition for the SUNWspro C compiler. # @@ -72,13 +72,6 @@ _LINKER_RPATH_FLAG= -R # This is transformed by the compiler wrapper to "-R". _COMPILER_RPATH_FLAG= -Wl,-R -# SunPro compiler must be passed certain flags to compile/link 64-bit code. -.if ${MACHINE_ARCH} == "sparc" -_COMPILER_ABI_FLAG.64= -xtarget=ultra -xarch=v9 -.else -_COMPILER_ABI_FLAG.64= -xarch=amd64 -.endif - # XXX: What about the versions of the other compilers? Fortran and C++? # XXX: should be moved to compiler.mk. .if exists(${CCPATH}) @@ -89,6 +82,15 @@ CC_VERSION_STRING?= ${CC_VERSION} CC_VERSION?= cc: Sun C .endif +# SunPro compiler must be passed certain flags to compile/link 64-bit code. +.if !empty(CC_VERSION:M5.9) +_COMPILER_ABI_FLAG.64= -m64 +.elif ${MACHINE_ARCH} == "sparc" +_COMPILER_ABI_FLAG.64= -xtarget=ultra -xarch=v9 +.else +_COMPILER_ABI_FLAG.64= -xarch=amd64 +.endif + # _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the # ones requested by the package in USE_LANGUAGES. # |