public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Trying to build libgfortran.a with -fPIC
@ 2018-12-18 11:40 Ricardo Telichevesky
  2018-12-18 14:42 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Telichevesky @ 2018-12-18 11:40 UTC (permalink / raw)
  To: gcc-help

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Trying to build libgfortran.a with -fPIC
  2018-12-18 11:40 Trying to build libgfortran.a with -fPIC Ricardo Telichevesky
@ 2018-12-18 14:42 ` Jonathan Wakely
  2018-12-18 19:33   ` Ricardo Telichevesky
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2018-12-18 14:42 UTC (permalink / raw)
  To: Ricardo Telichevesky; +Cc: gcc-help

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Trying to build libgfortran.a with -fPIC
  2018-12-18 14:42 ` Jonathan Wakely
@ 2018-12-18 19:33   ` Ricardo Telichevesky
  0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Telichevesky @ 2018-12-18 19:33 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-18 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-18 11:40 Trying to build libgfortran.a with -fPIC Ricardo Telichevesky
2018-12-18 14:42 ` Jonathan Wakely
2018-12-18 19:33   ` Ricardo Telichevesky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).