Skip to content

Commit

Permalink
sync with HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
tv committed Feb 15, 2005
1 parent 1cd2e18 commit 1ffa363
Show file tree
Hide file tree
Showing 12 changed files with 284 additions and 42 deletions.
25 changes: 14 additions & 11 deletions mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.mk,v 1.1540.2.22 2005/02/11 17:00:21 tv Exp $
# $NetBSD: bsd.pkg.mk,v 1.1540.2.23 2005/02/15 16:25:22 tv Exp $
#
# This file is in the public domain.
#
Expand Down Expand Up @@ -1285,14 +1285,14 @@ init-install:
fi
. if defined(PKG_DEVELOPER) && (${CHECK_FILES} == "YES")
${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} "${_PKGSRC_IN}> Generating pre-install file lists"
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PREFIX} -type f -or -type l \
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PREFIX} -type f -or -type l -print \
2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.prefix.pre \
|| ${TRUE}
. if ${CHECK_FILES_STRICT} == "YES"
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PKG_SYSCONFDIR} \
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PKG_SYSCONFDIR} -print \
2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.sysconfdir.pre \
|| ${TRUE}
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${VARBASE} \
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${VARBASE} -print \
2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.varbase.pre \
|| ${TRUE}
. endif
Expand Down Expand Up @@ -1388,14 +1388,14 @@ _REAL_TARGETS.su-install+= post-install-check-files
.PHONY: post-install-check-files
post-install-check-files:
${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} "${_PKGSRC_IN}> Generating post-install file lists"
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PREFIX} -type f -or -type l \
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PREFIX} -type f -or -type l -print \
2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.prefix.post \
|| ${TRUE}
. if ${CHECK_FILES_STRICT} == "YES"
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PKG_SYSCONFDIR} \
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PKG_SYSCONFDIR} -print \
2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.sysconfdir.post\
|| ${TRUE}
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${VARBASE} \
${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${VARBASE} -print \
2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.varbase.post \
|| ${TRUE}
. endif
Expand Down Expand Up @@ -2834,10 +2834,13 @@ acquire-${targ}-lock:
${FALSE}; \
fi; \
while true; do \
if ${TEST} -f /var/run/dmesg.boot -a -f ${LOCKFILE} -a \
/var/run/dmesg.boot -nt ${LOCKFILE}; then \
${ECHO} "=> Removing stale ${LOCKFILE}"; \
${RM} ${LOCKFILE}; \
: "Remove lock files older than the last reboot"; \
if ${TEST} -f /var/run/dmesg.boot -a -f ${LOCKFILE}; then \
rebooted=`${FIND} /var/run/dmesg.boot -newer ${LOCKFILE} -print`; \
if ${TEST} x"$$rebooted" != x; then \
${ECHO} "=> Removing stale ${LOCKFILE}"; \
${RM} ${LOCKFILE}; \
fi; \
fi; \
${SHLOCK} -f ${LOCKFILE} -p $$ppid && break; \
${ECHO} "=> Lock is held by pid `cat ${LOCKFILE}`"; \
Expand Down
8 changes: 7 additions & 1 deletion mk/buildlink3/bsd.buildlink3.mk
@@ -1,4 +1,4 @@
# $NetBSD: bsd.buildlink3.mk,v 1.163.2.4 2004/11/30 15:06:35 tv Exp $
# $NetBSD: bsd.buildlink3.mk,v 1.163.2.5 2005/02/15 16:25:23 tv Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
Expand Down Expand Up @@ -1000,6 +1000,12 @@ _BLNK_LIBTOOL_FIX_LA= ${WRAPPER_TMPDIR}/libtool-fix-la
# We need to "unbuildlinkify" any libtool archives.
_BLNK_WRAP_LT_UNTRANSFORM_SED= ${SUBST_SED.unwrap}
# The libtool wrapper should do all of the same transformations as the
# compiler wrapper since the primary mode of operation of the wrapper
# assumes it's being in either compiler or link mode.
#
_WRAP_ARG_PP.LIBTOOL= ${_WRAP_ARG_PP.CC}
_WRAP_BUILDCMD.LIBTOOL= ${WRAPPER_TMPDIR}/buildcmd-libtool
_WRAP_CACHE.LIBTOOL= ${WRAPPER_TMPDIR}/cache-libtool
_WRAP_CACHE_BODY.LIBTOOL= ${WRAPPER_TMPDIR}/cache-body-libtool
Expand Down
5 changes: 3 additions & 2 deletions mk/compiler.mk
@@ -1,4 +1,4 @@
# $NetBSD: compiler.mk,v 1.38.2.5 2005/01/13 20:11:55 tv Exp $
# $NetBSD: compiler.mk,v 1.38.2.6 2005/02/15 16:25:22 tv Exp $
#
# This Makefile fragment implements handling for supported C/C++/Fortran
# compilers.
Expand All @@ -14,6 +14,7 @@
# ccache compiler cache (chainable)
# distcc distributed C/C++ (chainable)
# f2c Fortran 77 to C compiler (chainable)
# icc Intel C++ Compiler (Linux)
# gcc GNU
# mipspro Silicon Graphics, Inc. MIPSpro (n32/n64)
# mipspro-ucode Silicon Graphics, Inc. MIPSpro (o32)
Expand Down Expand Up @@ -81,7 +82,7 @@ USE_LANGUAGES:= c ${USE_LANGUAGES}
_USE_PKGSRC_GCC= yes
.endif

_COMPILERS= ccc gcc mipspro mipspro-ucode sunpro xlc
_COMPILERS= ccc gcc icc mipspro mipspro-ucode sunpro xlc
_PSEUDO_COMPILERS= ccache distcc f2c

.if defined(NOT_FOR_COMPILER) && !empty(NOT_FOR_COMPILER)
Expand Down
81 changes: 81 additions & 0 deletions mk/compiler/icc.mk
@@ -0,0 +1,81 @@
# $NetBSD: icc.mk,v 1.1.2.2 2005/02/15 16:25:23 tv Exp $

.if !defined(COMPILER_ICC_MK)
COMPILER_ICC_MK= defined

.include "../../mk/bsd.prefs.mk"

ICCBASE?= /opt/intel_cc_80

# LANGUAGES.<compiler> is the list of supported languages by the
# compiler.
#
LANGUAGES.icc= # empty

_ICC_DIR= ${WRKDIR}/.icc
_ICC_VARS= # empty
.if exists(${ICCBASE}/bin/icc)
LANGUAGES.icc+= c
_ICC_VARS+= CC
_ICC_CC= ${_ICC_DIR}/bin/icc
_ALIASES.CC= cc
CCPATH= ${ICCBASE}/bin/icc
PKG_CC:= ${_ICC_CC}
LANGUAGES.icc+= c++
_ICC_VARS+= CXX
_ICC_CXX= ${_ICC_DIR}/bin/icpc
_ALIASES.CXX= CC c++
CXXPATH= ${ICCBASE}/bin/icpc
PKG_CXX:= ${_ICC_CXX}
.endif
_COMPILER_STRIP_VARS+= ${_ICC_VARS}

# icc passes rpath directives to the linker using "-Wl,-R".
_LINKER_RPATH_FLAG= -Wl,-R

# icc passes rpath directives to the linker using "-Wl,-R".
_COMPILER_RPATH_FLAG= -Wl,-R

.if exists(${CCPATH})
CC_VERSION_STRING!= ${CCPATH} -V 2>&1 | ${GREP} '^Intel'
_CC_VERSION!= ${CCPATH} -v 2>&1 || ${TRUE}
CC_VERSION= Intel C++ Compiler ${_CC_VERSION}
.else
CC_VERSION_STRING?= ${CC_VERSION}
CC_VERSION?= Intel C++ Compiler
.endif

# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the
# ones requested by the package in USE_LANGUAGES.
#
_LANGUAGES.icc= # empty
.for _lang_ in ${USE_LANGUAGES}
_LANGUAGES.icc+= ${LANGUAGES.icc:M${_lang_}}
.endfor

# Prepend the path to the compiler to the PATH.
.if !empty(_LANGUAGES.icc)
PREPEND_PATH+= ${_ICC_DIR}/bin
.endif

# Create compiler driver scripts in ${WRKDIR}.
.for _var_ in ${_ICC_VARS}
. if !target(${_ICC_${_var_}})
override-tools: ${_ICC_${_var_}}
${_ICC_${_var_}}:
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG} \
(${ECHO} '#!${TOOLS_SHELL}'; \
${ECHO} 'exec ${ICCBASE}/bin/${.TARGET:T} "$$@"'; \
) > ${.TARGET}
${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}
. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//}
${_PKG_SILENT}${_PKG_DEBUG} \
if [ ! -x "${_alias_}" ]; then \
${LN} -f ${.TARGET} ${_alias_}; \
fi
. endfor
. endif
.endfor

.endif # COMPILER_ICC_MK
5 changes: 2 additions & 3 deletions mk/install/files
@@ -1,6 +1,6 @@
#!@SH@
#
# $NetBSD: files,v 1.1.2.2 2005/02/11 15:27:57 tv Exp $
# $NetBSD: files,v 1.1.2.3 2005/02/15 16:25:23 tv Exp $
#
# +FILES - reference-counted configuration file management script
#
Expand Down Expand Up @@ -162,8 +162,7 @@ REMOVE)
"")
if ${TEST} -f "$preexist"; then
:
elif ${TEST} -f "$file" -a -f "$f_eg" -a \
! "$file" -ef "$f_eg" && \
elif ${TEST} -f "$file" -a -f "$f_eg" && \
${CMP} -s "$file" "$f_eg"; then
${RM} -f "$file"
fi
Expand Down
4 changes: 2 additions & 2 deletions mk/platform/AIX.mk
@@ -1,12 +1,12 @@
# $NetBSD: AIX.mk,v 1.4.2.2 2005/02/11 15:27:57 tv Exp $
# $NetBSD: AIX.mk,v 1.4.2.3 2005/02/15 16:25:23 tv Exp $
#
# Variable definitions for the AIX operating system.

AWK?= /usr/bin/awk
BASENAME?= /usr/bin/basename
CAT?= /bin/cat
CHMOD?= /bin/chmod
CHOWN?= /usr/sbin/chown
CHOWN?= /usr/bin/chown
CHGRP?= /usr/bin/chgrp
CMP?= /usr/bin/cmp
CP?= /bin/cp
Expand Down
23 changes: 22 additions & 1 deletion mk/wrapper/arg-pp-darwin-gcc
@@ -1,4 +1,4 @@
# $NetBSD: arg-pp-darwin-gcc,v 1.1.2.2 2005/01/24 18:40:01 tv Exp $
# $NetBSD: arg-pp-darwin-gcc,v 1.1.2.3 2005/02/15 16:25:23 tv Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
Expand Down Expand Up @@ -36,6 +36,27 @@

case $arg in
######################################################################
# Split direct paths to Darwin "dylib" shared libraries into the
# "-Ldir -llib" equivalent.
######################################################################
/*/lib*.dylib)
dir="${arg%/lib*.dylib}"
lib="${arg#$dir/lib}"
case $lib in
*/*) argok=yes; argmatch=yes ;;
*.dylib) lib="${lib%.dylib}" ;;
esac
case $argmatch in
yes) ;;
*) prepend_queue argbuf "-l$lib"
$debug_log $wrapperlog " (arg-pp-darwin-gcc) pre: -l$lib"
prepend_queue argbuf "-L$dir"
$debug_log $wrapperlog " (arg-pp-darwin-gcc) pre: -L$dir"
argmatch=yes
;;
esac
;;
######################################################################
# Darwin's linker uses:
#
# -dylib_file /path/shlib:/path2/shlib
Expand Down
19 changes: 1 addition & 18 deletions mk/wrapper/arg-pp-main
@@ -1,4 +1,4 @@
# $NetBSD: arg-pp-main,v 1.1.2.3 2005/02/11 15:27:57 tv Exp $
# $NetBSD: arg-pp-main,v 1.1.2.4 2005/02/15 16:25:23 tv Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
Expand Down Expand Up @@ -75,23 +75,6 @@ case $arg in
;;
esac
;;
/*/lib*.dylib) # Darwin
dir="${arg%/lib*.dylib}"
lib="${arg#$dir/lib}"
case $lib in
*/*) argok=yes; argmatch=yes ;;
*.dylib) lib="${lib%.dylib}" ;;
esac
case $argmatch in
yes) ;;
*) prepend_queue argbuf "-l$lib"
$debug_log $wrapperlog " (arg-pp-main) pre: -l$lib"
prepend_queue argbuf "-L$dir"
$debug_log $wrapperlog " (arg-pp-main) pre: -L$dir"
argmatch=yes
;;
esac
;;
######################################################################
# Remove extraneous comma in "-Wl,-R,/dir" and in "-Wl,-L,/dir".
######################################################################
Expand Down
23 changes: 22 additions & 1 deletion mk/wrapper/bsd.wrapper.mk
@@ -1,4 +1,4 @@
# $NetBSD: bsd.wrapper.mk,v 1.12.2.8 2005/01/24 18:40:01 tv Exp $
# $NetBSD: bsd.wrapper.mk,v 1.12.2.9 2005/02/15 16:25:23 tv Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
Expand Down Expand Up @@ -230,6 +230,15 @@ _WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
_WRAP_CMD_SINK.LD= ${_WRAP_CMD_SINK.CC}
.endif

.if !empty(PKGSRC_COMPILER:Micc)
_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-icc-cc
_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
_WRAP_CACHE_BODY.CC= ${WRAPPER_TMPDIR}/cache-body-icc-cc
_WRAP_CACHE_BODY.CXX= ${_WRAP_CACHE_BODY.CC}
_WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-icc-cc
_WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
.endif

.if !empty(PKGSRC_COMPILER:Mmipspro)
_WRAP_ARG_PP.CC= ${WRAPPER_TMPDIR}/arg-pp-mipspro-cc
_WRAP_CACHE_BODY.CC= ${WRAPPER_TMPDIR}/cache-body-mipspro-cc
Expand Down Expand Up @@ -481,6 +490,18 @@ ${WRAPPER_TMPDIR}/transform-ccc-cc: \
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
${WRAPPER_TMPDIR}/cmd-sink-icc-cc: \
${WRAPPER_SRCDIR}/cmd-sink-icc-cc
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
${WRAPPER_TMPDIR}/transform-icc-cc: \
${WRAPPER_SRCDIR}/transform-icc-cc
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
${WRAPPER_TMPDIR}/transform-mipspro-cc: \
${WRAPPER_SRCDIR}/transform-mipspro-cc
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
Expand Down
59 changes: 59 additions & 0 deletions mk/wrapper/cmd-sink-icc-cc
@@ -0,0 +1,59 @@
# $NetBSD: cmd-sink-icc-cc,v 1.2.2.2 2005/02/15 16:25:23 tv Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Grant Beattie.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the NetBSD
# Foundation, Inc. and its contributors.
# 4. Neither the name of The NetBSD Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

# all icc built dynamic libraries and executables need to be linked
# with ${ICCBASE}/lib in the rpath, or statically linked against the
# icc provided libraries. use the static linking method so binary
# packages can be used on systems that do not have these libraries
# available.
arg=-static-libcxa
$debug_log $wrapperlog " (cmd-sink-icc-cc) pop: $arg"
. $buildcmd

while ! queue_is_empty cmdbuf; do
pop_queue cmdbuf arg
case "$arg" in
-MT)
pop_queue cmdbuf arg2
$debug_log $wrapperlog " (cmd-sink-icc-cc) pop: $arg $arg2 [drop]"
;;

*)
$debug_log $wrapperlog " (cmd-sink-icc-cc) pop: $arg"
. $buildcmd
;;
esac
done

0 comments on commit 1ffa363

Please sign in to comment.