Re: [pcre-dev] pcre-7.x issue

Góra strony
Delete this message
Autor: Nuno Lopes
Data:  
Dla: Christoph Mende, pcre-dev
Temat: Re: [pcre-dev] pcre-7.x issue
>> Hi, there is an issue in PCRE 7.x, some libs are not compiled using
>> -fPIC, even though this is _required_ on archs like amd64. It seems
>> like you've already been contacted about this issue by Simon Cooper
>> (who wrote a patch, that's currently used in Gentoo's libpcre package
>> for versions 7.1 and 7.2), but answered him, that adding -fPIC makes
>> PCRE unportable and that it's not needed on most archs. Former
>> statement is not true, 99% of the packages in the Gentoo tree use -fPIC
>> and they work wonderfully on 32bit and 64bit, big endian and little
>> endian archs which include x86, amd64, ppc{,64}, sparc, alpha, ...
>
> However, it is of course the case that the "configure" system does check
> for gcc. I will see if I can figure out how to make use of this so that
> it sets up -fPIC as a default in CFLAGS if and only if gcc is in use. If
> this can easily be done, then I will consider including it in 7.3.


-fPIC also degrades performance considerably..
In PHP we use the autotools+libtool, and we only enable -fPIC when it's
strictly needed. I think that a libtool magician (surely not me) should be
able to port it from PHP sources.

Nuno

P.S.: I'm also a gentoo user :)