Hi Andrew, thanks for your reply! The PIC is because proton will be linked against amqp.so in qpid, which is a module (dynamic) that will be linked against this static library, therefore the PIC is required. Could I have worded that better?
On Tue, Jan 21, 2014 at 9:57 AM, Andrew Stitcher <astitc...@redhat.com>wrote: > On Mon, 2014-01-20 at 12:09 -0500, Shearer, Davin wrote: > > I would like to share my experience with building proton version 0.6 as a > > static library. > > ... > > > and since we'll want to support linking this against > > modules and/or dynamic libraries, we want to build using > > position-independent code (PIC), > > I'm pretty sure this is mistaken: You only need to build -fPIC if the > code you are building will end up in a dynamic library itself, not if > you are merely linking against a dynamic library (There are also PIC > executables for some security purposes but you don't mention that). > > The reason for this is that the main executable (including any static > libraries linked to it) is loaded at a fixed address, whereas dynamic > libraries could be loaded at any location in the memory map. > > Other than the -fPIC I think your patch looks good, and is probably > generally applicable. > > Andrew > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org > For additional commands, e-mail: users-h...@qpid.apache.org > > -- Davin Shearer Engineer 8830 Stanford Blvd, Suite 306 Columbia, MD 21045 443-741-4517