I’ve looked a little more into the linking problems I’ve been having and noticed that on Darwin, smartlink.c is compiled to use LD_LIBRARY_PATH/LD_RUN_PATH. That’s problematic, because Darwin uses DYLD_LIBRARY_PATH and doesn’t have an equivalent of LD_RUN_PATH, so it doesn’t seem like smart link is doing much of anything for us on Darwin.
I considered switching it to use -Wl,-rpath, however the darwin linker -rpath flag works differently from all of the other variants in that it only accepts one path per instance of the flag. smartlink.c seems to be set up to use a colon delimited list, which won’t work on Darwin (well, it isn’t rejected but won’t work as required).
Before I start cluttering up smartlink.c with the code necessary to properly support the Darwin linker, does anyone have any thoughts?
Bill
Well, the whole point of smartlink is to handle the idiosyncrasies of dynamic linking on various platforms (unlike libtool it has no ambitions beyond that). So if Darwin needs some special handling of rpath which doesn't match any of the already implemented variants, the right thing to do is to create a new value for $pike_cv_run_path_method, add a case for Darwin in configure.in which sets it, and then add the actual handling of that method to smartlink. Smartlink acts as a clutter-sink, so don't worry too much about it. :-)
pike-devel@lists.lysator.liu.se