[Nix-dev] Policy on -fPIC and static libraries

Lluís Batlle viriketo at gmail.com
Mon Mar 9 13:02:14 CET 2009


Hello,

some packages build static libraries, for other things to link against
them. Sometimes to link programs, sometimes to link shared libraries.

Is there any special policy to build static library objects with or
without -fPIC in nixpkgs?

I had a problem with the vxl packages, which I need with -fPIC for my
purposes in amd64. That implies a performance penality linking vxl
code for programs (not shared libraries), which is not important for
me.

I thought of adding -fPIC only for x86_64, but afaik, in x86 -fPIC
doesn't introduce performance penalities. Right?

What do you think about this? Do you know how other distros do? I
think gentoo went on the adding -fPIC always for *any* libraries.

Regards,
Lluís



More information about the nix-dev mailing list