diff options
author | grant <grant> | 2004-11-20 04:37:08 +0000 |
---|---|---|
committer | grant <grant> | 2004-11-20 04:37:08 +0000 |
commit | de964088907030216610de9d940a7284ae6681d7 (patch) | |
tree | 6d158b2d9ff8e8537979aced96e3ca9facb901ec /mk/wrapper | |
parent | 2d00c4fa469e4004719e4d51c0f6bc573529d76f (diff) | |
download | pkgsrc-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/wrapper')
-rw-r--r-- | mk/wrapper/bsd.wrapper.mk | 34 | ||||
-rw-r--r-- | mk/wrapper/cmd-sink-osf1-cc | 47 | ||||
-rw-r--r-- | mk/wrapper/cmd-sink-osf1-ld | 54 | ||||
-rw-r--r-- | mk/wrapper/transform-ccc-cc | 32 |
4 files changed, 164 insertions, 3 deletions
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 |