pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/compiler Sun Studio 12 has a generic -m64 flag rath...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/184aab476935
branches:  trunk
changeset: 543424:184aab476935
user:      sketch <sketch%pkgsrc.org@localhost>
date:      Tue Jun 17 11:23:48 2008 +0000

description:
Sun Studio 12 has a generic -m64 flag rather than individual -xarch targets.

diffstat:

 mk/compiler/sunpro.mk |  18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r 6af6ae9186ab -r 184aab476935 mk/compiler/sunpro.mk
--- a/mk/compiler/sunpro.mk     Tue Jun 17 09:12:20 2008 +0000
+++ b/mk/compiler/sunpro.mk     Tue Jun 17 11:23:48 2008 +0000
@@ -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 @@
 # 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?=           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.
 #



Home | Main Index | Thread Index | Old Index