diff options
author | tv <tv> | 2005-01-21 21:59:14 +0000 |
---|---|---|
committer | tv <tv> | 2005-01-21 21:59:14 +0000 |
commit | 81e34807e0edaa5aa384bedf6d7588065a6dbd76 (patch) | |
tree | 710a56582867a8aee177ddd2abbb0a28085c8320 /mk/compiler | |
parent | add3c3569b996018e0b25e5cbaba4f3b98f1a33e (diff) | |
download | pkgsrc-81e34807e0edaa5aa384bedf6d7588065a6dbd76.tar.gz |
Re-add direct symlink logic, optional under GCC_USE_SYMLINKS=yes. Saves
one fork/exec step on platforms where gcc is compiled with hardcoded gcc-lib
pathnames. This applies to most platforms, but the default currently
remains not to use symlinks so as to avoid unexpected gotchas for users.
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/gcc.mk | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 8939db1e9f5..60b47b13a0e 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.78 2005/01/12 15:32:01 jlam Exp $ +# $NetBSD: gcc.mk,v 1.79 2005/01/21 21:59:14 tv Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -417,20 +417,26 @@ BUILD_DEPENDS+= ${_GCC_DEPENDENCY} .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_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} +. if !empty(GCC_USE_SYMLINKS:Myes) + ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} + ${_PKG_SILENT}${_PKG_DEBUG}${LN} -s ${_GCCBINDIR}/${.TARGET:T} ${.TARGET} +. else ${_PKG_SILENT}${_PKG_DEBUG} \ (${ECHO} '#!${TOOLS_SHELL}'; \ ${ECHO} 'exec ${_GCCBINDIR}/${.TARGET:T} "$$@"'; \ ) > ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} +. endif . for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} ${_PKG_SILENT}${_PKG_DEBUG} \ if [ ! -x "${_alias_}" ]; then \ - ${LN} -f ${.TARGET} ${_alias_}; \ + ${LN} -f -s ${.TARGET:T} ${_alias_}; \ fi . endfor . endif |