On Tue, Apr 1, 2014 at 9:24 AM, Viktor Dukhovni <openssl-us...@dukhovni.org> wrote: > On Tue, Apr 01, 2014 at 05:37:05AM -0400, Jeffrey Walton wrote: > >> You can download OpenSSL, `./Configure darwin64-x86_64-cc`, `make`, >> and then `sudo make install`. Your updated version will be located in >> `/usr/local/ssl`. >> >> Using it in programs can be tricky, though. Apple's linkers do not >> honor -Bstatic and -rpaths. You will have to compile/link with >> -I/usr/local/ssl/include and -L/usr/local/ssl/lib. > > However, alternative flags that achieve the same effect are available: > > To build a library whose SONAME involves an rpath: > > $ cc -shared -Wl,-flat_namespace -Wl,-undefined,dynamic_lookup \ > -Wl,-install_name,@rpath/libfoo.dylib.1 -o libfoo.dylib.1 > # cp libfoo.dylib.1 /usr/local/lib > # ln -s libfoo.dylib.1 /usr/local/lib/libfoo > > To build an executable that uses this library: > > cc -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lfoo I have not had success with the above (-Wl,-rpath,/usr/local/lib) with shared objects. But I'm pretty sure they all have had the extension *.so. Does the Apple linker honor it if the extension is *.dylib?
Do you have any tricks for -Bstatic? Jeff ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org