Stuart Henderson <[EMAIL PROTECTED]> wrote:

> The livemedia commits break linking for vlc on amd64, -fPIC is needed.
> This fixes the build, but I'm not sure how to test whether live555 then
> works (and I don't understand when to use -fpic and when -fPIC, and
> it's not particularly easy to google for).

gcc.info has something to say on it, I think.  On some platforms,
-fpic and -fPIC generate different code, using branch instructions
that can only cover shorter (pic) or larger (PIC) distances, creating
size limits for the object files.  If -fpic is insufficient, you'll
get a linking error and have to switch to -fPIC.

Since we have a whole lot of architectures, testing this everywhere
is a lot of effort, and any performance/code size difference doesn't
matter in practice, so we just use -fPIC in the ports tree and don't
worry about it.

-- 
Christian "naddy" Weisgerber                          [EMAIL PROTECTED]

Reply via email to