From e384ebde24b96486a1336b9c688c60790c354f3d Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 30 May 2009 18:16:26 +0000 Subject: 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. --- 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 ++++++- 7 files changed, 38 insertions(+), 11 deletions(-) (limited to 'mk/compiler') diff --git a/mk/compiler/ccc.mk b/mk/compiler/ccc.mk index 2ec4afae4e9..f4005012cc2 100644 --- a/mk/compiler/ccc.mk +++ b/mk/compiler/ccc.mk @@ -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 @@ PREPEND_PATH+= ${_CCC_DIR}/bin 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 --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 6052b0f35a3..f7af66b3f63 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -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 @@ _SYS_VARS.gcc= CC_VERSION CC_VERSION_STRING LANGUAGES.gcc _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 @@ PREPEND_PATH+= ${_GCC_DIR}/bin . 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 --git a/mk/compiler/hp.mk b/mk/compiler/hp.mk index 452d4400abb..8d9762982bb 100644 --- a/mk/compiler/hp.mk +++ b/mk/compiler/hp.mk @@ -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 @@ PREPEND_PATH+= ${_HP_DIR}/bin 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 --git a/mk/compiler/icc.mk b/mk/compiler/icc.mk index c624b6bdc7d..befa686fe8a 100644 --- a/mk/compiler/icc.mk +++ b/mk/compiler/icc.mk @@ -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 @@ CONFIGURE_ENV+= ac_cv___attribute__=yes 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 --git a/mk/compiler/ido.mk b/mk/compiler/ido.mk index 9f8b83e657f..ecf3f1613a5 100644 --- a/mk/compiler/ido.mk +++ b/mk/compiler/ido.mk @@ -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 @@ PREPEND_PATH+= ${_IDO_DIR}/bin 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 --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk index 4c52767b1ae..3121a0374f3 100644 --- a/mk/compiler/mipspro.mk +++ b/mk/compiler/mipspro.mk @@ -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 @@ PREPEND_PATH+= ${_MIPSPRO_DIR}/bin 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 --git a/mk/compiler/xlc.mk b/mk/compiler/xlc.mk index 09e0fda6bac..50a6e1305a5 100644 --- a/mk/compiler/xlc.mk +++ b/mk/compiler/xlc.mk @@ -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 @@ ${_XLC_CPP}: 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 \ -- cgit v1.2.3