pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Rename GCC_USE_SYMLINKS to COMPILER_USE_SYMLINKS, i...
details: https://anonhg.NetBSD.org/pkgsrc/rev/86caac1bfe26
branches: trunk
changeset: 559802:86caac1bfe26
user: joerg <joerg%pkgsrc.org@localhost>
date: Sat May 30 18:16:26 2009 +0000
description:
Rename GCC_USE_SYMLINKS to COMPILER_USE_SYMLINKS, implement it for the
other compiler drivers and enable it by default. Saves at least a
percent of build time even for trivial packages like lang/lua.
diffstat:
mk/compiler.mk | 12 ++++++++++--
mk/compiler/ccc.mk | 7 ++++++-
mk/compiler/gcc.mk | 7 ++-----
mk/compiler/hp.mk | 7 ++++++-
mk/compiler/icc.mk | 7 ++++++-
mk/compiler/ido.mk | 7 ++++++-
mk/compiler/mipspro.mk | 7 ++++++-
mk/compiler/xlc.mk | 7 ++++++-
8 files changed, 48 insertions(+), 13 deletions(-)
diffs (229 lines):
diff -r b8a23d515864 -r 86caac1bfe26 mk/compiler.mk
--- a/mk/compiler.mk Sat May 30 17:48:20 2009 +0000
+++ b/mk/compiler.mk Sat May 30 18:16:26 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.68 2008/10/20 20:44:49 wiz Exp $
+# $NetBSD: compiler.mk,v 1.69 2009/05/30 18:16:26 joerg Exp $
#
# This Makefile fragment implements handling for supported C/C++/Fortran
# compilers.
@@ -36,6 +36,12 @@
# Force using the appropriate version of GCC from pkgsrc based on
# GCC_REQD instead of the native compiler.
#
+# This should be disabled only for debugging.
+#
+# COMPILER_USE_SYMLINKS
+# If set to yes, use symlinks for the compiler drivers, otherwise
+# shell scripts are created. The default is yes.
+#
# The following variables may be set by a package:
#
# GCC_REQD
@@ -72,7 +78,7 @@
BSD_COMPILER_MK= defined
_VARGROUPS+= compiler
-_USER_VARS.compiler= PKGSRC_COMPILER USE_PKGSRC_GCC ABI
+_USER_VARS.compiler= PKGSRC_COMPILER USE_PKGSRC_GCC ABI COMPILER_USE_SYMLINKS
_PKG_VARS.compiler= USE_LANGUAGES GCC_REQD NOT_FOR_COMPILER ONLY_FOR_COMPILER
_SYS_VARS.compiler= CC_VERSION
@@ -86,6 +92,8 @@
USE_LANGUAGES+= c
.endif
+COMPILER_USE_SYMLINKS?= yes
+
# For environments where there is an external gcc too, but pkgsrc
# should use the pkgsrc one for consistency.
#
diff -r b8a23d515864 -r 86caac1bfe26 mk/compiler/ccc.mk
--- a/mk/compiler/ccc.mk Sat May 30 17:48:20 2009 +0000
+++ b/mk/compiler/ccc.mk Sat May 30 18:16:26 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ccc.mk,v 1.17 2008/02/07 20:59:05 rillig Exp $
+# $NetBSD: ccc.mk,v 1.18 2009/05/30 18:16:26 joerg Exp $
#
# This is the compiler definition for the Compaq C Compilers.
#
@@ -70,11 +70,16 @@
override-tools: ${_CCC_${_var_}}
${_CCC_${_var_}}:
${RUN}${MKDIR} ${.TARGET:H}
+. if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss])
+ ${RUN}${RM} -f ${.TARGET}
+ ${RUN}${LN} -s /usr/bin/${.TARGET:T} ${.TARGET}
+. else
${RUN} \
(${ECHO} '#!${TOOLS_SHELL}'; \
${ECHO} 'exec /usr/bin/${.TARGET:T} "$$@"'; \
) > ${.TARGET}
${RUN}${CHMOD} +x ${.TARGET}
+. endif
. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//}
${RUN} \
if [ ! -x "${_alias_}" ]; then \
diff -r b8a23d515864 -r 86caac1bfe26 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk Sat May 30 17:48:20 2009 +0000
+++ b/mk/compiler/gcc.mk Sat May 30 18:16:26 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.96 2009/03/17 21:28:10 rillig Exp $
+# $NetBSD: gcc.mk,v 1.97 2009/05/30 18:16:26 joerg Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -39,7 +39,6 @@
_DEF_VARS.gcc= \
CCPATH CPPPATH CXXPATH \
F77PATH FCPATH \
- GCC_USE_SYMLINKS \
IMAKEOPTS \
LDFLAGS \
PKG_CC PKG_CPP PKG_CXX PKG_FC \
@@ -481,14 +480,12 @@
. endfor
.endif
-# Create compiler driver scripts in ${WRKDIR}.
-GCC_USE_SYMLINKS?= no
.for _var_ in ${_GCC_VARS}
. if !target(${_GCC_${_var_}})
override-tools: ${_GCC_${_var_}}
${_GCC_${_var_}}:
${RUN}${MKDIR} ${.TARGET:H}
-. if !empty(GCC_USE_SYMLINKS:Myes)
+. if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss])
${RUN}${RM} -f ${.TARGET}
${RUN}${LN} -s ${_GCCBINDIR}/${.TARGET:T} ${.TARGET}
. else
diff -r b8a23d515864 -r 86caac1bfe26 mk/compiler/hp.mk
--- a/mk/compiler/hp.mk Sat May 30 17:48:20 2009 +0000
+++ b/mk/compiler/hp.mk Sat May 30 18:16:26 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: hp.mk,v 1.5 2008/02/07 20:59:05 rillig Exp $
+# $NetBSD: hp.mk,v 1.6 2009/05/30 18:16:26 joerg Exp $
#
# This is the compiler definition for the HP-UX C/aC++ compilers.
#
@@ -72,11 +72,16 @@
override-tools: ${_HP_${_var_}}
${_HP_${_var_}}:
${RUN}${MKDIR} ${.TARGET:H}
+. if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss])
+ ${RUN}${RM} -f ${.TARGET}
+ ${RUN}${LN} -s ${${_var_}PATH} ${.TARGET}
+. else
${RUN} \
(${ECHO} '#!${TOOLS_SHELL}'; \
${ECHO} 'exec ${${_var_}PATH} "$$@"'; \
) > ${.TARGET}
${RUN}${CHMOD} +x ${.TARGET}
+. endif
. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//}
${RUN} \
if [ ! -x "${_alias_}" ]; then \
diff -r b8a23d515864 -r 86caac1bfe26 mk/compiler/icc.mk
--- a/mk/compiler/icc.mk Sat May 30 17:48:20 2009 +0000
+++ b/mk/compiler/icc.mk Sat May 30 18:16:26 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: icc.mk,v 1.5 2008/02/07 20:59:05 rillig Exp $
+# $NetBSD: icc.mk,v 1.6 2009/05/30 18:16:26 joerg Exp $
#
# This is the compiler definition for the Intel compilers.
#
@@ -81,11 +81,16 @@
override-tools: ${_ICC_${_var_}}
${_ICC_${_var_}}:
${RUN}${MKDIR} ${.TARGET:H}
+. if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss])
+ ${RUN}${RM} -f ${.TARGET}
+ ${RUN}${LN} -s ${ICCBASE}/bin/${.TARGET:T} ${.TARGET}
+. else
${RUN} \
(${ECHO} '#!${TOOLS_SHELL}'; \
${ECHO} 'exec ${ICCBASE}/bin/${.TARGET:T} "$$@"'; \
) > ${.TARGET}
${RUN}${CHMOD} +x ${.TARGET}
+. endif
. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//}
${RUN} \
if [ ! -x "${_alias_}" ]; then \
diff -r b8a23d515864 -r 86caac1bfe26 mk/compiler/ido.mk
--- a/mk/compiler/ido.mk Sat May 30 17:48:20 2009 +0000
+++ b/mk/compiler/ido.mk Sat May 30 18:16:26 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ido.mk,v 1.6 2008/02/07 20:59:05 rillig Exp $
+# $NetBSD: ido.mk,v 1.7 2009/05/30 18:16:26 joerg Exp $
#
# This is the compiler definition for the SGI IRIS Development Option
# cc (IRIX 5).
@@ -67,11 +67,16 @@
override-tools: ${_IDO_${_var_}}
${_IDO_${_var_}}:
${RUN}${MKDIR} ${.TARGET:H}
+. if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss])
+ ${RUN}${RM} -f ${.TARGET}
+ ${RUN}${LN} -s ${${_var_}PATH} ${.TARGET}
+. else
${RUN} \
(${ECHO} '#!${TOOLS_SHELL}'; \
${ECHO} 'exec ${${_var_}PATH} "$$@"'; \
) > ${.TARGET}
${RUN}${CHMOD} +x ${.TARGET}
+. endif
. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//}
${RUN} \
if [ ! -x "${_alias_}" ]; then \
diff -r b8a23d515864 -r 86caac1bfe26 mk/compiler/mipspro.mk
--- a/mk/compiler/mipspro.mk Sat May 30 17:48:20 2009 +0000
+++ b/mk/compiler/mipspro.mk Sat May 30 18:16:26 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mipspro.mk,v 1.39 2008/02/07 20:59:05 rillig Exp $
+# $NetBSD: mipspro.mk,v 1.40 2009/05/30 18:16:26 joerg Exp $
#
# This is the compiler definition for the MIPSpro C compiler.
#
@@ -91,11 +91,16 @@
override-tools: ${_MIPSPRO_${_var_}}
${_MIPSPRO_${_var_}}:
${RUN}${MKDIR} ${.TARGET:H}
+. if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss])
+ ${RUN}${RM} -f ${.TARGET}
+ ${RUN}${LN} -s ${MIPSPROBASE}/bin/${.TARGET:T} ${.TARGET}
+. else
${RUN} \
(${ECHO} '#!${TOOLS_SHELL}'; \
${ECHO} 'exec ${MIPSPROBASE}/bin/${.TARGET:T} "$$@"'; \
) > ${.TARGET}
${RUN}${CHMOD} +x ${.TARGET}
+. endif
. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//}
${RUN} \
if [ ! -x "${_alias_}" ]; then \
diff -r b8a23d515864 -r 86caac1bfe26 mk/compiler/xlc.mk
--- a/mk/compiler/xlc.mk Sat May 30 17:48:20 2009 +0000
+++ b/mk/compiler/xlc.mk Sat May 30 18:16:26 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: xlc.mk,v 1.22 2009/01/09 11:46:34 joerg Exp $
+# $NetBSD: xlc.mk,v 1.23 2009/05/30 18:16:26 joerg Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -145,11 +145,16 @@
override-tools: ${_XLC_${_var_}}
${_XLC_${_var_}}:
${RUN}${MKDIR} ${.TARGET:H}
+. if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss])
+ ${RUN}${RM} -f ${.TARGET}
+ ${RUN}${LN} -s ${XLCBASE}/bin/${.TARGET:T} ${.TARGET}
+. else
${RUN} \
(${ECHO} '#!${TOOLS_SHELL}'; \
${ECHO} 'exec ${XLCBASE}/bin/${.TARGET:T} "$$@"'; \
) > ${.TARGET}
${RUN}${CHMOD} +x ${.TARGET}
+. endif
. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//}
${RUN} \
if [ ! -x "${_alias_}" ]; then \
Home |
Main Index |
Thread Index |
Old Index