Boost logo

Boost Users :

Subject: Re: [Boost-users] adding 'blackberry' to boost build
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2012-10-23 19:37:05


Thanks for replying.
Answers, or at least responses, inline:

On Tue, Oct 23, 2012 at 2:57 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
>
>
> I would say that this should be a modification of the
> qcc toolset to deduce as much as possible. However,
> I don't really know anything about the compiler:
>

qcc is a small wrapper around gcc, I think. It works for anything
compiling to QNX (the base OS), not just "BlackBerry", which is
somehow different. (QNX is still a microkernel OS used in a crazy
number of strange places, not just for BlackBerry devices). Although
when compiling boost, any blackberry vs qnx differences probably are
moot.

> a) What exactly does the setup script do? Normally,
> I'd expect to be able to write bbndk-env.bat && QCC ...
> and expect it to work. Does it really just set
> environment variables that have to be manually
> passed to the compiler?

Basically, for most BB mobile development, you build from the IDE
(custom IDE based on Eclipse), so you don't see the env variables,
etc. You only see them for command line work. And actually I don't
know if the IDE uses the same variables, or uses some other mechanism
(I suspect the latter), so maybe the env vars are really only for
command line. But they aren't just for building boost. They will be
used if you are building your own code on the command line.

ie They are also used via qmake (ie Qt, which most BB C++ apps use),
so I think that's another reason why they have been refactored out
into evn vars.

Mostly I was hoping not to change what currently exists (ie the env
vars and bbndk.bat) but just use it to build boost.

> b) What would be the implications of having
> using qcc : : : <setup>/path/to/bbndk-env.bat ;
> Is qcc used for other platforms? If so, do
> they also have setup scripts? How does the
> behavior differ?
>

I haven't looked into <setup>. Sounds like I should. Does it run at
the start of boost build, or for every run of qcc called by boost
build, or ...?

As mentioned above, qcc is just gcc for qnx. Not even sure of any
differences. Maybe the QNX guys just like the letter q. Assume it
works the same as gcc (definitely takes the same args, etc).

>> <snip>
>>
>>
>> using qcc
>> # Version
>> :
>>
>> # C++-compile-command
>> : $(QNX_HOST)/usr/bin/QCC -V$(dashVOpt)
>>
>> # Compiler options
>> : <compileflags>"-D__QNX__"
>> <compileflags>"-D__QNXNTO__"
>>
>
> Is this really necessary? It would be
> better to rely on the compiler's built-in
> macros, if possible. (Even if that
> means changing the Boost source).
>

I adopted this config file (ie I'm not the original author), so I'm
not completely sure. If the compiler is just a thin gcc wrapper,
maybe it is too thin, and doesn't even set macros like this. I'll
look into it.

I agree Boost source should use whatever the "official" macros are, if
any. But boost has supported qnx for a long time, so I suspect it is
doing it correctly. More likely is that this config file is being
overly paranoid...

>> <snip>
>>
>
> In Christ,
> Steven Watanabe

Thanks!
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