pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rpath order in cmd-sink-aix-ld



cmd-sink-aix-ld will set the rpath by setting the -blibpath option to
the linker.  When it does so, it puts /usr/lib and /lib at the front,
so that the runtime linker will prefer the system libs to pkgsrc libs.

This seems backwards.  Is it really supposed to be this way?  If not,
please have a look at the attached patch.  It modifies
cmd-sink-aix-ld, putting /usr/lib and /lib at the end of -blibpath.
Index: cmd-sink-aix-ld
===================================================================
RCS file: /cvsroot/pkgsrc/mk/wrapper/cmd-sink-aix-ld,v
retrieving revision 1.5
diff -u -r1.5 cmd-sink-aix-ld
--- cmd-sink-aix-ld	15 Jan 2009 16:55:33 -0000	1.5
+++ cmd-sink-aix-ld	12 Feb 2016 08:57:37 -0000
@@ -79,13 +79,14 @@
 done
 
 # AIX ld(1) uses -blibpath to set the runtime library search path.
-arg="-blibpath:/usr/lib:/lib"
+arg="/usr/lib:/lib"
 if $test -n "$orig_blibpath"; then
-	arg="$arg:$orig_blibpath"
+	arg="$orig_blibpath:$arg"
 fi
 if $test -n "$blibpath"; then
-	arg="$arg:$blibpath"
+	arg="$blibpath:$arg"
 fi
+arg="-blibpath:$arg"
 $debug_log $wrapperlog "    (cmd-sink-aix-ld) pop: $arg"
 . $buildcmd
 


Home | Main Index | Thread Index | Old Index