Boost logo

Boost Users :

Subject: [Boost-users] adding 'blackberry' to boost build
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2012-10-23 14:03:52


I work for RIM (ie BlackBerry), and am trying to make using boost as
easy as possible to use for BB developers. So I would like to make
building boost for BB as easy as possible. I would also like to make
building boost work "as expected" for anyone who understands
Boost.Build. It is the "as expected" part that I'm not sure of.

ie
should I just offer a blackberry-config.jam?
should Boost.Build be changed to auot-detect the BB NDK?
should blackberry be a toolset? a target-os? ...?

how would you *expect* it hook into Boost.Build?

(And note that I expect that developers *also* use the same boost for
Windows, etc, so I don't want to replace/affect the simple build for
the host machine.)

- And finally, it would be nice if this was upstreamed back into boost
build (if people think that makes sense), so that boost "just works"
on BlackBerry.

Here's what I have so far:

from the command line, you run something like:

    b2 install --prefix=C:\boost\ --user-config=blackberry-config.jam
--layout=system toolset=gcc target-os=qnxnto

I'd prefer it if they didn't need to type so much.

And the config file looks like basically the rest of this email:

import os ;

# these env vars are set by installing the BB NDK
QNX_TARGET_ARCH = [ os.environ QNX_TARGET_ARCH ] ;
QNX_TARGET = [ os.environ QNX_TARGET ] ;
QNX_HOST = [ os.environ QNX_HOST ] ;

if ! $(QNX_TARGET) || ! $(QNX_HOST)
{
    ECHO error: ;
    ECHO error: BlackBerry build of Boost requires QNX_TARGET and
QNX_HOST env variables. Did you run bbndk-env.bat? ;
    ECHO error: ;
    EXIT ;
}

if $(QNX_TARGET_ARCH) = x86
{
    dashVOpt = gcc_ntox86_cpp ;
    linkArchDir = x86 ;
}
else
{
    dashVOpt = gcc_ntoarmv7le_cpp ;
    linkArchDir = armle-v7 ;
}

using qcc
# Version
    :

# C++-compile-command
    : $(QNX_HOST)/usr/bin/QCC -V$(dashVOpt)

# Compiler options
    : <compileflags>"-D__QNX__"
        <compileflags>"-D__QNXNTO__"

    # Add -D__USE_ISOC99 for rounding control mechanism
(boost/numeric/interval/hw_rounding.hpp)
        <compileflags>"-D__USE_ISOC99"
        <compileflags>"-I$(QNX_TARGET)/usr/include"

    # Prevent this from being output: "note: the mangling of 'va_list'
has changed in GCC 4.4"
        <compileflags>"-Wno-psabi"

    # Add -fPIC to link without error to LibTestNativeLibTuTest.o (for
statechart tests)
        <compileflags>"-fPIC"

    # Requested by BBM team
        <compileflags>"-fno-strict-aliasing"

    # Functions like sync_val_compare_and_swap and sync_fetch_and_add
aren't available
        <compileflags>"-DBOOST_SP_NO_SYNC"

        <linkflags>"-L$(QNX_TARGET)/$(linkArchDir)/usr/lib
-L$(QNX_TARGET)/$(linkArchDir)/lib"
    ;

import option ;
option.set keep-going : false ;

------------------------
Thanks in advance,
Tony


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