pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/compiler Remove explicit overrides for CC and CXX t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2e824fbb827d
branches:  trunk
changeset: 487315:2e824fbb827d
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Jan 12 17:27:50 2005 +0000

description:
Remove explicit overrides for CC and CXX that prevented using the
definitions supplied in /etc/mk.conf.  It should now be possible to
pass optimization flags directly using CC and CXX when using CCC and
xlC compilers.

diffstat:

 mk/compiler/ccc.mk     |   8 +-------
 mk/compiler/mipspro.mk |  25 +++++++++++++++----------
 mk/compiler/sunpro.mk  |  43 ++++++++++++++++++++++++-------------------
 mk/compiler/xlc.mk     |   8 +-------
 4 files changed, 41 insertions(+), 43 deletions(-)

diffs (186 lines):

diff -r 93cbd339e7e6 -r 2e824fbb827d mk/compiler/ccc.mk
--- a/mk/compiler/ccc.mk        Wed Jan 12 17:23:46 2005 +0000
+++ b/mk/compiler/ccc.mk        Wed Jan 12 17:27:50 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ccc.mk,v 1.7 2005/01/12 15:32:01 jlam Exp $
+# $NetBSD: ccc.mk,v 1.8 2005/01/12 17:27:50 jlam Exp $
 
 .if !defined(COMPILER_CCC_MK)
 COMPILER_CCC_MK=       defined
@@ -27,9 +27,6 @@
 _ALIASES.CC=   cc
 CCPATH=                /usr/bin/cc
 PKG_CC:=       ${_CCC_CC}
-.  if !empty(CC:M*gcc)
-CC:=           ${PKG_CC:T}     # ${CC} should be named "cc".
-.  endif
 .endif
 .if exists(/usr/bin/cxx)
 _CCC_VARS+=    CXX
@@ -37,9 +34,6 @@
 _ALIASES.CXX=  c++ cxx
 CXXPATH=       /usr/bin/cxx
 PKG_CXX:=      ${_CCC_CXX}
-.  if !empty(CXX:M*g++)
-CXX:=          ${PKG_CXX:T}     # ${CXX} should be named "cxx"
-.  endif
 .endif
 _COMPILER_STRIP_VARS+= ${_CCC_VARS}
 
diff -r 93cbd339e7e6 -r 2e824fbb827d mk/compiler/mipspro.mk
--- a/mk/compiler/mipspro.mk    Wed Jan 12 17:23:46 2005 +0000
+++ b/mk/compiler/mipspro.mk    Wed Jan 12 17:27:50 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mipspro.mk,v 1.31 2005/01/12 16:41:14 jlam Exp $
+# $NetBSD: mipspro.mk,v 1.32 2005/01/12 17:27:50 jlam Exp $
 
 .if !defined(COMPILER_MIPSPRO_MK)
 COMPILER_MIPSPRO_MK=   defined
@@ -7,19 +7,15 @@
 
 MIPSPROBASE?=  /usr
 
-# LANGUAGES.<compiler> is the list of supported languages by the compiler.
-# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the ones
-# requested by the package in USE_LANGUAGES.
-# 
-LANGUAGES.mipspro=     c c++
-_LANGUAGES.mipspro=    # empty
-.for _lang_ in ${USE_LANGUAGES}
-_LANGUAGES.mipspro+=   ${LANGUAGES.mipspro:M${_lang_}}
-.endfor
+# LANGUAGES.<compiler> is the list of supported languages by the
+# compiler.
+#
+LANGUAGES.mipspro=     # empty
 
 _MIPSPRO_DIR=          ${WRKDIR}/.mipspro
 _MIPSPRO_VARS=         # empty
 .if exists(${MIPSPROBASE}/bin/cc)
+LANGUAGES.mipspro+=    c
 _MIPSPRO_VARS+=                CC
 _MIPSPRO_CC=           ${_MIPSPRO_DIR}/bin/cc
 _ALIASES.CC=           cc
@@ -27,6 +23,7 @@
 PKG_CC:=               ${_MIPSPRO_CC}
 .endif
 .if exists(${MIPSPROBASE}/bin/CC)
+LANGUAGES.mipspro+=    c++
 _MIPSPRO_VARS+=                CXX
 _MIPSPRO_CXX=          ${_MIPSPRO_DIR}/bin/CC
 _ALIASES.CXX=          CC c++
@@ -58,6 +55,14 @@
 _COMPILER_ABI_FLAG.n32=        -n32
 _COMPILER_ABI_FLAG.64= -64
 
+# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the ones
+# requested by the package in USE_LANGUAGES.
+# 
+_LANGUAGES.mipspro=    # empty
+.for _lang_ in ${USE_LANGUAGES}
+_LANGUAGES.mipspro+=   ${LANGUAGES.mipspro:M${_lang_}}
+.endfor
+
 # Prepend the path to the compiler to the PATH.
 .if !empty(_LANGUAGES.mipspro)
 PREPEND_PATH+= ${_MIPSPRO_DIR}/bin
diff -r 93cbd339e7e6 -r 2e824fbb827d mk/compiler/sunpro.mk
--- a/mk/compiler/sunpro.mk     Wed Jan 12 17:23:46 2005 +0000
+++ b/mk/compiler/sunpro.mk     Wed Jan 12 17:27:50 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: sunpro.mk,v 1.27 2005/01/12 16:41:14 jlam Exp $
+# $NetBSD: sunpro.mk,v 1.28 2005/01/12 17:27:50 jlam Exp $
 
 .if !defined(COMPILER_SUNPRO_MK)
 COMPILER_SUNPRO_MK=    defined
@@ -7,31 +7,28 @@
 
 SUNWSPROBASE?= /opt/SUNWspro
 
-# LANGUAGES.<compiler> is the list of supported languages by the compiler.
-# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the ones
-# requested by the package in USE_LANGUAGES.
+# LANGUAGES.<compiler> is the list of supported languages by the
+# compiler.
 #
-LANGUAGES.sunpro=      c c++
-_LANGUAGES.sunpro=     # empty
-.for _lang_ in ${USE_LANGUAGES}
-_LANGUAGES.sunpro+=    ${LANGUAGES.sunpro:M${_lang_}}
-.endfor
+LANGUAGES.sunpro=      # empty
 
 _SUNPRO_DIR=   ${WRKDIR}/.sunpro
 _SUNPRO_VARS=  # empty
 .if exists(${SUNWSPROBASE}/bin/cc)
-_SUNPRO_VARS+= CC
-_SUNPRO_CC=    ${_SUNPRO_DIR}/bin/cc
-_ALIASES.CC=   cc
-CCPATH=                ${SUNWSPROBASE}/bin/cc
-PKG_CC:=       ${_SUNPRO_CC}
+LANGUAGES.sunpro+=     c
+_SUNPRO_VARS+=         CC
+_SUNPRO_CC=            ${_SUNPRO_DIR}/bin/cc
+_ALIASES.CC=           cc
+CCPATH=                        ${SUNWSPROBASE}/bin/cc
+PKG_CC:=               ${_SUNPRO_CC}
 .endif
 .if exists(${SUNWSPROBASE}/bin/CC)
-_SUNPRO_VARS+= CXX
-_SUNPRO_CXX=   ${_SUNPRO_DIR}/bin/CC
-_ALIASES.CXX=  CC c++
-CXXPATH=       ${SUNWSPROBASE}/bin/CC
-PKG_CXX:=      ${_SUNPRO_CXX}
+LANGUAGES.sunpro+=     c++
+_SUNPRO_VARS+=         CXX
+_SUNPRO_CXX=           ${_SUNPRO_DIR}/bin/CC
+_ALIASES.CXX=          CC c++
+CXXPATH=               ${SUNWSPROBASE}/bin/CC
+PKG_CXX:=              ${_SUNPRO_CXX}
 .endif
 _COMPILER_STRIP_VARS+= ${_SUNPRO_VARS}
 
@@ -52,6 +49,14 @@
 CC_VERSION?=           cc: Sun C
 .endif
 
+# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the
+# ones requested by the package in USE_LANGUAGES.
+#
+_LANGUAGES.sunpro=     # empty
+.for _lang_ in ${USE_LANGUAGES}
+_LANGUAGES.sunpro+=    ${LANGUAGES.sunpro:M${_lang_}}
+.endfor
+
 # Prepend the path to the compiler to the PATH.
 .if !empty(_LANGUAGES.sunpro)
 PREPEND_PATH+= ${_SUNPRO_DIR}/bin
diff -r 93cbd339e7e6 -r 2e824fbb827d mk/compiler/xlc.mk
--- a/mk/compiler/xlc.mk        Wed Jan 12 17:23:46 2005 +0000
+++ b/mk/compiler/xlc.mk        Wed Jan 12 17:27:50 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: xlc.mk,v 1.8 2005/01/12 15:32:01 jlam Exp $
+# $NetBSD: xlc.mk,v 1.9 2005/01/12 17:27:50 jlam Exp $
 
 .if !defined(COMPILER_XLC_MK)
 COMPILER_XLC_MK=       defined
@@ -25,9 +25,6 @@
 _ALIASES.CC=   cc xlc
 CCPATH=                ${XLCBASE}/bin/xlc
 PKG_CC:=       ${_XLC_CC}
-.  if !empty(CC:M*gcc)
-CC:=           ${PKG_CC:T}     # ${CC} should be named "xlc".
-.  endif
 .endif
 .if exists(${XLCBASE}/bin/xlc++)
 _XLC_VARS+=    CXX
@@ -35,9 +32,6 @@
 _ALIASES.CXX=  c++ xlc++
 CXXPATH=       ${XLCBASE}/bin/xlc++
 PKG_CXX:=      ${_XLC_CXX}
-.  if !empty(CXX:M*g++)
-CXX:=          ${PKG_CXX:T}    # ${CXX} should be named "xlc++".
-.  endif
 .endif
 _COMPILER_STRIP_VARS+= ${_XLC_VARS}
 



Home | Main Index | Thread Index | Old Index