summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjoerg <joerg>2009-05-30 18:16:26 +0000
committerjoerg <joerg>2009-05-30 18:16:26 +0000
commite384ebde24b96486a1336b9c688c60790c354f3d (patch)
treee575bcec3a723c7ca42a939c69573accc8770971 /mk
parent3de469a87299607bdb2607f5cd7f39eb50a66248 (diff)
downloadpkgsrc-e384ebde24b96486a1336b9c688c60790c354f3d.tar.gz
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 (limited to 'mk')
-rw-r--r--mk/compiler.mk12
-rw-r--r--mk/compiler/ccc.mk7
-rw-r--r--mk/compiler/gcc.mk7
-rw-r--r--mk/compiler/hp.mk7
-rw-r--r--mk/compiler/icc.mk7
-rw-r--r--mk/compiler/ido.mk7
-rw-r--r--mk/compiler/mipspro.mk7
-rw-r--r--mk/compiler/xlc.mk7
8 files changed, 48 insertions, 13 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk
index 31b36be916d..f3e62573d27 100644
--- a/mk/compiler.mk
+++ b/mk/compiler.mk
@@ -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
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 --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 \