diff options
author | tnn <tnn> | 2007-04-14 14:17:49 +0000 |
---|---|---|
committer | tnn <tnn> | 2007-04-14 14:17:49 +0000 |
commit | 24c16fbfd3d257223f08096bf12d9ec757caa256 (patch) | |
tree | f4e9e4010929cc5937687ad0118f19691a19b43d /mk/wrapper | |
parent | 36cfc7af30bf01a19f1014c8e710f08c742e7d34 (diff) | |
download | pkgsrc-24c16fbfd3d257223f08096bf12d9ec757caa256.tar.gz |
Teach pkgsrc about HP-UX.
Diffstat (limited to 'mk/wrapper')
-rw-r--r-- | mk/wrapper/bsd.wrapper.mk | 8 | ||||
-rw-r--r-- | mk/wrapper/cmd-sink-hpux-cc | 48 | ||||
-rw-r--r-- | mk/wrapper/cmd-sink-hpux-ld | 51 |
3 files changed, 106 insertions, 1 deletions
diff --git a/mk/wrapper/bsd.wrapper.mk b/mk/wrapper/bsd.wrapper.mk index 5e8366b5a63..a848f8c7009 100644 --- a/mk/wrapper/bsd.wrapper.mk +++ b/mk/wrapper/bsd.wrapper.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.wrapper.mk,v 1.66 2007/04/12 14:51:10 tnn Exp $ +# $NetBSD: bsd.wrapper.mk,v 1.67 2007/04/14 14:17:49 tnn Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -335,6 +335,10 @@ _WRAP_EXTRA_ARGS.CPP+= -D_POSIX_PII_SOCKET _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} == "HPUX" +_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-hpux-cc +_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC} +_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-hpux-ld .elif ${OPSYS} == "AIX" _WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-aix-cc _WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC} @@ -488,6 +492,8 @@ generate-wrappers: ${_target_} cmd-sink-ld \ cmd-sink-osf1-cc \ cmd-sink-osf1-ld \ + cmd-sink-hpux-cc \ + cmd-sink hpux-ld \ cmd-sink-solaris-imake \ cmd-sink-sunpro-cxx \ cmd-sink-unixware-gcc \ diff --git a/mk/wrapper/cmd-sink-hpux-cc b/mk/wrapper/cmd-sink-hpux-cc new file mode 100644 index 00000000000..913d4be683f --- /dev/null +++ b/mk/wrapper/cmd-sink-hpux-cc @@ -0,0 +1,48 @@ +# $NetBSD $ + +# Empty out the command buffer and build up the command line in $cmd. +hprunpath= +while ! queue_is_empty cmdbuf; do + pop_queue cmdbuf arg + $debug_log $wrapperlog " (cmd-sink-hpux-cc) pop: $arg" + case $arg in + ############################################################## + # HP-UX ld doesn't support multiple rpath parameters, accumulate + # them into a single -Wl,+b,/path1:/path2:...:pathn + ############################################################## + +b|-Wl,+b|-rpath) + pop_queue cmdbuf dir + dir="${dir#-Wl,}" + case $hprunpath in + "") hprunpath="$dir" ;; + *) hprunpath="$hprunpath:$dir" ;; + esac + $debug_log $wrapperlog " (cmd-sink-hpux-cc) drop: $dir [adding to hprunpath]" + ;; + -Wl,+b,*|-R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*) + case $arg in + -Wl,+b,*) R="-Wl,+b," ;; + -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 $hprunpath in + "") hprunpath="$dir" ;; + *) hprunpath="$hprunpath:$dir" ;; + esac + $debug_log $wrapperlog " (cmd-sink-hpux-cc) drop: $dir [adding to hprunpath]" + ;; + *) + . $buildcmd + ;; + esac +done + +if $test -n "$hprunpath"; then + arg="-Wl,+b,$hprunpath" + $debug_log $wrapperlog " (cmd-sink-hpux-cc) pop: $arg [aggregate]" + . $buildcmd +fi diff --git a/mk/wrapper/cmd-sink-hpux-ld b/mk/wrapper/cmd-sink-hpux-ld new file mode 100644 index 00000000000..ad40d43a242 --- /dev/null +++ b/mk/wrapper/cmd-sink-hpux-ld @@ -0,0 +1,51 @@ +# $NetBSD: cmd-sink-hpux-ld,v 1.1 2007/04/14 14:17:50 tnn Exp $ + +# Empty out the command buffer and build up the command line in $cmd. +hprunpath= +while ! queue_is_empty cmdbuf; do + pop_queue cmdbuf arg + $debug_log $wrapperlog " (cmd-sink-hpux-ld) pop: $arg" + case $arg in + ############################################################## + # HP-UX ld doesn't support multiple rpath parameters, accumulate + # them into a single +b /path1:/path2:...:pathn + ############################################################## + +b|-Wl,+b|-rpath) + pop_queue cmdbuf dir + dir="${dir#-Wl,}" + case $hprunpath in + "") hprunpath="$dir" ;; + *) hprunpath="$hprunpath:$dir" ;; + esac + $debug_log $wrapperlog " (cmd-sink-hpux-ld) drop: $dir [adding to hprunpath]" + ;; + -Wl,+b,*|-R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*) + case $arg in + -Wl,+b,*) R="-Wl,+b," ;; + -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 $hprunpath in + "") hprunpath="$dir" ;; + *) hprunpath="$hprunpath:$dir" ;; + esac + $debug_log $wrapperlog " (cmd-sink-hpux-ld) drop: $dir [adding to hprunpath]" + ;; + *) + . $buildcmd + ;; + esac +done + +if $test -n "$hprunpath"; then + arg=+b + $debug_log $wrapperlog " (cmd-sink-hpux-ld) pop: $arg" + . $buildcmd + arg=$hprunpath + $debug_log $wrapperlog " (cmd-sink-hpux-ld) pop: $arg [aggregate]" + . $buildcmd +fi |