Boost logo

Boost-Build :

From: Jim Gallagher (jim_at_[hidden])
Date: 2008-08-26 12:17:34


Volodya,

>>
>> We are not using the gcc toolset, rather the HP-UX aCC toolset.
>
>Yes, I realize. The question is why, whereas gcc activates PIC for link=shared,
>you want some new feature for HP-UX?
>

Not necessarily. I now realize the reasoning behind your comment was
to point out that a better mechanism may be to key off of the link
feature. That is exactly the sort of advice I was looking for. :-)

>> The HP
>> compilers do not generate position independent code by default, and
>> boost build did not add the appropriate compiler switches. When the
>> link step came, it errored out because +Z was not specified.
>
>I presume PIC, and +Z option, is not required at all times? Then, the
>error has some specific reason -- for example trying to build shared
>library without PIC code. What reason that was.
>Will adding +Z for link=shared fix that?
>
>- Volodya
>

That is true, +Z is not required for objects that will be directly
linked into an executable, although +Z will not prevent that. If you
are interested, more info is here:
http://docs.hp.com/en/B2355-90968/positionindependentcode.htm

In tools/types/lib.jam, I tried adding this code, but it did not work.
How can I use the output of the model command to change the shared lib
suffix? The output of "model" on PA-RISC machines begins with 9000/.

if [ os.name ] = HPUX
{
    if [ MATCH "^9000/" : [ SHELL "model" ] ]
    {
        type SHARED_LIB : sl : LIB ;
    }
}
else
{
    type SHARED_LIB : so : LIB ;
}

Thanks,
Jim


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