Boost logo

Boost Users :

Subject: Re: [Boost-users] [bjam] boost compilation with cxxflags -fPIC
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2010-07-09 02:13:22


alfC wrote:

> Hi,
>
> Please, can anybody tell me how to compile Boost (e.g. 1.43) with the
> -fPIC as cxxflag:
>
> typicially I do
>
> ./bootstrap --prefix=$HOME/usr
> ./bjam
> ./bjam install

You don't need to separate invocations. "./bjam install" will just work.
 
> There are some threads that give answers but in none of them it is
> clear exactly what is the command we need to write.
>
> I tried with
>
> CFLAGS=-fPIC ./bjam
> ./bjam cxxflags=-fPIC

./bjam cxxflags=-fPIC install

should work (if you need installing). You can add -n to see the command
lines. You can add -a to rebuild everything -- necessary if you have
already did a complete build without -fPIC.

Note that this flag will only make sense for static builds, since
shared libraries are built with -fPIC anyway.

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net