[colug-432] linker is being PICky

Jeff Frontz jeff.frontz at gmail.com
Mon Jun 29 12:54:36 EDT 2015

On Mon, Jun 29, 2015 at 11:44 AM, Rick Troth <rmt at casita.net> wrote:

> I was surprised that one build w/o -fPIC appeared to be bigger in size
> then the same build with -fPIC. Would expect PIC support to increase the
> size, not shrink it. (Or maybe I was cross-eyed.) Did not compare
> performance of the two.

I'm no sure where the -fPIC came in (presumably in a library that was used
by the dependent?), but if it was part of a larger "statically link
everything I need to run" vs "make this use shared objects", I can see the
former resulting in a larger dependent.

>  As to knowing if -fPIC is needed -- that's not known
>  until you try to build the dependent, right?
> Sure, but autoconf/automake discovers things like that by trying a number
> of small compiles.
I guess I'm not remembering autoconf/automake (or, rather, a dependent
package's autoconf output) automatically pulling in or figuring out
dependencies on other packages and then actually building those packages
(other than having them say "Hey, you don't have package X; go get/make
it!").  If it's going that deep, then, yeah, there should have been an
explicit addition to ensure that the dependencies are built using the
proper flags.  But doing that seems kind of dangerous -- I mean, what if
some other (previously installed) dependent requires a particular
compilation/environment and then the build of the latest dependent goes in
and automatically changes things on its own to suit the latest dependent's
(incompatible) needs?

Or are you saying that for a given package, the build blows up because said
package's configure didn't bother to set up the right compilation flags for
said package?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20150629/5a4267ca/attachment.html 

More information about the colug-432 mailing list