summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorsketch <sketch@pkgsrc.org>2008-06-17 11:23:48 +0000
committersketch <sketch@pkgsrc.org>2008-06-17 11:23:48 +0000
commita0c131c7aabde014a23f456df6d54b23e939df8a (patch)
treef594e1328ba4353eef10a5b62005f6eb32c4c5e1 /mk
parentd2922a4a27a7df79a732b078e3512167839f675b (diff)
downloadpkgsrc-a0c131c7aabde014a23f456df6d54b23e939df8a.tar.gz
Sun Studio 12 has a generic -m64 flag rather than individual -xarch targets.
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler/sunpro.mk18
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.
#