boost-libs and CXXFLAGS (Re: devel/boost-bjam)

Mikhail T. mi+thun at aldan.algebra.com
Fri May 10 22:25:37 UTC 2013


On 10.05.2013 16:28, Mikhail T. wrote:
> Though boost-libs are now built with the specified compiler, the compiler 
> flags continue to be ignored.
I think, it is as simple as this:

    Index: compiled.mk
    ===================================================================
    --- compiled.mk (revision 317825)
    +++ compiled.mk (working copy)
    @@ -12,9 +12,7 @@
      BJAM_ARGS=     --layout=system \
                     --prefix=${PREFIX}

    -.if ${ARCH} == amd64
    -BJAM_ARGS+=    cxxflags=-fPIC
    -.endif
    +BJAM_ARGS+= cxxflags="${CXXFLAGS:N-O*}" cflags="${CFLAGS:N-O*}"

      NO_CCACHE=     yes
      .if ${CC:T:Mgcc*}

I make sure to remove any -O* flags from the local settings, because boost 
prefers to be compiled with -O3 and inserts that in place automatically -- there 
is no good reason to overwrite that.

Also, it seems, the upstream wised up on the -fPIC flag -- it is now added, 
where needed. Adding it, where /not/ needed (in static libraries and 
executables), as the current compiled.mk is doing on amd64, only pessimises the 
generated code a little bit.

    -mi



More information about the freebsd-office mailing list