pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/compiler Re-add direct symlink logic, optional unde...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6eeeaa6dd9b7
branches: trunk
changeset: 487912:6eeeaa6dd9b7
user: tv <tv%pkgsrc.org@localhost>
date: Fri Jan 21 21:59:14 2005 +0000
description:
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:
mk/compiler/gcc.mk | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 0e67bd81b38d -r 6eeeaa6dd9b7 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk Fri Jan 21 21:50:19 2005 +0000
+++ b/mk/compiler/gcc.mk Fri Jan 21 21:59:14 2005 +0000
@@ -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 @@
.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
Home |
Main Index |
Thread Index |
Old Index