Trying to build libgfortran.a with -fPIC
Ricardo Telichevesky
ricardo@teli.org
Tue Dec 18 19:33:00 GMT 2018
Jonathan,
Adding the --with-pic worked perfectly! Thanks so much for your help!
On 12/18/18 3:40 AM, Jonathan Wakely wrote:
> On Tue, 18 Dec 2018 at 10:16, Ricardo Telichevesky wrote:
>> Hello,
>>
>> Can't find anywhere how to do it .... I've built the gcc compiler many times, in many different machines, and many versions ... However, now I need to compile it in such way that libgfortran.a and libquadmath.a with -fPIC flags, so that I can statically link them inside a shared object that
>> contains lapack stuff ..
>>
>> The problem with distributing shared objects that rely on other shared objects is that quite often the target machine doesn't have the right libraries libgfortran.so and libquadmath.so ... and if I distribute them have to deal with proper search paths, etc, it is a mess...
>>
>> Any suggestions? - perhaps there is a simple way to force the entire build of gcc to compile with -fPIC ...
>
> Does adding --with-pic to the configure options work?
>
More information about the Gcc-help
mailing list