diff options
author | tv <tv@pkgsrc.org> | 2005-02-15 16:25:22 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2005-02-15 16:25:22 +0000 |
commit | 62a1a921bb7af275c8582b03c56a517ffe127f95 (patch) | |
tree | 474f293b31787cee304f66111a288ec138ba38e1 | |
parent | 675dcd01064ef8d7d377cddd7e724166763dc797 (diff) | |
download | pkgsrc-62a1a921bb7af275c8582b03c56a517ffe127f95.tar.gz |
sync with HEAD
-rw-r--r-- | mk/bsd.pkg.mk | 25 | ||||
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 8 | ||||
-rw-r--r-- | mk/compiler.mk | 5 | ||||
-rw-r--r-- | mk/compiler/icc.mk | 81 | ||||
-rw-r--r-- | mk/install/files | 5 | ||||
-rw-r--r-- | mk/platform/AIX.mk | 4 | ||||
-rw-r--r-- | mk/wrapper/arg-pp-darwin-gcc | 23 | ||||
-rw-r--r-- | mk/wrapper/arg-pp-main | 19 | ||||
-rw-r--r-- | mk/wrapper/bsd.wrapper.mk | 23 | ||||
-rw-r--r-- | mk/wrapper/cmd-sink-icc-cc | 59 | ||||
-rw-r--r-- | mk/wrapper/logic | 6 | ||||
-rw-r--r-- | mk/wrapper/transform-icc-cc | 68 |
12 files changed, 284 insertions, 42 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 8c470d20642..ab9a1dd265d 100644 --- a/mk/bsd.pkg.mk +++ b/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. # @@ -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 @@ -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 @@ -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}`"; \ diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 9f96754571e..401b88ac1b9 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/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. @@ -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 diff --git a/mk/compiler.mk b/mk/compiler.mk index 1b537359643..05bd4de4948 100644 --- a/mk/compiler.mk +++ b/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. @@ -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) @@ -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) diff --git a/mk/compiler/icc.mk b/mk/compiler/icc.mk new file mode 100644 index 00000000000..380bfc85873 --- /dev/null +++ b/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 diff --git a/mk/install/files b/mk/install/files index 60cfc91b654..53d0870752f 100644 --- a/mk/install/files +++ b/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 # @@ -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 diff --git a/mk/platform/AIX.mk b/mk/platform/AIX.mk index a0146a98490..a6fd755b8bd 100644 --- a/mk/platform/AIX.mk +++ b/mk/platform/AIX.mk @@ -1,4 +1,4 @@ -# $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. @@ -6,7 +6,7 @@ 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 diff --git a/mk/wrapper/arg-pp-darwin-gcc b/mk/wrapper/arg-pp-darwin-gcc index 08bb1718327..d50b204975e 100644 --- a/mk/wrapper/arg-pp-darwin-gcc +++ b/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. @@ -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 diff --git a/mk/wrapper/arg-pp-main b/mk/wrapper/arg-pp-main index 41680e4db66..abebcdde1b9 100644 --- a/mk/wrapper/arg-pp-main +++ b/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. @@ -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". ###################################################################### diff --git a/mk/wrapper/bsd.wrapper.mk b/mk/wrapper/bsd.wrapper.mk index 0c66ff73c02..0ae5a2f772c 100644 --- a/mk/wrapper/bsd.wrapper.mk +++ b/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. @@ -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 @@ -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} diff --git a/mk/wrapper/cmd-sink-icc-cc b/mk/wrapper/cmd-sink-icc-cc new file mode 100644 index 00000000000..12f139164ab --- /dev/null +++ b/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 diff --git a/mk/wrapper/logic b/mk/wrapper/logic index d3e4377fb05..0f14e164b3d 100644 --- a/mk/wrapper/logic +++ b/mk/wrapper/logic @@ -1,4 +1,4 @@ -# $NetBSD: logic,v 1.6.2.3 2005/01/24 18:40:01 tv Exp $ +# $NetBSD: logic,v 1.6.2.4 2005/02/15 16:25:23 tv Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -153,7 +153,7 @@ EOF yes) for i in $arg; do append_queue cmdbuf "$i" - $debug_log $wrapperlog " (logic) push: $i" + $debug_log $wrapperlog " (logic) push: $i [split]" done ;; ###################################################### @@ -167,7 +167,7 @@ EOF ;; *) append_queue cmdbuf "$arg" - $debug_log $wrapperlog " (logic) push: $arg" + $debug_log $wrapperlog " (logic) push: $arg [skipped]" ;; esac done diff --git a/mk/wrapper/transform-icc-cc b/mk/wrapper/transform-icc-cc new file mode 100644 index 00000000000..7ed375a89ef --- /dev/null +++ b/mk/wrapper/transform-icc-cc @@ -0,0 +1,68 @@ +# $NetBSD: transform-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. + +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 |