Boost logo

Boost-Build :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-03-28 13:58:10


Vladimir Prus schrieb:
> Mike wrote:
>> Can anyone tell me why -fPIC is not passed to all calls of g++/gcc?
>>
>> I am also observing that the -fPIC flag is not passed to any link steps.
>
> Should it, and if so, why?

Citing: Ulrich Drepper,
http://people.redhat.com/drepper/dsohowto.pdf
(glibc maintainer)

pp.15 Optimizing for DSOs

> The most important recommendation is to always use -fpic or -fPIC
> when generating code which ends up in DSOs. (dynamically shared
> objects)

...

> It is therefore mandatory to compile all code which can potentially
> end up in a DSO with -fpic / -fPIC since othzerwise the DSO might
> not work correctly.

Not claiming I understand everything he says in full. But I thought
the reference could be interseting to this case.

Regards,

-- 
_________________________________________
  _  _  | Roland Schwarz
 |_)(_  | aka. speedsnail
 | \__) | mailto:roland.schwarz_at_[hidden]
________| http://www.blackspace.at

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk