diff options
Diffstat (limited to 'mk/wrapper/cmd-sink-aix-cc')
-rw-r--r-- | mk/wrapper/cmd-sink-aix-cc | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/mk/wrapper/cmd-sink-aix-cc b/mk/wrapper/cmd-sink-aix-cc index c1d6df325a2..8dcb2679e8c 100644 --- a/mk/wrapper/cmd-sink-aix-cc +++ b/mk/wrapper/cmd-sink-aix-cc @@ -1,4 +1,4 @@ -# $NetBSD: cmd-sink-aix-cc,v 1.2 2005/05/16 17:54:51 jlam Exp $ +# $NetBSD: cmd-sink-aix-cc,v 1.3 2008/11/14 14:04:12 joerg Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -36,12 +36,23 @@ # Empty out the command buffer and build up the command line in $cmd. blibpath= +orig_blibpath= dynamic= while ! queue_is_empty cmdbuf; do pop_queue cmdbuf arg $debug_log $wrapperlog " (cmd-sink-aix-cc) pop: $arg" case $arg in + -blibpath:*) + orig_blibpath=${arg#-blibpath:} + $debug_log $wrapperlog " (cmd-sink-aix-ld) drop: $dir [setting orig_blibpath]" + dynamic=yes + ;; + -Wl,-blibpath:*) + orig_blibpath=${arg#-Wl,-blibpath:} + $debug_log $wrapperlog " (cmd-sink-aix-ld) drop: $dir [setting orig_blibpath]" + dynamic=yes + ;; ############################################################## # AIX ld(1) doesn't support -Wl,-rpath,* but accumulate them # into a path collection we can later append to command line @@ -70,11 +81,15 @@ while ! queue_is_empty cmdbuf; do done # AIX ld(1) uses -blibpath to set the runtime library search path. +arg="-Wl,-blibpath:/usr/usr/lib:/lib" +if $test -n "$orig_blibpath"; then + arg="$arg:$orig_blibpath" +fi if $test -n "$blibpath"; then - arg="-Wl,-blibpath:/lib:/usr/lib:$blibpath" - $debug_log $wrapperlog " (cmd-sink-aix-cc) pop: $arg" - . $buildcmd + arg="$arg:$blibpath" fi +$debug_log $wrapperlog " (cmd-sink-aix-cc) pop: $arg" +. $buildcmd # If we are dynamically linking, make sure the runtime linker is used. if $test -n "$dynamic"; then |