summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorgrant <grant>2004-11-20 04:37:08 +0000
committergrant <grant>2004-11-20 04:37:08 +0000
commitde964088907030216610de9d940a7284ae6681d7 (patch)
tree6d158b2d9ff8e8537979aced96e3ca9facb901ec /mk
parent2d00c4fa469e4004719e4d51c0f6bc573529d76f (diff)
downloadpkgsrc-de964088907030216610de9d940a7284ae6681d7.tar.gz
add framework support for Tru64 and the Compaq C compiler.
patches provided by Tobias Nygren <tnn at netilium dot org> with minor changes by me.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.prefs.mk10
-rw-r--r--mk/compiler.mk5
-rw-r--r--mk/compiler/ccc.mk73
-rw-r--r--mk/platform/OSF1.mk146
-rw-r--r--mk/platform/OpenBSD.mk3
-rw-r--r--mk/wrapper/bsd.wrapper.mk34
-rw-r--r--mk/wrapper/cmd-sink-osf1-cc47
-rw-r--r--mk/wrapper/cmd-sink-osf1-ld54
-rw-r--r--mk/wrapper/transform-ccc-cc32
9 files changed, 397 insertions, 7 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 92b5970b711..783490fd325 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.176 2004/10/31 22:05:02 wiz Exp $
+# $NetBSD: bsd.prefs.mk,v 1.177 2004/11/20 04:37:08 grant Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -164,6 +164,14 @@ LOWER_VENDOR?= sgi
LOWER_OPSYS?= interix3
LOWER_VENDOR?= pc
+.elif ${OPSYS} == "OSF1"
+LOWER_ARCH!= ${UNAME} -p
+MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH}
+MACHINE_ARCH?= ${LOWER_ARCH}
+OS_VERSION!= echo ${OS_VERSION} | sed -e 's/^V//'
+LOWER_OPSYS?= osf${OS_VERSION}
+LOWER_VENDOR?= dec
+
.elif !defined(LOWER_OPSYS)
LOWER_OPSYS!= echo ${OPSYS} | tr A-Z a-z
.endif
diff --git a/mk/compiler.mk b/mk/compiler.mk
index cb147f8e914..c5ff1e5910f 100644
--- a/mk/compiler.mk
+++ b/mk/compiler.mk
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.36 2004/10/06 09:49:53 grant Exp $
+# $NetBSD: compiler.mk,v 1.37 2004/11/20 04:37:08 grant Exp $
#
# This Makefile fragment implements handling for supported C/C++/Fortran
# compilers.
@@ -18,6 +18,7 @@
# sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
# ONE Studio
# xlc IBM's XL C/C++ compiler suite
+# ccc Compaq C Compilers (Tru64)
#
# The default is "gcc". You can use ccache and/or distcc with an
# appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
@@ -89,7 +90,7 @@ PKGSRC_COMPILER?= gcc
_USE_PKGSRC_GCC= yes
.endif
-_COMPILERS= gcc mipspro mipspro-ucode sunpro xlc
+_COMPILERS= ccc gcc mipspro mipspro-ucode sunpro xlc
_PSEUDO_COMPILERS= ccache distcc
.if defined(NOT_FOR_COMPILER) && !empty(NOT_FOR_COMPILER)
diff --git a/mk/compiler/ccc.mk b/mk/compiler/ccc.mk
new file mode 100644
index 00000000000..407cf7521e9
--- /dev/null
+++ b/mk/compiler/ccc.mk
@@ -0,0 +1,73 @@
+# $NetBSD: ccc.mk,v 1.1 2004/11/20 04:37:08 grant Exp $
+
+.if !defined(COMPILER_CCC_MK)
+COMPILER_CCC_MK= defined
+
+.include "../../mk/bsd.prefs.mk"
+
+# LANGUAGES.<compiler> is the list of supported languages by the compiler.
+# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the ones
+# requested by the package in USE_LANGUAGES.
+#
+
+LANGUAGES.ccc= c
+.if exists(/usr/lib/cmplrs/cxx)
+LANGUAGES.ccc+= c++
+.endif
+_LANGUAGES.ccc= # empty
+.for _lang_ in ${USE_LANGUAGES}
+_LANGUAGES.ccc+= ${LANGUAGES.ccc:M${_lang_}}
+.endfor
+
+_CCC_DIR= ${WRKDIR}/.ccc
+_CCC_LINKS= # empty
+.if exists(/usr/bin/cc)
+_CCC_CC= ${_CCC_DIR}/cc
+_CCC_LINKS+= _CCC_CC
+PKG_CC= ${_CCC_CC}
+CC= ${PKG_CC:T}
+.endif
+
+.if exists(/usr/bin/cxx)
+_CCC_CXX= ${_CCC_DIR}/cxx
+_CCC_LINKS+= _CCC_CXX
+PKG_CXX= ${_CCC_CXX}
+CXX= ${PKG_CXX:T}
+.endif
+
+.if exists(/usr/bin/cc)
+CC_VERSION_STRING!= /usr/bin/cc -V | awk '{print $0; exit(0);}'
+CC_VERSION!= /usr/bin/cc -V | awk '{print "CCC-"$3; exit(0);}'
+.else
+CC_VERSION_STRING?= ${CC_VERSION}
+CC_VERSION?= CCC
+.endif
+
+# CCC passes flags to the linker using "-Wl,".
+_COMPILER_LD_FLAG= -Wl,
+
+# CCC passes rpath directives to the linker using "-rpath".
+_LINKER_RPATH_FLAG= -rpath
+
+# CCC passes rpath directives to the linker using "-rpath" tailing ",".
+_COMPILER_RPATH_FLAG= ${_COMPILER_LD_FLAG}${_LINKER_RPATH_FLAG},
+
+# Most packages assume ieee floats, make that the default.
+CFLAGS+=-ieee
+CXXFLAGS+=-ieee
+
+# Create compiler driver scripts in ${WRKDIR}.
+.for _target_ in ${_CCC_LINKS}
+. if !target(${${_target_}})
+override-tools: ${${_target_}}
+${${_target_}}:
+ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ (${ECHO} '#!${TOOLS_SHELL}'; \
+ ${ECHO} 'exec /usr/bin/${${_target_}:T} "$$@"'; \
+ ) > ${.TARGET}
+ ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}
+. endif
+.endfor
+
+.endif # COMPILER_CCC_MK
diff --git a/mk/platform/OSF1.mk b/mk/platform/OSF1.mk
new file mode 100644
index 00000000000..3e94e532ccf
--- /dev/null
+++ b/mk/platform/OSF1.mk
@@ -0,0 +1,146 @@
+# $NetBSD: OSF1.mk,v 1.1 2004/11/20 04:37:08 grant Exp $
+#
+# Variable definitions for the OSF1 operating system.
+
+# current bmake is broken, see pkg/25559
+
+#.SHELL: name=ksh path=/bin/ksh hasErrCtl=true \
+# check="set -e" ignore="set +e" \
+# echo="set -v" quiet="set +v" filter="set +v" \
+# echoFlag=v errFlag=e
+
+AWK?= /usr/bin/awk
+BASENAME?= /usr/bin/basename
+CAT?= /bin/cat
+CHMOD?= /bin/chmod
+CHOWN?= /bin/chown
+CHGRP?= /usr/bin/chgrp
+CMP?= /usr/bin/cmp
+CP?= /bin/cp
+CPP?= /usr/bin/cpp
+CUT?= /usr/bin/cut
+DATE?= /bin/date
+DC?= /usr/bin/dc
+DIRNAME?= /usr/bin/dirname
+ECHO?= /usr/bin/echo
+ECHO_N?= ${SETENV} CMD_ENV=bsd /usr/bin/echo -n
+EGREP?= /usr/bin/grep -E
+EXPR?= /bin/expr
+FALSE?= false # Shell builtin
+FETCH_CMD?= ${LOCALBASE}/bin/ftp
+FGREP?= /usr/bin/grep -F
+FILE_CMD?= /usr/bin/file
+FIND?= /usr/bin/find
+GMAKE?= ${LOCALBASE}/bin/gmake
+GREP?= /usr/bin/grep
+.if exists(${LOCALBASE}/bin/gtar)
+GTAR?= ${LOCALBASE}/bin/gtar
+.else
+GTAR?=/usr/bin/tar
+.endif
+GUNZIP_CMD?= /usr/bin/gunzip -f
+GZCAT?= /usr/bin/gzcat
+GZIP?= -9
+GZIP_CMD?= /usr/bin/gzip -nf ${GZIP}
+HEAD?= /usr/bin/head
+HOSTNAME_CMD?= /bin/hostname
+ID?= /usr/bin/id
+INSTALL= ${LOCALBASE}/bin/install-sh
+LDCONFIG?= ${TRUE}
+LN?= /bin/ln
+LS?= /bin/ls
+M4?= /usr/bin/m4
+MAIL_CMD?= /usr/bin/mailx
+MKDIR?= /bin/mkdir -p
+MTREE?= ${LOCALBASE}/sbin/mtree
+MV?= /bin/mv
+NICE?= /usr/bin/nice
+PATCH?= ${LOCALBASE}/bin/gpatch
+PAX?= ${LOCALBASE}/bin/pax
+.if exists(${LOCALBASE}/bin/perl)
+PERL5?= ${LOCALBASE}/bin/perl
+.else
+PERL5?= /usr/bin/perl
+.endif
+PKGLOCALEDIR= share
+PS?= /bin/ps
+PWD_CMD?= /bin/pwd # needs to print physical path
+RM?= /bin/rm
+RMDIR?= /bin/rmdir
+SED?= ${LOCALBASE}/bin/nbsed
+SETENV?= /usr/bin/env
+SH?= /bin/ksh # recommendend on Tru64
+#SHLOCK= ${LOCALBASE}/bin/shlock # need to make this work
+SORT?= /usr/bin/sort
+STRIP?= /usr/bin/strip
+SU?= /usr/bin/su
+TAIL?= /usr/bin/tail
+TAR?= /usr/bin/tar
+TEE?= /usr/bin/tee
+TEST?= test # Shell builtin
+TOUCH?= /usr/bin/touch
+TR?= /usr/bin/tr
+TRUE?= true # Shell builtin
+TSORT?= /usr/bin/tsort
+TYPE?= type # Shell builtin
+WC?= /usr/bin/wc
+XARGS?= /usr/bin/xargs
+
+USERADD?= /usr/sbin/useradd
+GROUPADD?= /usr/sbin/groupadd
+
+CPP_PRECOMP_FLAGS?= # unset
+DEF_UMASK?= 0022
+EXPORT_SYMBOLS_LDFLAGS?=-Wl,-non_hidden # add symbols to the dynamic symbol table
+MOTIF_TYPE_DEFAULT?= openmotif # default 2.0 compatible libs type
+MOTIF12_TYPE_DEFAULT?= lesstif12 # default 1.2 compatible libs type
+NOLOGIN?= /etc/nologin
+PKG_TOOLS_BIN?= ${LOCALBASE}/sbin
+ROOT_CMD?= ${SU} - root -c
+ROOT_USER?= root
+ROOT_GROUP?= system
+ULIMIT_CMD_datasize?= echo ULIMIT_CMD_datasize_FIXME
+ULIMIT_CMD_stacksize?= echo ULIMIT_CMD_stacksize_FIXME
+ULIMIT_CMD_memorysize?= echo ULIMIT_CMD_memorysize_FIXME
+# imake installs manpages in weird places
+# these values from /usr/X11R6/lib/X11/config/NetBSD.cf
+IMAKE_MAN_SOURCE_PATH= man/cat
+IMAKE_MAN_SUFFIX= 1
+IMAKE_LIBMAN_SUFFIX= 3
+IMAKE_FILEMAN_SUFFIX= 5
+IMAKE_MAN_DIR= ${IMAKE_MAN_SOURCE_PATH}1
+IMAKE_LIBMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}3
+IMAKE_FILEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}5
+IMAKE_MANNEWSUFFIX= 1
+
+_DO_SHLIB_CHECKS= yes # fixup PLIST
+_IMAKE_MAKE= ${MAKE} # program which gets invoked by imake
+.if exists(/usr/include/netinet/ip6.h)
+_OPSYS_HAS_INET6= yes # IPv6 is standard
+.else
+_OPSYS_HAS_INET6= no # IPv6 is not standard
+.endif
+_OPSYS_HAS_JAVA= yes # Java is standard
+_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
+_OPSYS_HAS_OSSAUDIO= no # libossaudio is available
+_OPSYS_PERL_REQD= # no base version of perl required
+_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
+_OPSYS_RPATH_NAME= -rpath, # name of symbol in rpath directive to linker
+_OPSYS_SHLIB_TYPE= COFF # type of shared lib
+_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
+_PATCH_BACKUP_ARG?= -b -V simple -z # switch to patch(1) for backup suffix
+_PREFORMATTED_MAN_DIR= cat # directory where catman pages are
+_USE_GNU_GETTEXT= yes # Don't use GNU gettext
+_USE_RPATH= yes # add rpath to LDFLAGS
+
+# flags passed to the linker to extract all symbols from static archives.
+# this is GNU ld.
+_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,-all
+_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,-none
+
+DEFAULT_SERIAL_DEVICE?= /dev/tty00
+SERIAL_DEVICES?= /dev/tty00 \
+ /dev/tty01
+
+_INCOMPAT_ICONV= OSF1-*-*
+
diff --git a/mk/platform/OpenBSD.mk b/mk/platform/OpenBSD.mk
index 14ae201475f..e16719446e5 100644
--- a/mk/platform/OpenBSD.mk
+++ b/mk/platform/OpenBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: OpenBSD.mk,v 1.5 2004/11/18 04:22:39 xtraeme Exp $
+# $NetBSD: OpenBSD.mk,v 1.6 2004/11/20 04:37:08 grant Exp $
#
# Variable definitions for the OpenBSD operating system.
@@ -125,6 +125,7 @@ _OPSYS_HAS_INET6= no # IPv6 is not standard
_OPSYS_HAS_JAVA= no # Java is not standard
_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
_OPSYS_HAS_OSSAUDIO= yes # libossaudio is available
+_OPSYS_LIBTOOL_REQD= 1.5.6nb1 # base version of libtool required
_OPSYS_PERL_REQD= # no base version of perl required
_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
_OPSYS_SHLIB_TYPE= ELF/a.out # shared lib type
diff --git a/mk/wrapper/bsd.wrapper.mk b/mk/wrapper/bsd.wrapper.mk
index f53563d67b9..8020eda8b29 100644
--- a/mk/wrapper/bsd.wrapper.mk
+++ b/mk/wrapper/bsd.wrapper.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.wrapper.mk,v 1.11 2004/11/12 16:27:57 jlam Exp $
+# $NetBSD: bsd.wrapper.mk,v 1.12 2004/11/20 04:37:08 grant Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -149,7 +149,7 @@ _WRAPPEES+= ${_wrappee_}
_WRAP_ALIASES.AS= as
_WRAP_ALIASES.CC= cc gcc
-_WRAP_ALIASES.CXX= c++ g++ CC
+_WRAP_ALIASES.CXX= c++ g++ CC cxx
_WRAP_ALIASES.CPP= cpp
_WRAP_ALIASES.FC= f77 g77
_WRAP_ALIASES.IMAKE= imake
@@ -247,6 +247,13 @@ _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_TRANSFORM_SED.IMAKE= # empty
@@ -264,6 +271,10 @@ _WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-interix-ld
_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.LD= ${WRAPPER_TMPDIR}/cmd-sink-osf1-ld
+_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-osf1-cc
+_WRAP_CMD_SINK.CXX= ${WRAPPER_TMPDIR}/cmd-sink-osf1-cc
.endif
# Filter to scrunch shell scripts by removing comments and empty lines.
@@ -417,6 +428,24 @@ ${WRAPPER_TMPDIR}/cmd-sink-unixware-gcc: \
${_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}/transform-mipspro-cc: \
${WRAPPER_SRCDIR}/transform-mipspro-cc
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
@@ -441,7 +470,6 @@ ${WRAPPER_TMPDIR}/transform-xlc-cc: \
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-
.if !target(${_WRAP_GEN_REORDER})
${_WRAP_GEN_REORDER}: \
${_WRAP_SHELL_LIB} \
diff --git a/mk/wrapper/cmd-sink-osf1-cc b/mk/wrapper/cmd-sink-osf1-cc
new file mode 100644
index 00000000000..b67d1da838e
--- /dev/null
+++ b/mk/wrapper/cmd-sink-osf1-cc
@@ -0,0 +1,47 @@
+# $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
new file mode 100644
index 00000000000..1dabe3a196f
--- /dev/null
+++ b/mk/wrapper/cmd-sink-osf1-ld
@@ -0,0 +1,54 @@
+# $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/transform-ccc-cc b/mk/wrapper/transform-ccc-cc
new file mode 100644
index 00000000000..e7e055d2ddc
--- /dev/null
+++ b/mk/wrapper/transform-ccc-cc
@@ -0,0 +1,32 @@
+# $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