summaryrefslogtreecommitdiff
path: root/mk/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'mk/wrapper')
-rw-r--r--mk/wrapper/NOTES31
-rw-r--r--mk/wrapper/arg-pp-darwin-gcc76
-rw-r--r--mk/wrapper/arg-pp-main157
-rw-r--r--mk/wrapper/arg-pp-mipspro-cc48
-rw-r--r--mk/wrapper/arg-source112
-rw-r--r--mk/wrapper/bsd.wrapper.mk723
-rw-r--r--mk/wrapper/buildcmd75
-rw-r--r--mk/wrapper/cache-footer38
-rw-r--r--mk/wrapper/cache-header37
-rw-r--r--mk/wrapper/cmd-sink42
-rw-r--r--mk/wrapper/cmd-sink-aix-cc87
-rw-r--r--mk/wrapper/cmd-sink-aix-ld87
-rw-r--r--mk/wrapper/cmd-sink-aix-xlc74
-rw-r--r--mk/wrapper/cmd-sink-darwin-xlc59
-rw-r--r--mk/wrapper/cmd-sink-icc-cc59
-rw-r--r--mk/wrapper/cmd-sink-icc81-cc64
-rw-r--r--mk/wrapper/cmd-sink-interix-gcc50
-rw-r--r--mk/wrapper/cmd-sink-interix-ld50
-rw-r--r--mk/wrapper/cmd-sink-ld76
-rw-r--r--mk/wrapper/cmd-sink-osf1-cc47
-rw-r--r--mk/wrapper/cmd-sink-osf1-ld54
-rw-r--r--mk/wrapper/cmd-sink-unixware-gcc72
-rw-r--r--mk/wrapper/gen-reorder.sh142
-rw-r--r--mk/wrapper/gen-transform.sh451
-rw-r--r--mk/wrapper/logic173
-rw-r--r--mk/wrapper/scan44
-rw-r--r--mk/wrapper/transform-aix-cc52
-rw-r--r--mk/wrapper/transform-ccc-cc32
-rw-r--r--mk/wrapper/transform-icc-cc68
-rw-r--r--mk/wrapper/transform-mipspro-cc78
-rw-r--r--mk/wrapper/transform-mipspro-ucode-cc84
-rw-r--r--mk/wrapper/transform-sunpro-cc121
-rw-r--r--mk/wrapper/transform-xlc-cc75
-rw-r--r--mk/wrapper/wrapper-defs.mk46
-rw-r--r--mk/wrapper/wrapper.sh120
35 files changed, 0 insertions, 3604 deletions
diff --git a/mk/wrapper/NOTES b/mk/wrapper/NOTES
deleted file mode 100644
index f3262979360..00000000000
--- a/mk/wrapper/NOTES
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: NOTES,v 1.1.2.1 2005/01/24 18:40:01 tv Exp $
-
-
- ==> {"$@"} ,--> {argbuf} ,--> {cmdbuf}
- | |
- ^ | | | | |
- | `------. | | | |
- | | | | | |
- v v | | | |
- | |
- [scan] [arg-source] `--> [logic] `--------> [cmd-sink]
-
- ^ ^ ^ ^ ^ ^
- ,-----------------------------' | | | | |
- | ,-------------------' | | | |
- | | ,-------------' | | |
- | | | ,---' `-------. |
- v v v v v v
-
- [arg-pp-main] [arg-pp] [cache] [transform.sed] [transform] [buildcmd]
-
- |
- ,-- {cmd} <--|
- {cmd} <===| |
- `-- {libs} <--'
-
- ^
- |
- v
-
- [reorderlibs]
diff --git a/mk/wrapper/arg-pp-darwin-gcc b/mk/wrapper/arg-pp-darwin-gcc
deleted file mode 100644
index d50b204975e..00000000000
--- a/mk/wrapper/arg-pp-darwin-gcc
+++ /dev/null
@@ -1,76 +0,0 @@
-# $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.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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
-######################################################################
-# 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
-# -dylib_install_name /path/shlib
-# -install_name /path/shlib
-#
-# to pass the installed locations for the shared libraries to the
-# linker, and we need to pass the extra argument unmodified. The
-# purpose of -seg_addr_table_filename is more obscure, but Darwin's
-# imake rules use it.
-######################################################################
--dylib_file|-dylib_install_name|-install_name|-seg_addr_table_filename)
- skipargs=1
- argok=yes
- argmatch=yes
- ;;
-esac
diff --git a/mk/wrapper/arg-pp-main b/mk/wrapper/arg-pp-main
deleted file mode 100644
index abebcdde1b9..00000000000
--- a/mk/wrapper/arg-pp-main
+++ /dev/null
@@ -1,157 +0,0 @@
-# $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.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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
-######################################################################
-# Split direct paths to shared libraries into the "-Ldir -llib"
-# equivalent.
-######################################################################
-/*/lib*.so|/*/lib*.so.[0-9]*)
- dir="${arg%/lib*}"
- lib="${arg#$dir/lib}"
- case $lib in
- */*) argok=yes; argmatch=yes ;;
- *.so) lib="${lib%.so}" ;;
- *.so.[0-9]*) lib="${lib%.so.[0-9]*}" ;;
- 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
- ;;
-/*/lib*.sl|/*/lib*.sl.[0-9]*) # HP-UX
- dir="${arg%/lib*}"
- lib="${arg#$dir/lib}"
- case $lib in
- */*) argok=yes; argmatch=yes ;;
- *.sl) lib="${lib%.sl}" ;;
- *.sl.[0-9]*) lib="${lib%.sl.[0-9]*}" ;;
- 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".
-######################################################################
--Wl,-L,*)
- arg="-Wl,-L${arg#-Wl,-L,}"
- $debug_log $wrapperlog " (arg-pp-main) pre: $arg"
- prepend_queue argbuf "$arg"
- argmatch=yes
- ;;
--Wl,-R,*)
- arg="-Wl,-R${arg#-Wl,-R,}"
- $debug_log $wrapperlog " (arg-pp-main) pre: $arg"
- prepend_queue argbuf "$arg"
- argmatch=yes
- ;;
-######################################################################
-# Merge "-Wl,-R -Wl,/dir" into a single "-Wl,-R/dir". Same for -Wl,-L,
-# -Wl,-rpath and -Wl,-rpath-link.
-######################################################################
--Wl,-[LR])
- pop_queue argbuf nextarg
- $debug_log $wrapperlog " (arg-pp-main) pop: $nextarg"
- shquote "${nextarg#-Wl,}"; nextarg="$shquoted"
- $debug_log $wrapperlog " (arg-pp-main) pre: $arg$nextarg"
- prepend_queue argbuf "$arg$nextarg"
- argmatch=yes
- ;;
--Wl,-rpath|-Wl,-rpath-link|-Wl,--rpath)
- pop_queue argbuf nextarg
- $debug_log $wrapperlog " (arg-pp-main) pop: $nextarg"
- shquote "${nextarg#-Wl,}"; nextarg="$shquoted"
- $debug_log $wrapperlog " (arg-pp-main) pre: $arg,$nextarg"
- prepend_queue argbuf "$arg,$nextarg"
- argmatch=yes
- ;;
-######################################################################
-# Remove rpath options that try to add relative paths to the runtime
-# library search path. This basically cleans up after lazy programmers
-# who can't write Makefiles.
-######################################################################
--R[!/]*|-Wl,-R[!/]*|\
--Wl,-rpath,[!/]*|-Wl,-rpath-link,[!/]*|-Wl,--rpath,[!/]*)
- $debug_log $wrapperlog " (arg-pp-main) drop: $arg"
- argmatch=yes
- ;;
-######################################################################
-# Remove consecutive, repeated library options.
-######################################################################
--l*)
- head_queue argbuf nextarg
- while $test "$nextarg" = "$arg"; do
- pop_queue argbuf nextarg
- $debug_log $wrapperlog " (arg-pp-main) drop: $nextarg"
- if queue_is_empty argbuf; then
- break
- else
- head_queue argbuf nextarg
- fi
- done
- argok=yes
- argmatch=yes
- ;;
-#######################################################################
-# The -o option takes an extra argument that should be passed unmodified.
-#######################################################################
--o)
- skipargs=1
- argok=yes
- argmatch=yes
- ;;
-#######################################################################
-# GNU ld uses "--dynamic-linker /path/to/shared/object" to set the
-# dynamic linker code for ELF executables.
-#######################################################################
---dynamic-linker)
- skipargs=1
- argok=yes
- argmatch=yes
- ;;
-esac
diff --git a/mk/wrapper/arg-pp-mipspro-cc b/mk/wrapper/arg-pp-mipspro-cc
deleted file mode 100644
index fdb5598cc59..00000000000
--- a/mk/wrapper/arg-pp-mipspro-cc
+++ /dev/null
@@ -1,48 +0,0 @@
-# $NetBSD: arg-pp-mipspro-cc,v 1.1.2.2 2005/01/24 18:40:01 tv Exp $
-#
-# Copyright (c) 2005 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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
-######################################################################
-# MIPSpro uses -LANG:<feature> and -LIST:<feature> as knobs for the
-# compiler, but we don't want them to be confused with the usual
-# -Ldir options, so just pass them verbatim onward.
-######################################################################
--LANG:*|-LIST:*)
- do_transform=no
- argok=yes
- argmatch=yes
- ;;
-esac
diff --git a/mk/wrapper/arg-source b/mk/wrapper/arg-source
deleted file mode 100644
index efd54bf0ad4..00000000000
--- a/mk/wrapper/arg-source
+++ /dev/null
@@ -1,112 +0,0 @@
-# $NetBSD: arg-source,v 1.3 2004/09/26 21:09:34 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-# This script manages a buffer through which arguments from the command
-# line are funneled. Along the way, the arguments are potentially
-# merged and split in various ways to canonicalize their representation.
-# This script should be sourced within a loop and upon exiting returns
-# an argument in $arg.
-#
-# This is done by pushing the next command-line argument onto a queue,
-# then using a processing loop to pop an argument off of the top of
-# the queue, transform it, and possibly push more arguments back onto
-# the queue.
-
-# Push arguments from the command line into the argument buffer.
-while $test $# -gt 0; do
- arg="$1"; shift
- case $arg in
- ##############################################################
- # Merge "-I /dir" into a single "-I/dir". Same for -L, -R.
- ##############################################################
- -[ILR])
- nextarg="$1"; shift
- shquote "$nextarg"; nextarg="$shquoted"
- append_queue argbuf "$arg$nextarg"
- $debug_log $wrapperlog " (arg-source) push: $arg$nextarg"
- ;;
- ##############################################################
- # Split "-Wl,-R/dir1:/dir2" into "-Wl,-R/dir1 -Wl,-R/dir2".
- # Same for -Wl,-rpath and -Wl,-rpath-link.
- ##############################################################
- -R*:*|-Wl,-R*:*|\
- -Wl,-rpath,*:*|-Wl,-rpath-link,*:*|-Wl,--rpath,*:*)
- case $arg in
- -R*) R="-R" ;;
- -Wl,-R*) R="-Wl,-R" ;;
- -Wl,-rpath,*) R="-Wl,-rpath," ;;
- -Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
- -Wl,--rpath,*) R="-Wl,--rpath," ;;
- esac
- list="${arg#$R}"
- save_IFS="${IFS}"; IFS=":"
- for dir in $list; do
- shquote "$dir"; dir="$shquoted"
- append_queue argbuf "$R$dir"
- $debug_log $wrapperlog " (arg-source) push: $R$dir"
- done
- IFS="${save_IFS}"
- ;;
- ##############################################################
- # "-Xlinker arg" is the equivalent of "-Wl,arg" so convert it
- # here before queueing it up. We also need to keep converting
- # as long as there are consecutive "-Xlinker ..." options
- # because they are most likely part of the same long option
- # list for the linker.
- ##############################################################
- -Xlinker)
- nextarg="$1"; shift
- case $nextarg in
- -Wl,*)
- append_queue argbuf "$nextarg"
- $debug_log $wrapperlog " (arg-source) push: $nextarg"
- ;;
- *)
- shquote "$nextarg"; nextarg="$shquoted"
- append_queue argbuf "-Wl,$nextarg"
- $debug_log $wrapperlog " (arg-source) push: -Wl,$nextarg"
- ;;
- esac
- ;;
- ##############################################################
- # For everything else, just queue it up.
- ##############################################################
- *)
- append_queue argbuf "$arg"
- $debug_log $wrapperlog " (arg-source) push: $arg"
- ;;
- esac
-done
diff --git a/mk/wrapper/bsd.wrapper.mk b/mk/wrapper/bsd.wrapper.mk
deleted file mode 100644
index 53fd2f49da7..00000000000
--- a/mk/wrapper/bsd.wrapper.mk
+++ /dev/null
@@ -1,723 +0,0 @@
-# $NetBSD: bsd.wrapper.mk,v 1.12.2.12 2005/05/17 18:29:46 tv Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-.include "../../mk/wrapper/wrapper-defs.mk"
-
-# pkgsrc bmake does not (yet) correctly handle ${VAR} > 0 because
-# ${VAR} is treated as a string, so we must use a string comparison
-# operator.
-.if ${PKG_DEBUG_LEVEL} != "0" || defined(PKG_VERBOSE)
-ECHO_WRAPPER_MSG?= ${ECHO}
-.else
-ECHO_WRAPPER_MSG?= ${TRUE}
-.endif
-
-.PHONY: do-wrapper
-
-# Prepend ${WRAPPER_BINDIR} to the PATH so that the wrappers are found
-# first when searching for executables.
-#
-PREPEND_PATH+= ${WRAPPER_BINDIR}
-
-###
-### BEGIN: after "wrapper" phase
-###
-.if !empty(PKG_PHASES:Mwrapper)
-
-WRAPPER_DEBUG?= yes
-CONFIGURE_ENV+= WRAPPER_DEBUG="${WRAPPER_DEBUG}"
-MAKE_ENV+= WRAPPER_DEBUG="${WRAPPER_DEBUG}"
-SCRIPTS_ENV+= WRAPPER_DEBUG="${WRAPPER_DEBUG}"
-
-# The caching code, which greatly speeds up the build process, doesn't
-# work correctly on certain platforms.
-#
-_WRAP_BROKEN_CACHE= Darwin-5.*-*
-
-.if !defined(WRAPPER_UPDATE_CACHE)
-WRAPPER_UPDATE_CACHE?= yes
-. for _pattern_ in ${_WRAP_BROKEN_CACHE}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
-WRAPPER_UPDATE_CACHE= no
-. endif
-. endfor
-.endif
-CONFIGURE_ENV+= WRAPPER_UPDATE_CACHE="${WRAPPER_UPDATE_CACHE}"
-MAKE_ENV+= WRAPPER_UPDATE_CACHE="${WRAPPER_UPDATE_CACHE}"
-
-# Only do the (expensive) reordering step if we have reordering
-# transformations.
-#
-WRAPPER_REORDER_CMDS?= # empty
-.if !empty(WRAPPER_REORDER_CMDS)
-MAKE_ENV+= WRAPPER_REORDER=yes
-.endif
-
-# Remove rpath options if _USE_RPATH is "no".
-.if defined(_USE_RPATH) && !empty(_USE_RPATH:M[nN][oO])
-_WRAP_TRANSFORM_CMDS+= no-rpath
-.endif
-
-# Add any package-specified transformations.
-_WRAP_TRANSFORM_CMDS+= ${WRAPPER_TRANSFORM_CMDS}
-
-# _WRAP_PATH is the path we embed in the wrapper scripts for subsequent
-# calls to the toolchain. We don't need to wrap them again because they
-# are already being called with the correct arguments.
-#
-.if !defined(_WRAP_PATH)
-_WRAP_PATH= ${PATH:S/${WRAPPER_BINDIR}://:S/:${WRAPPER_BINDIR}//}
-.endif
-MAKEVARS+= _WRAP_PATH
-
-# Generate wrapper scripts for the compiler tools. These wrapper
-# scripts are to be used instead of the actual compiler tools when
-# building software.
-#
-# WRAPPER_CC, WRAPPER_LD, etc. are the full paths to the wrapper
-# scripts.
-#
-# _WRAP_ALIASES.CC, _WRAP_ALIASES.LD, etc. are the other names by
-# which each wrapper may be invoked.
-#
-WRAPPEES+= AS
-WRAPPEES+= CC
-WRAPPEES+= CPP
-WRAPPEES+= CXX
-WRAPPEES+= FC
-.if defined(USE_X11)
-IMAKE?= ${X11BASE}/bin/imake
-WRAPPEES+= IMAKE
-.endif
-WRAPPEES+= LD
-
-_WRAPPEE_UNIQUE_CMDS= # empty
-.for _wrappee_ in ${WRAPPEES}
-_WRAPPEES+= ${_wrappee_}
-_WRAPPEE_${_wrappee_}= ${${_wrappee_}:T:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
-. if empty(_WRAPPEE_UNIQUE_CMDS:M${_WRAPPEE_${_wrappee_}})
-_WRAPPEE_UNIQUE_CMDS+= ${_WRAPPEE_${_wrappee_}}
-_WRAPPEES_UNIQUE+= ${_wrappee_}
-. endif
-.endfor # WRAPPEES
-
-.for _wrappee_ in ${_WRAPPEES}
-#
-# Strip the leading paths from the toolchain variables since we manipulate
-# the PATH to use the correct executable.
-#
-. if empty(${_wrappee_}:C/^/_asdf_/1:N_asdf_*)
-${_wrappee_}:= ${${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//:T}
-. else
-${_wrappee_}:= ${${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//:T} ${${_wrappee_}:C/^/_asdf_/1:N_asdf_*}
-. endif
-#
-# WRAPPER_<wrappee> is the full path to the wrapper script, plus any
-# trailing arguments to <wrappee>.
-#
-WRAPPER_${_wrappee_}= ${WRAPPER_BINDIR}/${${_wrappee_}}
-.endfor # _WRAPPEES
-
-_WRAP_ALIASES.AS= as
-_WRAP_ALIASES.CC= cc gcc
-_WRAP_ALIASES.CXX= c++ g++ CC cxx
-_WRAP_ALIASES.CPP= cpp
-_WRAP_ALIASES.FC= f77 g77
-_WRAP_ALIASES.IMAKE= imake
-_WRAP_ALIASES.LD= ld
-
-# _WRAP_*.<wrappee> variables represent "template methods" of the main
-# wrapper script. This allows individual wrappers to be customized to
-# some degree:
-#
-_WRAP_ENV?= PATH="${_WRAP_PATH}"; export PATH
-_WRAP_EMPTY_FILE?= ${WRAPPER_TMPDIR}/empty
-_WRAP_ARG_PP?= ${_WRAP_EMPTY_FILE}
-_WRAP_ARG_PP_MAIN?= ${WRAPPER_TMPDIR}/arg-pp-main
-_WRAP_ARG_SOURCE?= ${WRAPPER_TMPDIR}/arg-source
-_WRAP_BUILDCMD?= ${WRAPPER_TMPDIR}/buildcmd
-_WRAP_CACHE?= ${WRAPPER_TMPDIR}/cache
-_WRAP_CACHE_HEADER?= ${WRAPPER_TMPDIR}/cache-header
-_WRAP_CACHE_BODY?= ${WRAPPER_TMPDIR}/cache-body
-_WRAP_CACHE_FOOTER?= ${WRAPPER_TMPDIR}/cache-footer
-_WRAP_CLEANUP?= ${_WRAP_EMPTY_FILE}
-_WRAP_CMD_SINK?= ${WRAPPER_TMPDIR}/cmd-sink
-_WRAP_GEN_REORDER?= ${WRAPPER_TMPDIR}/gen-reorder
-_WRAP_GEN_TRANSFORM?= ${WRAPPER_TMPDIR}/gen-transform
-_WRAP_LOG?= ${WRKLOG}
-_WRAP_LOGIC?= ${WRAPPER_TMPDIR}/logic
-_WRAP_REORDERLIBS?= ${WRAPPER_TMPDIR}/reorderlibs
-_WRAP_SCAN?= ${WRAPPER_TMPDIR}/scan
-_WRAP_SHELL_LIB?= ${WRAPPER_TMPDIR}/shell-lib
-_WRAP_SKIP_TRANSFORM?= no
-_WRAP_TRANSFORM?= ${_WRAP_EMPTY_FILE}
-_WRAP_TRANSFORM_SED?= # empty
-_WRAP_TRANSFORM_SEDFILE?= ${WRAPPER_TMPDIR}/transform.sed
-_WRAP_UNTRANSFORM_SEDFILE?= ${WRAPPER_TMPDIR}/untransform.sed
-
-# Generate the transformation sedfiles if we need them.
-.if !empty(_WRAP_TRANSFORM_CMDS)
-do-wrapper: ${_WRAP_TRANSFORM_SEDFILE} ${_WRAP_UNTRANSFORM_SEDFILE}
-_WRAP_TRANSFORM_SED+= -f ${_WRAP_TRANSFORM_SEDFILE}
-_UNWRAP_SED= -f ${_WRAP_UNTRANSFORM_SEDFILE}
-.endif
-
-.for _wrappee_ in ${_WRAPPEES}
-_WRAPPER_SH.${_wrappee_}= ${WRAPPER_SRCDIR}/wrapper.sh
-_WRAP_ENV.${_wrappee_}?= ${_WRAP_ENV}
-_WRAP_EXTRA_ARGS.${_wrappee_}?= # empty
-_WRAP_ARG_PP.${_wrappee_}?= ${_WRAP_ARG_PP}
-_WRAP_ARG_PP_MAIN.${_wrappee_}?= ${_WRAP_ARG_PP_MAIN}
-_WRAP_ARG_SOURCE.${_wrappee_}?= ${_WRAP_ARG_SOURCE}
-_WRAP_BUILDCMD.${_wrappee_}?= ${_WRAP_BUILDCMD}
-_WRAP_CACHE.${_wrappee_}?= ${_WRAP_CACHE}
-_WRAP_CACHE_HEADER.${_wrappee_}?= ${_WRAP_CACHE_HEADER}
-_WRAP_CACHE_BODY.${_wrappee_}?= ${_WRAP_CACHE_BODY}
-_WRAP_CACHE_FOOTER.${_wrappee_}?= ${_WRAP_CACHE_FOOTER}
-_WRAP_CLEANUP.${_wrappee_}?= ${_WRAP_CLEANUP}
-_WRAP_CMD_SINK.${_wrappee_}?= ${_WRAP_CMD_SINK}
-_WRAP_LOG.${_wrappee_}?= ${_WRAP_LOG}
-_WRAP_LOGIC.${_wrappee_}?= ${_WRAP_LOGIC}
-_WRAP_SCAN.${_wrappee_}?= ${_WRAP_SCAN}
-_WRAP_TRANSFORM.${_wrappee_}?= ${_WRAP_TRANSFORM}
-_WRAP_TRANSFORM_SED.${_wrappee_}?= ${_WRAP_TRANSFORM_SED}
-_WRAP_SKIP_TRANSFORM.${_wrappee_}?= ${_WRAP_SKIP_TRANSFORM}
-.endfor # _WRAPPEES
-
-.if !empty(PKGSRC_COMPILER:Maix-xlc)
-_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-aix-xlc
-_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
-_WRAP_CMD_SINK.LD= ${_WRAP_CMD_SINK.CC}
-.endif
-
-.if !empty(PKGSRC_COMPILER:Micc)
-. if !empty(CC_VERSION:M8.1)
-_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-icc81-cc
-_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
-. else
-_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-icc-cc
-_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
-. endif
-_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
-_WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-mipspro-cc
-_WRAP_ARG_PP.CXX= ${_WRAP_ARG_PP.CC}
-_WRAP_CACHE_BODY.CXX= ${_WRAP_CACHE_BODY.CC}
-_WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
-.endif
-
-.if !empty(PKGSRC_COMPILER:Mmipspro-ucode)
-_WRAP_CACHE_BODY.CC= ${WRAPPER_TMPDIR}/cache-body-mipspro-ucode-cc
-_WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-mipspro-ucode-cc
-_WRAP_CACHE_BODY.CXX= ${_WRAP_CACHE_BODY.CC}
-_WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
-.endif
-
-.if !empty(PKGSRC_COMPILER:Msunpro)
-_WRAP_CACHE_BODY.CC= ${WRAPPER_TMPDIR}/cache-body-sunpro-cc
-_WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-sunpro-cc
-_WRAP_CACHE_BODY.CXX= ${_WRAP_CACHE_BODY.CC}
-_WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
-.endif
-
-.if !empty(PKGSRC_COMPILER:Mxlc)
-_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-darwin-xlc
-_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
-_WRAP_CACHE_BODY.CC= ${WRAPPER_TMPDIR}/cache-body-xlc-cc
-_WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-xlc-cc
-_WRAP_CACHE_BODY.CXX= ${_WRAP_CACHE_BODY.CC}
-_WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
-.endif
-
-.if !empty(PKGSRC_COMPILER:Mccc)
-_WRAP_CACHE_BODY.CC= ${WRAPPER_TMPDIR}/cache-body-ccc-cc
-_WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-ccc-cc
-_WRAP_CACHE_BODY.CXX= ${_WRAP_CACHE_BODY.CC}
-_WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
-.endif
-
-_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-ld
-_WRAP_SKIP_TRANSFORM.IMAKE= yes
-
-# XXX
-# XXX This section is ${OPSYS}-specific and shouldn't be here.
-# XXX
-.if ${OPSYS} == "Interix"
-_WRAP_EXTRA_ARGS.CC+= -D_ALL_SOURCE
-_WRAP_EXTRA_ARGS.CXX+= -D_ALL_SOURCE
-_WRAP_EXTRA_ARGS.CPP+= -D_ALL_SOURCE
-_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-interix-gcc
-_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
-_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-interix-ld
-.elif ${OPSYS} == "Darwin"
-_WRAP_ARG_PP.CC= ${WRAPPER_TMPDIR}/arg-pp-darwin-gcc
-_WRAP_ARG_PP.CXX= ${_WRAP_ARG_PP.CC}
-_WRAP_ARG_PP.LD= ${_WRAP_ARG_PP.CC}
-.elif ${OPSYS} == "UnixWare"
-_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-unixware-gcc
-_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
-_WRAP_CMD_SINK.LD= ${_WRAP_CMD_SINK.CC}
-.elif ${OPSYS} == "OSF1"
-_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-osf1-cc
-_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
-_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-osf1-ld
-.elif ${OPSYS} == "AIX"
-_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-aix-cc
-_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
-_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-aix-ld
-_WRAP_CACHE_BODY.CC= ${WRAPPER_TMPDIR}/cache-body-aix-cc
-_WRAP_TRANSFORM.CC= ${WRAPPER_TMPDIR}/transform-aix-cc
-_WRAP_CACHE_BODY.CXX= ${_WRAP_CACHE_BODY.CC}
-_WRAP_TRANSFORM.CXX= ${_WRAP_TRANSFORM.CC}
-.endif
-
-# Filter to scrunch shell scripts by removing comments and empty lines.
-_WRAP_SH_CRUNCH_FILTER= \
- ${GREP} -v "^\#[^!]" | ${GREP} -v "^[ ][ ]*\#" | \
- ${GREP} -v "^\#$$" | ${GREP} -v "^[ ]*$$"
-
-_WRAP_SUBST_SED= \
- -e "s|@CAT@|${CAT:Q}|g" \
- -e "s|@ECHO@|${ECHO:Q}|g" \
- -e "s|@EXPR@|${EXPR:Q}|g" \
- -e "s|@SED@|${SED:Q}|g" \
- -e "s|@TEST@|${TEST:Q}|g" \
- -e "s|@WRAPPER_SHELL@|${WRAPPER_SHELL:Q}|g" \
- -e "s|@_WRAP_LOG@|${_WRAP_LOG:Q}|g" \
- -e "s|@_WRAP_REORDERLIBS@|${_WRAP_REORDERLIBS:Q}|g" \
- -e "s|@_WRAP_SHELL_LIB@|${_WRAP_SHELL_LIB:Q}|g"
-
-BUILD_ENV?= # empty
-.if !empty(BUILD_ENV)
-_WRAP_SUBST_SED+= -e 's|@BUILD_ENV@|export '${BUILD_ENV:Q}'|'
-.endif
-
-.for _wrappee_ in ${_WRAPPEES}
-_WRAP_SUBST_SED.${_wrappee_}= \
- -e "s|@_WRAP_ENV@|${_WRAP_ENV.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_EXTRA_ARGS@|${_WRAP_EXTRA_ARGS.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_ARG_PP@|${_WRAP_ARG_PP.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_ARG_PP_MAIN@|${_WRAP_ARG_PP_MAIN.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_ARG_SOURCE@|${_WRAP_ARG_SOURCE.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_BUILDCMD@|${_WRAP_BUILDCMD.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_CACHE@|${_WRAP_CACHE.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_CACHE_HEADER@|${_WRAP_CACHE_HEADER.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_CACHE_BODY@|${_WRAP_CACHE_BODY.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_CACHE_FOOTER@|${_WRAP_CACHE_FOOTER.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_CLEANUP@|${_WRAP_CLEANUP.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_CMD_SINK@|${_WRAP_CMD_SINK.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_LOG@|${_WRAP_LOG.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_LOGIC@|${_WRAP_LOGIC.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_SCAN@|${_WRAP_SCAN.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_SKIP_TRANSFORM@|${_WRAP_SKIP_TRANSFORM.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_TRANSFORM@|${_WRAP_TRANSFORM.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_TRANSFORM_SED@|${_WRAP_TRANSFORM_SED.${_wrappee_}:Q}|g" \
- -e "s|@WRAPPER_DEBUG@|${WRAPPER_DEBUG}|g" \
- -e "s|@WRAPPER_UPDATE_CACHE@|${WRAPPER_UPDATE_CACHE}|g" \
- ${_WRAP_SUBST_SED}
-
-_WRAP_COOKIE.${_wrappee_}= ${WRAPPER_DIR}/.wrapper_${_wrappee_}_done
-.endfor # _WRAPPEES
-
-.for _wrappee_ in ${_WRAPPEES_UNIQUE}
-PKG_${_wrappee_}?= ${${_wrappee_}}
-do-wrapper: ${_WRAP_COOKIE.${_wrappee_}}
-${_WRAP_COOKIE.${_wrappee_}}: \
- ${_WRAPPER_SH.${_wrappee_}} \
- ${_WRAP_ARG_PP.${_wrappee_}} \
- ${_WRAP_ARG_PP_MAIN.${_wrappee_}} \
- ${_WRAP_ARG_SOURCE.${_wrappee_}} \
- ${_WRAP_BUILDCMD.${_wrappee_}} \
- ${_WRAP_CACHE.${_wrappee_}} \
- ${_WRAP_CLEANUP.${_wrappee_}} \
- ${_WRAP_CMD_SINK.${_wrappee_}} \
- ${_WRAP_LOGIC.${_wrappee_}} \
- ${_WRAP_REORDERLIBS} \
- ${_WRAP_SCAN.${_wrappee_}} \
- ${_WRAP_SHELL_LIB} \
- ${_WRAP_TRANSFORM.${_wrappee_}}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- wrapper="${WRAPPER_${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \
- ${ECHO_WRAPPER_MSG} "=> Creating ${_wrappee_} wrapper: $$wrapper"; \
- gen_wrapper=yes; \
- wrappee="${PKG_${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \
- case $$wrappee in \
- /*) ;; \
- *) save_IFS="$$IFS"; \
- IFS=":"; \
- for dir in $${PATH}; do \
- case $${dir} in \
- *${WRAPPER_DIR}*) \
- ;; \
- *) \
- if ${TEST} -f $${dir}/$$wrappee -o \
- -h $${dir}/$$wrappee; then \
- wrappee=$${dir}/$$wrappee; \
- break; \
- fi; \
- ;; \
- esac; \
- done; \
- IFS="$$save_IFS"; \
- if ${TEST} ! -x "$$wrappee"; then \
- gen_wrapper=no; \
- ${ECHO_WRAPPER_MSG} "Warning: unable to create ${_wrappee_} wrapper script: \`$$wrappee'"; \
- fi; \
- ;; \
- esac; \
- case $$gen_wrapper in \
- yes) \
- ${MKDIR} `${DIRNAME} $$wrapper`; \
- ${CAT} ${_WRAPPER_SH.${_wrappee_}} | \
- ${SED} ${_WRAP_SUBST_SED.${_wrappee_}} \
- -e "s|@WRAPPEE@|$$wrappee|g" | \
- ${_WRAP_SH_CRUNCH_FILTER} \
- > $$wrapper; \
- ${CHMOD} +x $$wrapper; \
- ;; \
- esac
- ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
-
-. for _alias_ in ${_WRAP_ALIASES.${_wrappee_}:S/^/${WRAPPER_BINDIR}\//}
-. if !target(${_alias_})
-do-wrapper: ${_alias_}
-${_alias_}: ${_WRAP_COOKIE.${_wrappee_}}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- wrapper="${WRAPPER_${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \
- if [ ! -x ${.TARGET} -a -x $$wrapper ]; then \
- ${ECHO_WRAPPER_MSG} "=> Linking ${_wrappee_} wrapper: ${.TARGET}"; \
- ${LN} -f $$wrapper ${.TARGET}; \
- fi
-. endif
-. endfor
-.endfor # _WRAPPEES_UNIQUE
-
-.for _target_ in ${WRAPPER_TARGETS}
-do-wrapper: ${_target_}
-.endfor
-
-${WRAPPER_TMPDIR}/arg-pp-darwin-gcc: \
- ${WRAPPER_SRCDIR}/arg-pp-darwin-gcc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/arg-pp-mipspro-cc: \
- ${WRAPPER_SRCDIR}/arg-pp-mipspro-cc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/cmd-sink-aix-xlc: \
- ${WRAPPER_SRCDIR}/cmd-sink-aix-xlc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/cmd-sink-aix-cc: \
- ${WRAPPER_SRCDIR}/cmd-sink-aix-cc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/cmd-sink-aix-ld: \
- ${WRAPPER_SRCDIR}/cmd-sink-aix-ld
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/cmd-sink-darwin-xlc: \
- ${WRAPPER_SRCDIR}/cmd-sink-darwin-xlc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/cmd-sink-interix-gcc: \
- ${WRAPPER_SRCDIR}/cmd-sink-interix-gcc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/cmd-sink-ld: \
- ${WRAPPER_SRCDIR}/cmd-sink-ld
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/cmd-sink-unixware-gcc: \
- ${WRAPPER_SRCDIR}/cmd-sink-unixware-gcc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/cmd-sink-osf1-ld: \
- ${WRAPPER_SRCDIR}/cmd-sink-osf1-ld
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/cmd-sink-osf1-cc: \
- ${WRAPPER_SRCDIR}/cmd-sink-osf1-cc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/transform-ccc-cc: \
- ${WRAPPER_SRCDIR}/transform-ccc-cc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_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}/cmd-sink-icc81-cc: \
- ${WRAPPER_SRCDIR}/cmd-sink-icc81-cc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/transform-aix-cc: \
- ${WRAPPER_SRCDIR}/transform-aix-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}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/transform-mipspro-ucode-cc: \
- ${WRAPPER_SRCDIR}/transform-mipspro-ucode-cc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/transform-sunpro-cc: \
- ${WRAPPER_SRCDIR}/transform-sunpro-cc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-${WRAPPER_TMPDIR}/transform-xlc-cc: \
- ${WRAPPER_SRCDIR}/transform-xlc-cc
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
-.if !target(${_WRAP_GEN_REORDER})
-${_WRAP_GEN_REORDER}: \
- ${_WRAP_SHELL_LIB} \
- ${WRAPPER_SRCDIR}/gen-reorder.sh
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${CAT} ${WRAPPER_SRCDIR}/gen-reorder.sh \
- | ${SED} ${_WRAP_SUBST_SED} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
- ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}
-.endif
-
-.if !target(${_WRAP_GEN_TRANSFORM})
-${_WRAP_GEN_TRANSFORM}: \
- ${_WRAP_SHELL_LIB} \
- ${WRAPPER_SRCDIR}/gen-transform.sh
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${CAT} ${WRAPPER_SRCDIR}/gen-transform.sh \
- | ${SED} ${_WRAP_SUBST_SED} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
- ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}
-.endif
-
-.if !target(${_WRAP_REORDERLIBS})
-${_WRAP_REORDERLIBS}: ${_WRAP_GEN_REORDER}
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${_WRAP_GEN_REORDER} ${WRAPPER_REORDER_CMDS} > ${.TARGET}
-.endif
-
-. if !target(${_WRAP_SHELL_LIB})
-${_WRAP_SHELL_LIB}: ${.CURDIR}/../../mk/scripts/shell-lib
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
-.if !target(${_WRAP_TRANSFORM_SEDFILE})
-${_WRAP_TRANSFORM_SEDFILE}: ${_WRAP_GEN_TRANSFORM}
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${_WRAP_GEN_TRANSFORM} transform ${_WRAP_TRANSFORM_CMDS} \
- > ${.TARGET}
-.endif
-
-.if !target(${_WRAP_UNTRANSFORM_SEDFILE})
-${_WRAP_UNTRANSFORM_SEDFILE}: ${_WRAP_GEN_TRANSFORM}
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${_WRAP_GEN_TRANSFORM} untransform ${_WRAP_TRANSFORM_CMDS} \
- > ${.TARGET}
-.endif
-
-.for _wrappee_ in ${_WRAPPEES}
-. if !target$(${_WRAP_EMPTY_FILE})
-${_WRAP_EMPTY_FILE}:
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}
-. endif
-
-. if !target(${_WRAP_ARG_PP_MAIN.${_wrappee_}})
-${_WRAP_ARG_PP_MAIN.${_wrappee_}}: ${WRAPPER_SRCDIR}/arg-pp-main
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
-. if !target(${_WRAP_ARG_SOURCE.${_wrappee_}})
-${_WRAP_ARG_SOURCE.${_wrappee_}}: ${WRAPPER_SRCDIR}/arg-source
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
-. if !target(${_WRAP_BUILDCMD.${_wrappee_}})
-${_WRAP_BUILDCMD.${_wrappee_}}: ${WRAPPER_SRCDIR}/buildcmd
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
-. if !target(${_WRAP_CACHE.${_wrappee_}})
-${_WRAP_CACHE.${_wrappee_}}: \
- ${_WRAP_CACHE_HEADER.${_wrappee_}} \
- ${_WRAP_CACHE_BODY.${_wrappee_}} \
- ${_WRAP_CACHE_FOOTER.${_wrappee_}}
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
-. if !target(${_WRAP_CACHE_HEADER.${_wrappee_}})
-${_WRAP_CACHE_HEADER.${_wrappee_}}: ${WRAPPER_SRCDIR}/cache-header
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
-. if !target(${_WRAP_CACHE_BODY.${_wrappee_}})
-${_WRAP_CACHE_BODY.${_wrappee_}}:
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}
-. endif
-
-. if !target(${_WRAP_CACHE_FOOTER.${_wrappee_}})
-${_WRAP_CACHE_FOOTER.${_wrappee_}}: ${WRAPPER_SRCDIR}/cache-footer
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
-. if !target(${_WRAP_CMD_SINK.${_wrappee_}})
-${_WRAP_CMD_SINK.${_wrappee_}}: ${WRAPPER_SRCDIR}/cmd-sink
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
-. if !target(${_WRAP_LOGIC.${_wrappee_}})
-${_WRAP_LOGIC.${_wrappee_}}: ${WRAPPER_SRCDIR}/logic
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
-. if !target(${_WRAP_SCAN.${_wrappee_}})
-${_WRAP_SCAN.${_wrappee_}}: ${WRAPPER_SRCDIR}/scan
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-.endfor # _WRAPPEES
-
-# UNWRAP_PATTERNS and UNWRAP_FILES list shell globs and files relative to
-# ${WRKSRC} that need to be "unwrapped".
-#
-UNWRAP_PATTERNS?= # empty
-_UNWRAP_PATTERNS= ${UNWRAP_PATTERNS}
-_UNWRAP_PATTERNS+= *-config
-_UNWRAP_PATTERNS+= *Conf.sh
-_UNWRAP_PATTERNS+= *.pc
-_UNWRAP_PATTERNS_FIND= \
- \( ${_UNWRAP_PATTERNS:S/$/!/:S/^/-o -name !/:S/!/"/g:S/-o//1} \)
-UNWRAP_FILES?= # empty
-_UNWRAP_FILES= \
- ${UNWRAP_FILES} \
- `${FIND} . ${_UNWRAP_PATTERNS_FIND} -print | ${SED} -e 's|^\./||' | ${SORT} -u`
-_UNWRAP_SED?= # empty
-
-SUBST_CLASSES+= unwrap
-SUBST_STAGE.unwrap= post-build
-SUBST_MESSAGE.unwrap= "Unwrapping files-to-be-installed."
-SUBST_FILES.unwrap= ${_UNWRAP_FILES}
-SUBST_SED.unwrap= ${_UNWRAP_SED}
-.if defined(WRAPPER_DEBUG) && !empty(WRAPPER_DEBUG:M[yY][eE][sS])
-SUBST_POSTCMD.unwrap= ${DO_NADA}
-.endif
-
-.endif # !empty(PKG_PHASES:Mwrapper)
-###
-### END: after "wrapper" phase
-###
-
-do-wrapper: .OPTIONAL
diff --git a/mk/wrapper/buildcmd b/mk/wrapper/buildcmd
deleted file mode 100644
index 42fb3575857..00000000000
--- a/mk/wrapper/buildcmd
+++ /dev/null
@@ -1,75 +0,0 @@
-# $NetBSD: buildcmd,v 1.1 2004/09/21 15:01:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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
-######################################################################
-# Don't append empty arguments to the command line.
-######################################################################
-"")
- ;;
-######################################################################
-# Reduce command length by not appending options that we've already
-# seen. We also ensure that all of the -l options come after the -L
-# options, and suppress consecutive repeated libraries.
-######################################################################
--[DILR]*|-Wl,-R*|-Wl,-*,/*)
- case $cmd in
- *" "$arg|*" "$arg" "*)
- ;;
- *)
- shquote "$arg"; arg="$shquoted"
- cmd="$cmd $arg"
- ;;
- esac
- ;;
--l*)
- case $libs in
- *" "$arg)
- ;;
- *)
- shquote "$arg"; arg="$shquoted"
- libs="$libs $arg"
- ;;
- esac
- ;;
-######################################################################
-# Append $arg to $cmd to build up the command line to be executed.
-######################################################################
-*)
- shquote "$arg"; arg="$shquoted"
- cmd="$cmd $arg"
- ;;
-esac
diff --git a/mk/wrapper/cache-footer b/mk/wrapper/cache-footer
deleted file mode 100644
index 4af7e981975..00000000000
--- a/mk/wrapper/cache-footer
+++ /dev/null
@@ -1,38 +0,0 @@
-# $NetBSD: cache-footer,v 1.1 2004/09/21 15:01:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-*) cachehit=no ;;
-esac
diff --git a/mk/wrapper/cache-header b/mk/wrapper/cache-header
deleted file mode 100644
index fa4200e56b0..00000000000
--- a/mk/wrapper/cache-header
+++ /dev/null
@@ -1,37 +0,0 @@
-# $NetBSD: cache-header,v 1.1 2004/09/21 15:01:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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
diff --git a/mk/wrapper/cmd-sink b/mk/wrapper/cmd-sink
deleted file mode 100644
index 94f25d4ac63..00000000000
--- a/mk/wrapper/cmd-sink
+++ /dev/null
@@ -1,42 +0,0 @@
-# $NetBSD: cmd-sink,v 1.1 2004/09/21 15:01:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-# Empty out the command buffer and build up the command line in $cmd.
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink) pop: $arg"
- . $buildcmd
-done
diff --git a/mk/wrapper/cmd-sink-aix-cc b/mk/wrapper/cmd-sink-aix-cc
deleted file mode 100644
index 83e1c54b759..00000000000
--- a/mk/wrapper/cmd-sink-aix-cc
+++ /dev/null
@@ -1,87 +0,0 @@
-# $NetBSD: cmd-sink-aix-cc,v 1.1.2.3 2005/05/17 18:29:46 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.
-
-# Empty out the command buffer and build up the command line in $cmd.
-blibpath=
-dynamic=
-
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink-aix-cc) pop: $arg"
- case $arg in
- ##############################################################
- # AIX ld(1) doesn't support -Wl,-rpath,* but accumulate them
- # into a path collection we can later append to command line
- # using -blibpath.
- ##############################################################
- -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*)
- case $arg in
- -R*) R="-R" ;;
- -Wl,-R*) R="-Wl,-R" ;;
- -Wl,-rpath,*) R="-Wl,-rpath," ;;
- -Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
- -Wl,--rpath,*) R="-Wl,--rpath," ;;
- esac
- dir="${arg#$R}"
- case "$blibpath" in
- "") blibpath="$dir" ;;
- *) blibpath="$blibpath:$dir" ;;
- esac
- $debug_log $wrapperlog " (cmd-sink-aix-cc) drop: $dir [adding to blibpath]"
- dynamic=yes
- ;;
- *)
- . $buildcmd
- ;;
- esac
-done
-
-# AIX ld(1) uses -blibpath to set the runtime library search path.
-if $test -n "$blibpath"; then
- arg="-Wl,-blibpath:/lib:/usr/lib:$blibpath"
- $debug_log $wrapperlog " (cmd-sink-aix-cc) pop: $arg"
- . $buildcmd
-fi
-
-# If we are dynamically linking, make sure the runtime linker is used.
-if $test -n "$dynamic"; then
- arg=-Wl,-brtl
- $debug_log $wrapperlog " (cmd-sink-aix-cc) pop: $arg"
- . $buildcmd
- arg=-Wl,-bdynamic
- $debug_log $wrapperlog " (cmd-sink-aix-cc) pop: $arg"
- . $buildcmd
-fi
diff --git a/mk/wrapper/cmd-sink-aix-ld b/mk/wrapper/cmd-sink-aix-ld
deleted file mode 100644
index 68a4e41b0d1..00000000000
--- a/mk/wrapper/cmd-sink-aix-ld
+++ /dev/null
@@ -1,87 +0,0 @@
-# $NetBSD: cmd-sink-aix-ld,v 1.1.2.3 2005/05/17 18:29:46 tv Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-# Empty out the command buffer and build up the command line in $cmd.
-blibpath=
-dynamic=
-
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink-aix-ld) pop: $arg"
- case $arg in
- ##############################################################
- # AIX ld(1) doesn't support -Wl,-rpath,* but accumulate them
- # into a path collection we can later append to command line
- # using -blibpath.
- ##############################################################
- -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*)
- case $arg in
- -R*) R="-R" ;;
- -Wl,-R*) R="-Wl,-R" ;;
- -Wl,-rpath,*) R="-Wl,-rpath," ;;
- -Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
- -Wl,--rpath,*) R="-Wl,--rpath," ;;
- esac
- dir="${arg#$R}"
- case $blibpath in
- "") blibpath="$dir" ;;
- *) blibpath="$blibpath:$dir" ;;
- esac
- $debug_log $wrapperlog " (cmd-sink-aix-ld) drop: $dir [adding to blibpath]"
- dynamic=yes
- ;;
- *)
- . $buildcmd
- ;;
- esac
-done
-
-# AIX ld(1) uses -blibpath to set the runtime library search path.
-if $test -n "$blibpath"; then
- arg="-blibpath:/lib:/usr/lib:$blibpath"
- $debug_log $wrapperlog " (cmd-sink-aix-ld) pop: $arg"
- . $buildcmd
-fi
-
-# If we are dynamically linking, make sure the runtime linker is used.
-if $test -n "$dynamic"; then
- arg=-brtl
- $debug_log $wrapperlog " (cmd-sink-aix-ld) pop: $arg"
- . $buildcmd
- arg=-bdynamic
- $debug_log $wrapperlog " (cmd-sink-aix-ld) pop: $arg"
- . $buildcmd
-fi
diff --git a/mk/wrapper/cmd-sink-aix-xlc b/mk/wrapper/cmd-sink-aix-xlc
deleted file mode 100644
index cfcef9c3a9a..00000000000
--- a/mk/wrapper/cmd-sink-aix-xlc
+++ /dev/null
@@ -1,74 +0,0 @@
-# $NetBSD: cmd-sink-aix-xlc,v 1.1.2.1 2005/05/17 18:29:46 tv Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-# Empty out the command buffer and build up the command line in $cmd.
-blibpath=
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink-aix-xlc) pop: $arg"
- case $arg in
- ##############################################################
- # AIX xlC doesn't support -Wl,-rpath,* but accumulate them
- # into a path collection we can later append to comand line
- # using -blibpath.
- ##############################################################
- -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*)
- case $arg in
- -R*) R="-R" ;;
- -Wl,-R*) R="-Wl,-R" ;;
- -Wl,-rpath,*) R="-Wl,-rpath," ;;
- -Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
- -Wl,--rpath,*) R="-Wl,--rpath," ;;
- esac
- dir="${arg#$R}"
- case $blibpath in
- "") blibpath="$dir" ;;
- *) blibpath="$blibpath:$dir" ;;
- esac
- $debug_log $wrapperlog " (cmd-sink-aix-xlc) drop: $dir [adding to blibpath]"
- ;;
- *)
- . $buildcmd
- ;;
- esac
-done
-
-# AIX xlc uses -blibpath to set the runtime library search path.
-if $test -n "$blibpath"; then
- arg="-blibpath:$blibpath"
- $debug_log $wrapperlog " (cmd-sink-aix-xlc) pop: $arg"
- . $buildcmd
-fi
diff --git a/mk/wrapper/cmd-sink-darwin-xlc b/mk/wrapper/cmd-sink-darwin-xlc
deleted file mode 100644
index 54bef45f3ca..00000000000
--- a/mk/wrapper/cmd-sink-darwin-xlc
+++ /dev/null
@@ -1,59 +0,0 @@
-# $NetBSD: cmd-sink-darwin-xlc,v 1.1.2.2 2004/12/09 17:15:01 tv Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-# Empty out the command buffer and build up the command line in $cmd.
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink-darwin-xlc) pop: $arg"
- case $arg in
- ##############################################################
- # xlc doesn't support -install_name, -compatibility_version,
- # -current_version, so explicitly pass them to the linker with
- # the next argument.
- ##############################################################
- -install_name|-compatibility_version|-current_version)
- pop_queue cmdbuf arg2
- $debug_log $wrapperlog " (cmd-sink-darwin-xlc) pop: $arg2"
- $debug_log $wrapperlog " (cmd-sink-darwin-xlc) pre: -Wl,$arg2"
- prepend_queue cmdbuf "-Wl,$arg2"
- $debug_log $wrapperlog " (cmd-sink-darwin-xlc) pre: -Wl,$arg"
- prepend_queue cmdbuf "-Wl,$arg"
- ;;
- *)
- . $buildcmd
- ;;
- esac
-done
diff --git a/mk/wrapper/cmd-sink-icc-cc b/mk/wrapper/cmd-sink-icc-cc
deleted file mode 100644
index 12f139164ab..00000000000
--- a/mk/wrapper/cmd-sink-icc-cc
+++ /dev/null
@@ -1,59 +0,0 @@
-# $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/cmd-sink-icc81-cc b/mk/wrapper/cmd-sink-icc81-cc
deleted file mode 100644
index 7c66ddd156c..00000000000
--- a/mk/wrapper/cmd-sink-icc81-cc
+++ /dev/null
@@ -1,64 +0,0 @@
-# $NetBSD: cmd-sink-icc81-cc,v 1.2.2.2 2005/02/25 14:46:51 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=-i-static
-$debug_log $wrapperlog " (cmd-sink-icc81-cc) pop: $arg"
-. $buildcmd
-
-# Always link against the Intel provided C++ runtime library.
-arg=-cxxlib-icc
-$debug_log $wrapperlog " (cmd-sink-icc81-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-icc81-cc) pop: $arg $arg2 [drop]"
- ;;
-
- *)
- $debug_log $wrapperlog " (cmd-sink-icc81-cc) pop: $arg"
- . $buildcmd
- ;;
- esac
-done
diff --git a/mk/wrapper/cmd-sink-interix-gcc b/mk/wrapper/cmd-sink-interix-gcc
deleted file mode 100644
index 384a45da52c..00000000000
--- a/mk/wrapper/cmd-sink-interix-gcc
+++ /dev/null
@@ -1,50 +0,0 @@
-# $NetBSD: cmd-sink-interix-gcc,v 1.3.2.1 2005/02/11 15:27:57 tv Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-# Empty out the command buffer and build up the command line in $cmd.
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink-interix-gcc) pop: $arg"
- case $arg in
- -fpic|-fPIC|-pthread|-rdynamic)
- $echo "$0: Interix GNU cc doesn't support \`$arg'." 1>&2
- exit 1
- ;;
- *)
- . $buildcmd
- ;;
- esac
-done
diff --git a/mk/wrapper/cmd-sink-interix-ld b/mk/wrapper/cmd-sink-interix-ld
deleted file mode 100644
index b5d89e0eeb6..00000000000
--- a/mk/wrapper/cmd-sink-interix-ld
+++ /dev/null
@@ -1,50 +0,0 @@
-# $NetBSD: cmd-sink-interix-ld,v 1.2 2004/11/10 21:08:11 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-# Empty out the command buffer and build up the command line in $cmd.
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink-interix-ld) pop: $arg"
- case $arg in
- -shared|-Bshareable)
- $echo "$0: Interix GNU ld doesn't support \`$arg'." 1>&2
- exit 1
- ;;
- *)
- . $buildcmd
- ;;
- esac
-done
diff --git a/mk/wrapper/cmd-sink-ld b/mk/wrapper/cmd-sink-ld
deleted file mode 100644
index d260a9ea998..00000000000
--- a/mk/wrapper/cmd-sink-ld
+++ /dev/null
@@ -1,76 +0,0 @@
-# $NetBSD: cmd-sink-ld,v 1.2 2004/11/12 05:02:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-# Empty out the command buffer and build up the command line in $cmd.
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink-ld) pop: $arg"
- case $arg in
- ############################################################
- # Strip the "-Wl," from arguments that start with that prefix
- # and add the result to the "ld" cache. This makes "ld"
- # silently accept "-Wl,*" arguments, which are often a part
- # of the LDFLAGS setting in pkgsrc, and allows such LDFLAGS
- # to be shared between the compiler and the linker.
- ############################################################
- -Wl,*)
- list="${arg#-Wl,}"
- save_IFS="${IFS}"; IFS=","
- revlist=
- for opt in $list; do
- shquote "$opt"; opt="$shquoted"
- revlist="$opt $revlist"
- done
- IFS="${save_IFS}"
- for opt in $revlist; do
- $debug_log $wrapperlog " (cmd-sink-ld) pre: $opt"
- prepend_queue cmdbuf "$opt"
- done
- ;;
- ############################################################
- # Silently accept "-pthread" by dropping them. This allows
- # "-pthread" to be added to LDFLAGS for use by both the
- # compiler and the linker.
- ############################################################
- -pthread)
- $debug_log $wrapperlog " (cmd-sink-ld) drop: $arg"
- arg=
- ;;
- *)
- . $buildcmd
- ;;
- esac
-done
diff --git a/mk/wrapper/cmd-sink-osf1-cc b/mk/wrapper/cmd-sink-osf1-cc
deleted file mode 100644
index b67d1da838e..00000000000
--- a/mk/wrapper/cmd-sink-osf1-cc
+++ /dev/null
@@ -1,47 +0,0 @@
-# $NetBSD: cmd-sink-osf1-cc,v 1.1 2004/11/20 04:37:08 grant Exp $
-
-# Empty out the command buffer and build up the command line in $cmd.
-osf1runpath=
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink-osf1-cc) pop: $arg"
- case $arg in
- ##############################################################
- # OSF1 ld doesn't support multiple rpath parameters, accumulate
- # them into a single -rpath /path1:/path2:...:pathn
- ##############################################################
- -rpath)
- pop_queue cmdbuf dir
- case $osf1runpath in
- "") osf1runpath="$dir" ;;
- *) osf1runpath="$osf1runpath:$dir" ;;
- esac
- $debug_log $wrapperlog " (cmd-sink-osf1-cc) drop: $dir [adding to osf1runpath]"
- ;;
-
- -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*)
- case $arg in
- -R*) R="-R" ;;
- -Wl,-R*) R="-Wl,-R" ;;
- -Wl,-rpath,*) R="-Wl,-rpath," ;;
- -Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
- -Wl,--rpath,*) R="-Wl,--rpath," ;;
- esac
- dir="${arg#$R}"
- case $osf1runpath in
- "") osf1runpath="$dir" ;;
- *) osf1runpath="$osf1runpath:$dir" ;;
- esac
- $debug_log $wrapperlog " (cmd-sink-osf1-cc) drop: $dir [adding to osf1runpath]"
- ;;
- *)
- . $buildcmd
- ;;
- esac
-done
-
-if $test -n "$osf1runpath"; then
- arg="-Wl,-rpath,$osf1runpath"
- $debug_log $wrapperlog " (cmd-sink-osf1-cc) pop: $arg [aggregate]"
- . $buildcmd
-fi
diff --git a/mk/wrapper/cmd-sink-osf1-ld b/mk/wrapper/cmd-sink-osf1-ld
deleted file mode 100644
index 1dabe3a196f..00000000000
--- a/mk/wrapper/cmd-sink-osf1-ld
+++ /dev/null
@@ -1,54 +0,0 @@
-# $NetBSD: cmd-sink-osf1-ld,v 1.1 2004/11/20 04:37:08 grant Exp $
-
-# Empty out the command buffer and build up the command line in $cmd.
-osf1runpath=
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink-osf1-ld) pop: $arg"
- case $arg in
- ##############################################################
- # OSF1 ld doesn't support multiple rpath parameters, accumulate
- # them into a single -rpath /path1:/path2:...:pathn
- ##############################################################
- -rpath)
- pop_queue cmdbuf dir
- case $osf1runpath in
- "") osf1runpath="$dir" ;;
- *) osf1runpath="$osf1runpath:$dir" ;;
- esac
- $debug_log $wrapperlog " (cmd-sink-osf1-ld) drop: $dir [adding to osf1runpath]"
- ;;
- -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*)
- case $arg in
- -R*) R="-R" ;;
- -Wl,-R*) R="-Wl,-R" ;;
- -Wl,-rpath,*) R="-Wl,-rpath," ;;
- -Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
- -Wl,--rpath,*) R="-Wl,--rpath," ;;
- esac
- dir="${arg#$R}"
- case $osf1runpath in
- "") osf1runpath="$dir" ;;
- *) osf1runpath="$osf1runpath:$dir" ;;
- esac
- $debug_log $wrapperlog " (cmd-sink-osf1-ld) drop: $dir [adding to osf1runpath]"
- ;;
- -pthread)
- arg="-lpthread"
- $debug_log $wrapperlog " (cmd-sink-osf1-ld) pop: $arg"
- . $buildcmd
- ;;
- *)
- . $buildcmd
- ;;
- esac
-done
-
-if $test -n "$osf1runpath"; then
- arg=-rpath
- $debug_log $wrapperlog " (cmd-sink-osf1-ld) pop: $arg"
- . $buildcmd
- arg=$osf1runpath
- $debug_log $wrapperlog " (cmd-sink-osf1-ld) pop: $arg [aggregate]"
- . $buildcmd
-fi
diff --git a/mk/wrapper/cmd-sink-unixware-gcc b/mk/wrapper/cmd-sink-unixware-gcc
deleted file mode 100644
index 9e96dbf6278..00000000000
--- a/mk/wrapper/cmd-sink-unixware-gcc
+++ /dev/null
@@ -1,72 +0,0 @@
-# $NetBSD: cmd-sink-unixware-gcc,v 1.1 2004/09/21 15:01:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-# Empty out the command buffer and build up the command line in $cmd.
-ldrunpath=
-while ! queue_is_empty cmdbuf; do
- pop_queue cmdbuf arg
- $debug_log $wrapperlog " (cmd-sink-unixware-gcc) pop: $arg"
- case $arg in
- ##############################################################
- # UnixWare's GCC doesn't support -Wl,-rpath,* but accumulate
- # them into LD_RUN_PATH to set in the environment.
- ##############################################################
- -R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*)
- case $arg in
- -R*) R="-R" ;;
- -Wl,-R*) R="-Wl,-R" ;;
- -Wl,-rpath,*) R="-Wl,-rpath," ;;
- -Wl,-rpath-link,*) R="-Wl,-rpath-link," ;;
- -Wl,--rpath,*) R="-Wl,--rpath," ;;
- esac
- dir="${arg#$R}"
- case $ldrunpath in
- "") ldrunpath="$dir" ;;
- *) ldrunpath="$ldrunpath:$dir" ;;
- esac
- $debug_log $wrapperlog " (cmd-sink-unixware-gcc) drop: $dir [adding to LD_RUN_PATH]"
- arg=
- ;;
- *)
- . $buildcmd
- ;;
- esac
-done
-
-if $test -n "$ldrunpath"; then
- $debug_log $wrapperlog " (cmd-sink-unixware-gcc) LD_RUN_PATH=\"$ldrunpath\""
- LD_RUN_PATH="$ldrunpath"; export LD_RUN_PATH
-fi
diff --git a/mk/wrapper/gen-reorder.sh b/mk/wrapper/gen-reorder.sh
deleted file mode 100644
index 4b2fe2bee84..00000000000
--- a/mk/wrapper/gen-reorder.sh
+++ /dev/null
@@ -1,142 +0,0 @@
-#! @WRAPPER_SHELL@
-#
-# $NetBSD: gen-reorder.sh,v 1.1 2004/09/21 15:01:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-shell_lib="@_WRAP_SHELL_LIB@"
-wrapperlog="${WRAPPER_LOG-@_WRAP_LOG@}"
-debug="${WRAPPER_DEBUG-no}"
-
-cat="@CAT@"
-
-. $shell_lib
-
-case $debug in
-yes) debug_log="msg_log" ;;
-*) debug_log=":" ;;
-esac
-
-######################################################################
-# gen reorder:l:foo:bar
-# Outputs a branch of a shell case statement that reorders
-# libs to ensure that "-lfoo" occurs before "-lbar".
-######################################################################
-gen() {
- save_IFS="${IFS}"; IFS=":"
- set -- $1
- IFS="${save_IFS}"
- _cmd="$1"; shift
- case $_cmd in
- reorder)
- $debug_log $wrapperlog " (gen-reorder) $_cmd: $@"
- case $1 in
- l)
- $cat << EOF
- # -l$2 comes before -l$3
- -l$2)
- case "\${_libs}" in
- -l$3|-l$3" "*)
- _libs="\$l \${_libs}"
- ;;
- *" "-l$3)
- _libs="\${_libs%%-l$3}\$l -l$3"
- ;;
- *" "-l$3" "*)
- _libs="\${_libs%% -l$3 *} \$l -l$3 \${_libs#* -l$3 }"
- ;;
- *)
- _libs="\${_libs} \$l"
- ;;
- esac
- ;;
-EOF
- ;;
- esac
- ;;
- *)
- $debug_log $wrapperlog " (gen-reorder) $_cmd: $@ [unknown]"
- ;;
- esac
-}
-
-######################################################################
-# Header for reorder script
-######################################################################
-$cat << 'EOF'
-msg_log $wrapperlog "==> Reordering libraries: $libs"
-prevlibs=
-while $test "$libs" != "$prevlibs"; do
- _libs=
- for l in $libs; do
- case $l in
-EOF
-
-######################################################################
-# Generate body for reorder script.
-######################################################################
-for arg do
- gen "$arg"
-done
-
-######################################################################
-# Footer for reorder script
-######################################################################
-$cat << 'EOF'
- *)
- _libs="${_libs} $l"
- ;;
- esac
- _libs="${_libs# }"
- _libs="${_libs% }"
- done
- prevlibs="$libs"
- libs="${_libs}"
-done
-
-# This section suppresses duplicate libraries in sequence.
-_libs=
-for l in $libs; do
- case "${_libs}" in
- $l|*" "$l) ;;
- *) _libs="${_libs} $l" ;;
- esac
-done
-_libs="${_libs# }"
-_libs="${_libs% }"
-libs="${_libs}"
-EOF
-
-exit 0
diff --git a/mk/wrapper/gen-transform.sh b/mk/wrapper/gen-transform.sh
deleted file mode 100644
index f11a0fb2c67..00000000000
--- a/mk/wrapper/gen-transform.sh
+++ /dev/null
@@ -1,451 +0,0 @@
-#! @WRAPPER_SHELL@
-#
-# $NetBSD: gen-transform.sh,v 1.7 2004/11/09 17:16:16 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-shell_lib="@_WRAP_SHELL_LIB@"
-wrapperlog="${WRAPPER_LOG-@_WRAP_LOG@}"
-debug="${WRAPPER_DEBUG-no}"
-
-cat="@CAT@"
-test="@TEST@"
-
-. $shell_lib
-
-case $debug in
-yes) debug_log="msg_log" ;;
-*) debug_log=":" ;;
-esac
-
-rpath_options="-Wl,--rpath, -Wl,-rpath-link, -Wl,-rpath, -Wl,-R -R"
-
-######################################################################
-# gen action arg
-# Outputs sed commands that correspond to $action for $arg. The
-# "transform" action pertains to transforming command-line options,
-# while the "untransform" action pertains to unwrapping *-config
-# files, *.pc files, and *.lai (to-be-installed libtool archive)
-# files.
-######################################################################
-gen()
-{
- _sep=" \`\"':;,"
-
- _action=$1; shift
- save_IFS="${IFS}"; IFS=":"
- set -- $1
- IFS="${save_IFS}"
- _cmd="$1"; shift
-
- case $_cmd in
- ###############################################################
- # depot:src:dst
- # Change "src/<dir>/*" into "dst/*", and the same in -I and
- # -L options.
- ###############################################################
- depot)
- gen $_action "opt-depot:$1:$2"
- gen $_action "opt-depot:-I$1:-I$2"
- gen $_action "opt-depot:-L$1:-L$2"
- ;;
- ###############################################################
- # I:src:dst
- # Change "src" into "dst" and "src/*" into "dst/*" in -I
- # options for transform, and back for untransform.
- ###############################################################
- I)
- case $_action in
- transform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "opt:-I$1:-I$2"
- gen $_action "opt-sub:-I$1:-I$2"
- ;;
- untransform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "opt:-I$2:-I$1"
- gen $_action "opt-sub:-I$2:-I$1"
- ;;
- esac
- ;;
- ###############################################################
- # L:src:dst
- # Change "src" into "dst" and "src/*" into "dst/*" in -L
- # options for transform, and back for untransform.
- ###############################################################
- L)
- case $_action in
- transform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "opt:-L$1:-L$2"
- gen $_action "opt-sub:-L$1:-L$2"
- ;;
- untransform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "opt:-L$2:-L$1"
- gen $_action "opt-sub:-L$2:-L$1"
- ;;
- esac
- ;;
- ###############################################################
- # l:foo:bar[:baz1...]
- # Change "-lfoo" into "-lbar [-lbaz...]"
- ###############################################################
- l)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- tolibs=
- fromlib="-l$1"; shift
- while $test $# -gt 0; do
- case $1 in
- "") ;;
- *) case $tolibs in
- "") tolibs="-l$1" ;;
- *) tolibs="$tolibs -l$1" ;;
- esac
- ;;
- esac
- shift
- done
- gen $_action "opt:$fromlib:$tolibs"
- ;;
- ##############################################################
- # libpath:src:dst
- # Change "src/*/libfoo.{a,la}" into "dst/*/libfoo.{a,la}".
- ##############################################################
- libpath)
- case $_action in
- transform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- $cat << EOF
-s|^$1\(/[^$_sep]*\.la[$_sep]\)|$2\1|g
-s|^$1\(/[^$_sep]*\.la\)$|$2\1|g
-EOF
- ;;
- untransform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- $cat << EOF
-s|\([$_sep]\)$1\(/[^$_sep]*\.la[$_sep]\)|\1$2\2|g
-s|\([$_sep]\)$1\(/[^$_sep]*\.la[$_sep]\)|\1$2\2|g
-s|\([$_sep]\)$1\(/[^$_sep]*\.la\)$|\1$2\2|g
-s|^$1\(/[^$_sep]*\.la[$_sep]\)|$2\1|g
-s|^$1\(/[^$_sep]*\.la\)$|$2\1|g
-EOF
- ;;
- esac
- ;;
- ##############################################################
- # mangle:src:dst
- # Change "src" into "dst" and "src/*" into "dst/*" in -I,
- # -L, and rpath options, and also in full paths to
- # libraries.
- ##############################################################
- mangle)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- #gen $_action "opt:$1:$2"
- gen $_action "opt:-I$1:-I$2"
- gen $_action "opt:-L$1:-L$2"
- gen $_action "rpath-exact:$1:$2"
- gen $_action "sub-mangle:$1:$2"
- ;;
- ##############################################################
- # no-abspath
- # Remove all "dash" options that contain an absolute path.
- ##############################################################
- no-abspath)
- $debug_log $wrapperlog " (gen-transform) $_cmd"
- gen $_action "rm-optarg:-I/"
- gen $_action "rm-optarg:-L/"
- for _R in $rpath_options; do
- gen $_action "rm-optarg:$_R/"
- done
- ;;
- ##############################################################
- # no-rpath
- # Removes rpath options.
- ##############################################################
- no-rpath)
- $debug_log $wrapperlog " (gen-transform) $_cmd"
- gen $_action rm-optarg:-Wl,--rpath,
- gen $_action rm-optarg:-Wl,-rpath-link,
- gen $_action rm-optarg:-Wl,-rpath,
- gen $_action rm-optarg:-Wl,-R
- gen $_action rm-optarg:-R
- ;;
- ##############################################################
- # opt:src:dst
- # Change "src" into "dst", where "src" matches the whole
- # option.
- ##############################################################
- opt)
- case $_action in
- transform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- $cat << EOF
-s|^$1\([$_sep]\)|$2\1|g
-s|^$1$|$2|g
-EOF
- ;;
- untransform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- $cat << EOF
-s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g
-s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g
-s|\([$_sep]\)$1$|\1$2|g
-s|^$1\([$_sep]\)|$2\1|g
-s|^$1$|$2|g
-EOF
- ;;
- esac
- ;;
- ###############################################################
- # opt-depot:src:dst
- # Change "src/<dir>/*" into "dst/*".
- ###############################################################
- opt-depot)
- case $_action in
- transform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- $cat << EOF
-s|^$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|$2\1|g
-s|^$1/[^/$_sep]*\(/[^$_sep]*\)$|$2\1|g
-EOF
- ;;
- untransform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- $cat << EOF
-s|\([$_sep]\)$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|\1$2\2|g
-s|\([$_sep]\)$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|\1$2\2|g
-s|\([$_sep]\)$1/[^/$_sep]*\(/[^$_sep]*\)$|\1$2\2|g
-s|^$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|$2\1|g
-s|^$1/[^/$_sep]*\(/[^$_sep]*\)$|$2\1|g
-EOF
- ;;
- esac
- ;;
- ##############################################################
- # opt-sub:src:dst
- # Change "src/*" into "dst/*".
- ##############################################################
- opt-sub)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "opt-sub-trailer:$1::$2:"
- ;;
- ##############################################################
- # opt-sub-trailer:src:src_trailer:dst:dst_trailer
- # Change "src/*src_trailer" into "dst/*dst_trailer",
- # where "src/*" matches "src" plus subdirectories.
- ##############################################################
- opt-sub-trailer)
- case $_action in
- transform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- $cat << EOF
-s|^$1\(/[^$_sep]*\)$2\([$_sep]\)|$3\1$4|g
-s|^$1\(/[^$_sep]*\)$2$|$3\1$4|g
-EOF
- ;;
- untransform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- $cat << EOF
-s|\([$_sep]\)$1\(/[^$_sep]*\)$2\([$_sep]\)|\1$3\2$4\3|g
-s|\([$_sep]\)$1\(/[^$_sep]*\)$2\([$_sep]\)|\1$3\2$4\3|g
-s|\([$_sep]\)$1\(/[^$_sep]*\)$2$|\1$3\2$4|g
-s|^$1\(/[^$_sep]*\)$2\([$_sep]\)|$3\1$4|g
-s|^$1\(/[^$_sep]*\)$2$|$3\1$4|g
-EOF
- ;;
- esac
- ;;
- ##############################################################
- # P:src:dst
- # Change "src/*/libfoo.{a,la}" into "dst/*/libfoo.{a,la}"
- # for transform, and back for untransform.
- ##############################################################
- P)
- case $_action in
- transform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "libpath:$1:$2"
- ;;
- untransform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "libpath:$2:$1"
- ;;
- esac
- ;;
- ##############################################################
- # rename:src:dst
- # Synonym for "opt:src:dst".
- ##############################################################
- rename)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "opt:$1:$2"
- ;;
- ##############################################################
- # rm:opt
- # Remove "opt", where "opt" matches the entire option.
- ##############################################################
- rm)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "opt:$1:"
- ;;
- ##############################################################
- # rm-optarg:opt
- # Remove "opt" and any argument of that option where the
- # two are combined in one word.
- ##############################################################
- rm-optarg)
- case $_action in
- transform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- $cat << EOF
-s|^$1[^$_sep]*\([$_sep]\)|\1|g
-s|^$1[^$_sep]*$||g
-EOF
- ;;
- untransform)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- $cat << EOF
-s|\([$_sep]\)$1[^$_sep]*\([$_sep]\)|\1\2|g
-s|\([$_sep]\)$1[^$_sep]*\([$_sep]\)|\1\2|g
-s|\([$_sep]\)$1[^$_sep]*$|\1|g
-s|^$1[^$_sep]*\([$_sep]\)|\1|g
-s|^$1[^$_sep]*$||g
-EOF
- ;;
- esac
- ;;
- ##############################################################
- # rmdir:dir
- # Remove all "dash" options that contain "dir" or "dir/*".
- ##############################################################
- rmdir)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "opt:-I$1:"
- gen $_action "rm-optarg:-I$1/"
- gen $_action "opt:-L$1:"
- gen $_action "rm-optarg:-L$1/"
- for _R in $rpath_options; do
- gen $_action "opt:$_R$1:"
- gen $_action "rm-optarg:$_R$1/"
- done
- ;;
- ##############################################################
- # rpath:src:dst
- # Change "src" into "dst" and "src/*" into "dst/*" in rpath
- # options.
- ##############################################################
- rpath)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "rpath-exact:$1:$2"
- gen $_action "sub-rpath:$1:$2"
- ;;
- ##############################################################
- # rpath-exact:src:dst
- # Change "src" into "dst" in rpath options.
- ##############################################################
- rpath-exact)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- for _R in $rpath_options; do
- gen $_action "opt:$_R$1:$_R$2"
- done
- ;;
- ##############################################################
- # strip-slashdot:dir
- # Change "dir/." into "dir" and the same in -I, -L, and
- # rpath options.
- ##############################################################
- strip-slashdot)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- gen $_action "opt-sub-trailer:$1:/\.:$1:"
- gen $_action "opt-sub-trailer:-I$1:/\.:-I$1:"
- gen $_action "opt-sub-trailer:-L$1:/\.:-L$1:"
- for _R in $rpath_options; do
- gen $_action "opt-sub-trailer:$_R$1:/\.:$_R$1:"
- done
- ;;
- ##############################################################
- # sub-mangle:src:dst
- # Change "src/*" into "dst/*" in -I, -L, and rpath
- # options, and also in full paths to libraries.
- ##############################################################
- sub-mangle)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- #gen $_action "opt-sub:$1:$2"
- gen $_action "libpath:$1:$2"
- gen $_action "opt-sub:-I$1:-I$2"
- gen $_action "opt-sub:-L$1:-L$2"
- gen $_action "sub-rpath:$1:$2"
- ;;
- ##############################################################
- # sub-rpath:src:dst
- # Change "src/*" into "dst/*" in rpath options.
- ##############################################################
- sub-rpath)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
- for _R in $rpath_options; do
- gen $_action "opt-sub:$_R$1:$_R$2"
- done
- ;;
- ##############################################################
- # Everything else is ignored.
- ##############################################################
- *)
- $debug_log $wrapperlog " (gen-transform) $_cmd: $@ [unknown]"
- ;;
- esac
-}
-
-######################################################################
-# Generate sed script.
-######################################################################
-action="$1"; shift
-for arg do
- case $arg in
- transform:*)
- case $action in
- transform) gen $action "${arg#transform:}" ;;
- esac
- ;;
- untransform:*)
- case $action in
- untransform) gen $action "${arg#untransform:}" ;;
- esac
- ;;
- *)
- gen $action "$arg"
- ;;
- esac
-done
diff --git a/mk/wrapper/logic b/mk/wrapper/logic
deleted file mode 100644
index 0f14e164b3d..00000000000
--- a/mk/wrapper/logic
+++ /dev/null
@@ -1,173 +0,0 @@
-# $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.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-# Empty out the argument buffer and fill up the command buffer.
-skipargs=0
-while ! queue_is_empty argbuf; do
- #
- # Grab the next argument from the head of the argument buffer
- # and return it in $arg.
- #
- argok=no
- while $test "$argok" = "no"; do
- if queue_is_empty argbuf; then
- argok=yes
- continue
- fi
- pop_queue argbuf arg
- $debug_log $wrapperlog " (logic) pop: $arg"
- #
- # Toggle whether we want to transform $arg or if we
- # want to pass it unmodified into the command buffer.
- #
- if $test $skipargs -eq 0; then
- do_transform=yes
- else
- skipargs=`$expr $skipargs - 1`
- do_transform=no
- argok=yes
- continue
- fi
- argmatch=no
- . $arg_pp_main
- case $argmatch in
- yes) continue ;;
- esac
- . $arg_pp
- case $argmatch in
- yes) continue ;;
- esac
- argok=yes
- done
- #
- # Try to look up the transformed $arg in the cache, but if
- # not there, then apply the transformations and save the result
- # in the cache.
- #
- case $do_transform in
- yes)
- . $cache
- case $cachehit in
- yes)
- # The cache was hit and $arg is set.
- $debug_log $wrapperlog " (logic) to: $arg [cached]"
- ;;
- *)
- # Apply transformations to $arg.
- addtocache=no
- split_arg=no
- case $skip_transform in
- yes)
- $debug_log $wrapperlog " (logic) to: $arg [untransformed]"
- ;;
- *)
- shquote "$arg"; cachearg="$shquoted"
- case $arg in
- -*|/*)
- case $transform_sed in
- "") ;;
- *)
- arg=`$echo "X$arg" | $Xsed $transform_sed`
- $debug_log $wrapperlog " (logic) to: $arg"
- addtocache=yes
- ;;
- esac
- ;;
- *)
- $debug_log $wrapperlog " (logic) to: $arg [untransformed]"
- ;;
- esac
-
- # Apply wrapper-specific transformations
- # to $arg.
- #
- . $transform
- ;;
- esac
-
- ##############################################
- # Split all -l options along whitespace. This
- # disallows library names with whitespace, but it
- # allows us to handle transformations that look
- # like, e.g. "-lreadline" -> "-ledit -ltermcap".
- ##############################################
- case $arg in
- -l*) split_arg=yes ;;
- esac
-
- # Re-create the cache file if we're adding to it.
- case $updatecache,$addtocache in
- yes,yes)
- shquote "$arg"; cachedarg="$shquoted"
- $cat >> $cache_body << EOF
-$cachearg) arg=$cachedarg; split_arg=$split_arg; cachehit=yes ;;
-EOF
- $cat $cache_header \
- $cache_body \
- $cache_footer > $cache
- ;;
- esac
- ;;
- esac
-
- case $split_arg in
- ######################################################
- # Split some options along whitespace. This disallows
- # options that contain whitespace, but it allows us to
- # handle transformations that transform one arg into
- # several.
- ######################################################
- yes)
- for i in $arg; do
- append_queue cmdbuf "$i"
- $debug_log $wrapperlog " (logic) push: $i [split]"
- done
- ;;
- ######################################################
- # Everything else goes into the command buffer unchanged.
- ######################################################
- no)
- append_queue cmdbuf "$arg"
- $debug_log $wrapperlog " (logic) push: $arg"
- ;;
- esac
- ;;
- *)
- append_queue cmdbuf "$arg"
- $debug_log $wrapperlog " (logic) push: $arg [skipped]"
- ;;
- esac
-done
diff --git a/mk/wrapper/scan b/mk/wrapper/scan
deleted file mode 100644
index dcb5fb1b11f..00000000000
--- a/mk/wrapper/scan
+++ /dev/null
@@ -1,44 +0,0 @@
-# $NetBSD: scan,v 1.1 2004/10/04 20:28:30 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-#
-
-# Don't append extra arguments if "-v" is passed to the command.
-for arg do
- case $arg in
- -v) append_extra_args=no; break ;;
- *) ;;
- esac
-done
diff --git a/mk/wrapper/transform-aix-cc b/mk/wrapper/transform-aix-cc
deleted file mode 100644
index 8de02fa38f6..00000000000
--- a/mk/wrapper/transform-aix-cc
+++ /dev/null
@@ -1,52 +0,0 @@
-# $NetBSD: transform-aix-cc,v 1.1.2.2 2005/02/25 14:46:51 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.
-
-# prepend -Wl, to linker arguments commonly passed to the compiler.
-case $arg in
--H[0-9]*|-T[0-9]*|-b*)
- arg=-Wl,$arg
- msg_log $wrapperlog " (transform-aix-cc) to: $arg"
- addtocache=yes
- ;;
-# AIX ld(1) uses -G to create shared libraries, and we must make sure
-# the runtime linker is used.
--shared)
- arg="-Wl,-G -Wl,-brtl"
- msg_log $wrapperlog " (transform-aix-cc) to: $arg"
- addtocache=yes
- split_arg=yes
- ;;
-esac
diff --git a/mk/wrapper/transform-ccc-cc b/mk/wrapper/transform-ccc-cc
deleted file mode 100644
index e7e055d2ddc..00000000000
--- a/mk/wrapper/transform-ccc-cc
+++ /dev/null
@@ -1,32 +0,0 @@
-# $NetBSD: transform-ccc-cc,v 1.1 2004/11/20 04:37:08 grant Exp $
-#
-
-case $arg in
-######################################################################
-# Directories for the runtime library search path are passed via
-# "-Wl,-rpath,<dir>", not "-Wl,-R<dir>".
-######################################################################
--Wl,-R*)
- arg="-Wl,-rpath,${arg#-Wl,-R}"
- msg_log $wrapperlog " (transform-ccc-cc) to: $arg"
- addtocache=yes
- ;;
--W[LlSc],*)
- addtocache=yes
- ;;
--W*)
- arg=
- msg_log $wrapperlog " (transform-ccc-cc) to: $arg"
- addtocache=yes
- ;;
--mieee)
- arg="-ieee"
- msg_log $wrapperlog " (transform-ccc-cc) to: $arg"
- addtocache=yes
- ;;
--g)
- arg="-g3"
- msg_log $wrapperlog " (transform-ccc-cc) to: $arg"
- addtocache=yes
- ;;
-esac
diff --git a/mk/wrapper/transform-icc-cc b/mk/wrapper/transform-icc-cc
deleted file mode 100644
index 72817732193..00000000000
--- a/mk/wrapper/transform-icc-cc
+++ /dev/null
@@ -1,68 +0,0 @@
-# $NetBSD: transform-icc-cc,v 1.2.2.3 2005/02/25 14:46:51 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.
-######################################################################
--fexceptions|-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
diff --git a/mk/wrapper/transform-mipspro-cc b/mk/wrapper/transform-mipspro-cc
deleted file mode 100644
index f2e553dd9bd..00000000000
--- a/mk/wrapper/transform-mipspro-cc
+++ /dev/null
@@ -1,78 +0,0 @@
-# $NetBSD: transform-mipspro-cc,v 1.1 2004/09/21 15:01:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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
-######################################################################
-# MIPSpro can handle -O[123] and -Ofast[=platform], so just pass them
-# on through.
-######################################################################
--O[123]|-Ofast|-Ofast=*)
- addtocache=yes
- ;;
-######################################################################
-# Ignore all other -O* options.
-######################################################################
--O*)
- arg=
- msg_log $wrapperlog " (transform-mipspro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# Directories for the runtime library search path are passed via
-# "-Wl,-rpath,<dir>", not "-Wl,-R<dir>".
-######################################################################
--Wl,-R*)
- arg="-Wl,-rpath,${arg#-Wl,-R}"
- msg_log $wrapperlog " (transform-mipspro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# The MIPSpro compiler accepts these -W* directives, so just pass them
-# on through.
-######################################################################
--W[ablfpR]*,*)
- addtocache=yes
- ;;
-######################################################################
-# Ignore all of the other -W* directives, which are likely to be
-# GCCisms.
-######################################################################
--W*)
- arg=
- msg_log $wrapperlog " (transform-mipspro-cc) to: $arg"
- addtocache=yes
- ;;
-esac
diff --git a/mk/wrapper/transform-mipspro-ucode-cc b/mk/wrapper/transform-mipspro-ucode-cc
deleted file mode 100644
index 4243eb7d1ad..00000000000
--- a/mk/wrapper/transform-mipspro-ucode-cc
+++ /dev/null
@@ -1,84 +0,0 @@
-# $NetBSD: transform-mipspro-ucode-cc,v 1.1 2004/09/21 15:01:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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
-######################################################################
-# MIPSpro can handle -O[0123] so just pass them on through.
-######################################################################
--O[0123])
- addtocache=yes
- ;;
-######################################################################
-# Ignore all other -O* options.
-######################################################################
--O*)
- arg=
- msg_log $wrapperlog " (transform-mipspro-ucode-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# Directories for the runtime library search path are passed via
-# "-Wl,-rpath,<dir>", not "-Wl,-R<dir>".
-######################################################################
--Wl,-R*)
- arg="-Wl,-rpath,${arg#-Wl,-R}"
- msg_log $wrapperlog " (transform-mipspro-ucode-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# The MIPSpro compiler accepts -Wl,* so just pass it on through.
-######################################################################
--Wl,*)
- addtocache=yes
- ;;
-######################################################################
-# Ignore all of the other -W* directives, which are likely to be
-# GCCisms.
-######################################################################
--W*)
- arg=
- msg_log $wrapperlog " (transform-mipspro-ucode-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# The MIPSpro compiler uses -KPIC to create position independent code.
-######################################################################
--f[Pp][Ii][Cc])
- arg="-KPIC"
- msg_log $wrapperlog " (transform-mipspro-ucode-cc) to: $arg"
- addtocache=yes
- ;;
-esac
diff --git a/mk/wrapper/transform-sunpro-cc b/mk/wrapper/transform-sunpro-cc
deleted file mode 100644
index 44bd5b80b27..00000000000
--- a/mk/wrapper/transform-sunpro-cc
+++ /dev/null
@@ -1,121 +0,0 @@
-# $NetBSD: transform-sunpro-cc,v 1.2 2004/11/10 16:20:40 sketch Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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
-######################################################################
-# SunPro can handle -xO<n> (n={1|2|3|4|5}), so optimistically convert
-# those GCC -O<n> values to -xO<n>.
-######################################################################
--O[12345])
- arg="-xO${arg#-O}"
- msg_log $wrapperlog " (transform-sunpro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# Silently ignore all other -O* options, except for "-O", which SunPro
-# interprets as asking for the default optimization level.
-######################################################################
--O?*)
- arg=
- msg_log $wrapperlog " (transform-sunpro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# Directories for the runtime library search path are passed via simply
-# "-R<dir>", not "-Wl,-R<dir>".
-######################################################################
--Wl,-R*)
- arg="${arg#-Wl,}"
- msg_log $wrapperlog " (transform-sunpro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# SunPro compiler accepts -Wl,* so just pass it on through.
-######################################################################
--Wl,*)
- addtocache=yes
- ;;
-######################################################################
-# SunPro compilers don't understand any other -W* arguments, so just
-# silently ignore the rest.
-######################################################################
--W*)
- arg=
- msg_log $wrapperlog " (transform-sunpro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# Solaris' linker uses -Bstatic to create static objects.
-######################################################################
--static)
- arg="-Bstatic"
- msg_log $wrapperlog " (transform-sunpro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# Solaris' linker uses -G to create shared objects.
-######################################################################
---export-dynamic|-shared)
- arg="-G"
- msg_log $wrapperlog " (transform-sunpro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# SunPro uses -Kpic to create position independent code.
-######################################################################
--f[Pp][Ii][Cc])
- arg="-Kpic"
- msg_log $wrapperlog " (transform-sunpro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# SunPro doesn't understand -pthread, and only -lpthread is needed on
-# Solaris.
-######################################################################
--pthread)
- arg="-lpthread"
- msg_log $wrapperlog " (transform-sunpro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# Ignore some flags that are unnecessary for SunPro.
-######################################################################
--ansi|-fno-gnu-keywords|-fstrict-prototypes|-pedantic)
- arg=
- msg_log $wrapperlog " (transform-sunpro-cc) to: $arg"
- addtocache=yes
- ;;
-esac
diff --git a/mk/wrapper/transform-xlc-cc b/mk/wrapper/transform-xlc-cc
deleted file mode 100644
index ceab5093287..00000000000
--- a/mk/wrapper/transform-xlc-cc
+++ /dev/null
@@ -1,75 +0,0 @@
-# $NetBSD: transform-xlc-cc,v 1.1.2.2 2004/12/20 20:46:00 tv Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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
-######################################################################
-# Leave -Wl, unchanged.
-######################################################################
--Wl,*)
- ;;
-######################################################################
-# XL C doesn't understand many -W* arguments, so just silently ignore
-# them all.
-######################################################################
--W*)
- arg=
- msg_log $wrapperlog " (transform-xlc-cc) to: $arg"
- addtocache=yes
- ;;
-# xlc uses -qmkshrobj to create shared objects, and we also need to
-# tell the linker to use a flat namespace and allow undefined symbols.
--dynamiclib)
- arg="-qmkshrobj -Wl,-flat_namespace -Wl,-undefined -Wl,suppress"
- msg_log $wrapperlog " (transform-xlc-cc) to: $arg"
- addtocache=yes
- split_arg=yes
- ;;
-# -qnocommon is the xlc argument to allocate uninitialized globals in
-# the data section for PIC.
--fno-common|-fPIC)
- arg=-qnocommon
- msg_log $wrapperlog " (transform-xlc-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
-# Ignore some flags that are unnecessary for XL C.
-######################################################################
--pipe|-ansi|-fno-gnu-keywords|-fstrict-prototypes|-no-cpp-precomp|-pedantic)
- arg=
- msg_log $wrapperlog " (transform-xlc-cc) to: $arg"
- addtocache=yes
- ;;
-esac
diff --git a/mk/wrapper/wrapper-defs.mk b/mk/wrapper/wrapper-defs.mk
deleted file mode 100644
index 4b98b0ef7e3..00000000000
--- a/mk/wrapper/wrapper-defs.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-# $NetBSD: wrapper-defs.mk,v 1.1 2004/09/27 12:05:53 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-.if !defined(WRAPPER_DEFS_MK)
-WRAPPER_DEFS_MK= defined
-
-WRAPPER_DIR= ${WRKDIR}/.wrapper
-WRAPPER_BINDIR= ${WRAPPER_DIR}/bin
-WRAPPER_TMPDIR= ${WRAPPER_DIR}/tmp
-WRAPPER_SRCDIR= ${.CURDIR}/../../mk/wrapper
-WRAPPER_SHELL= ${SH}
-
-.endif # WRAPPER_DEFS_MK
diff --git a/mk/wrapper/wrapper.sh b/mk/wrapper/wrapper.sh
deleted file mode 100644
index 4793dcdcdfd..00000000000
--- a/mk/wrapper/wrapper.sh
+++ /dev/null
@@ -1,120 +0,0 @@
-#! @WRAPPER_SHELL@
-#
-# $NetBSD: wrapper.sh,v 1.4.2.2 2005/01/24 18:40:01 tv Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# 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.
-
-@BUILD_ENV@
-arg_pp="@_WRAP_ARG_PP@"
-arg_pp_main="@_WRAP_ARG_PP_MAIN@"
-arg_source="@_WRAP_ARG_SOURCE@"
-buildcmd="@_WRAP_BUILDCMD@"
-cache="@_WRAP_CACHE@"
-cache_header="@_WRAP_CACHE_HEADER@"
-cache_body="@_WRAP_CACHE_BODY@"
-cache_footer="@_WRAP_CACHE_FOOTER@"
-cleanup="@_WRAP_CLEANUP@"
-cmd_sink="@_WRAP_CMD_SINK@"
-logic="@_WRAP_LOGIC@"
-reorderlibs="@_WRAP_REORDERLIBS@"
-shell_lib="@_WRAP_SHELL_LIB@"
-scan="@_WRAP_SCAN@"
-transform="@_WRAP_TRANSFORM@"
-transform_sed="@_WRAP_TRANSFORM_SED@"
-wrapperlog="${WRAPPER_LOG-@_WRAP_LOG@}"
-skip_transform="${WRAPPER_SKIP_TRANSFORM-@_WRAP_SKIP_TRANSFORM@}"
-debug="${WRAPPER_DEBUG-@WRAPPER_DEBUG@}"
-append_extra_args=yes
-
-cat="@CAT@"
-echo="@ECHO@"
-expr="@EXPR@"
-sed="@SED@"
-test="@TEST@"
-Xsed="$sed -e 1s/^X//"
-
-. $shell_lib
-
-updatecache=${WRAPPER_UPDATE_CACHE-@WRAPPER_UPDATE_CACHE@}
-reorder=${WRAPPER_REORDER-no}
-
-case $debug in
-yes) debug_log="msg_log" ;;
-*) debug_log=":" ;;
-esac
-
-original_cmd="$0 $@"
-msg_log $wrapperlog "[*]" $original_cmd
-
-cmd="@WRAPPEE@"
-do_transform=yes
-init_queue argbuf
-init_queue cmdbuf
-
-. $scan
-
-case $append_extra_args in
-yes)
- $debug_log $wrapperlog " (wrapper.sh) append args: @_WRAP_EXTRA_ARGS@"
- set -- "$@" @_WRAP_EXTRA_ARGS@
- ;;
-*)
- ;;
-esac
-
-. $arg_source
-. $logic
-. $cmd_sink
-
-# Reorder the libraries so that the library dependencies are correct.
-case $reorder in
-yes)
- if $test -n "$libs"; then
- . $reorderlibs
- fi
- ;;
-esac
-
-cmd="$cmd $libs"
-
-@_WRAP_ENV@
-
-msg_log $wrapperlog "<.>" $cmd
-eval $cmd
-wrapper_result=$?
-
-. $cleanup
-
-exit ${wrapper_result}