Trying to build libgfortran.a with -fPIC

Ricardo Telichevesky ricardo@teli.org
Tue Dec 18 11:40:00 GMT 2018


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 ...

     Thanks,

     Ricardo




More information about the Gcc-help mailing list