From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] add SONAME to libblktapctl.so Date: Thu, 12 Aug 2010 11:42:38 +0200 Message-ID: <20100812094238.GA13212@aepfle.de> References: <20100728152348.GA6308@aepfle.de> <20100801094935.GA5265@aepfle.de> <19554.42879.224718.693010@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <19554.42879.224718.693010@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org On Wed, Aug 11, Ian Jackson wrote: > > -libblktapctl.so: $(CTL_PICS) > > - $(CC) $(CFLAGS) -fPIC -shared -rdynamic $^ -o $@ > > +$(LIB_SHARED): $(CTL_PICS) > > + $(CC) $(CFLAGS) $(LDFLAGS) -fPIC -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) $(SHLIB_LDFLAGS) -rdynamic $^ -o $@ > > I'm not sure I understand why -fPIC appears here as a literal, rather > than being included via some more general make variable. And does it > have any effect on the shared library creation link line anyway ? > Other places that make shared libraries don't have -fPIC there. > > Likewise they don't say -rdynamic. Ian, maybe someone has over-done things here. I'm sure libblktapctl is most likely not different from all the other xen libraries. So I would just drop -fPIC and -rdynamic from the options. The gcc manual states that linking should be done with the same options used to compile the individual objects, to get predictable results. So if for example -fPIC wasnt there before (in CFLAGS), it wont make the resulting lib any better. Olaf