diff options
author | grant <grant> | 2005-02-15 07:43:43 +0000 |
---|---|---|
committer | grant <grant> | 2005-02-15 07:43:43 +0000 |
commit | 34e87dee1468347260f007ae708b6965a21dbc0a (patch) | |
tree | c1273d3f6640df9366e9233a012376a7d0a2cb6b /mk/wrapper | |
parent | 310194c17a4cdea1f299f950393d310de60b1568 (diff) | |
download | pkgsrc-34e87dee1468347260f007ae708b6965a21dbc0a.tar.gz |
add support for icc, the Intel C++ Compiler (Linux).
icc is a high performance compiler suite for Linux/i386 and ia64, and
is free for non-commercial use. see:
http://www.intel.com/software/products/compilers/clin/
for more information.
tested with icc version 8.0 and 8.1 on Slackware 10/i386.
Diffstat (limited to 'mk/wrapper')
-rw-r--r-- | mk/wrapper/bsd.wrapper.mk | 23 | ||||
-rw-r--r-- | mk/wrapper/cmd-sink-icc-cc | 59 | ||||
-rw-r--r-- | mk/wrapper/transform-icc-cc | 68 |
3 files changed, 149 insertions, 1 deletions
diff --git a/mk/wrapper/bsd.wrapper.mk b/mk/wrapper/bsd.wrapper.mk index e5eac5ccd48..c811bc03ba3 100644 --- a/mk/wrapper/bsd.wrapper.mk +++ b/mk/wrapper/bsd.wrapper.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.wrapper.mk,v 1.21 2005/02/15 03:18:50 jlam Exp $ +# $NetBSD: bsd.wrapper.mk,v 1.22 2005/02/15 07:43:43 grant Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -238,6 +238,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 @@ -484,6 +493,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} diff --git a/mk/wrapper/cmd-sink-icc-cc b/mk/wrapper/cmd-sink-icc-cc new file mode 100644 index 00000000000..592c5127430 --- /dev/null +++ b/mk/wrapper/cmd-sink-icc-cc @@ -0,0 +1,59 @@ +# $NetBSD: cmd-sink-icc-cc,v 1.1 2005/02/15 07:43:44 grant Exp $ +# +# Copyright (c) 2004 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 diff --git a/mk/wrapper/transform-icc-cc b/mk/wrapper/transform-icc-cc new file mode 100644 index 00000000000..a90f819d7d8 --- /dev/null +++ b/mk/wrapper/transform-icc-cc @@ -0,0 +1,68 @@ +# $NetBSD: transform-icc-cc,v 1.1 2005/02/15 07:43:44 grant Exp $ +# +# Copyright (c) 2004 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. + +case $arg in +###################################################################### +# ignore flags that icc doesn't understand. +###################################################################### +-ffast-math|-fomit-frame-pointer|-pedantic|-pipe|-s|-MP|-OPT:*) + arg= + msg_log $wrapperlog " (transform-icc-cc) to: $arg" + addtocache=yes + ;; +-finline-functions) + arg=-Ob2 + msg_log $wrapperlog " (transform-icc-cc) to: $arg" + addtocache=yes + ;; +-funroll-all-loops|-funroll-loops) + arg=-unroll + msg_log $wrapperlog " (transform-icc-cc) to: $arg" + addtocache=yes + ;; +-O[4-9]|-O[12][0-9]) + arg=-O3 + msg_log $wrapperlog " (transform-icc-cc) to: $arg" + addtocache=yes + ;; +-Wall|-Wl,*) + ;; +-W*) + arg= + msg_log $wrapperlog " (transform-icc-cc) to: $arg" + addtocache=yes + ;; +esac |