This repository has been archived by the owner on Sep 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
/
blackberry-config.jam
108 lines (90 loc) · 3.35 KB
/
blackberry-config.jam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#
# Copyright 2012 Research In Motion Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.# copyright Research In Motion 2011-2012
#
#
# use this to build Boost for BlackBerry10 by setting it as your user-config via a bjam command line like:
#
# b2 install --prefix=C:\boost\ --user-config=blackberry-config.jam --layout=system toolset=qcc target-os=qnxnto
#
# see bbbb.bat for example (bbbb == Build Boost for BlackBerry)
#
import os ;
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 forget to run bbndk-env.bat? ;
ECHO error: ;
EXIT ;
}
# _cpp uses dinkumware, _gpp uses gnu std::
if $(QNX_TARGET_ARCH) = x86
{
dashVOpt = gcc_ntox86_cpp ;
linkArchDir = x86 ;
}
else
{
dashVOpt = gcc_ntoarmv7le_cpp ;
linkArchDir = armle-v7 ;
}
# python is tricky:
# - need python.exe to run the build system
# - need python include and libs to build Boost.Python
# the above are 2 very separate things! Particularly for cross-compiling!
# the second needs to be the correct python for the target platform.
# Where can you get a port of python for blackberry10??? or QNX in general?
# I don't really know. Hopefully we will post one soon.
# Otherwise start with a *nix variant - it should mostly work.
#
#if [ os.name ] = "NT"
#{
# using python : 2.7 : C:\\Python27
# : C:\\code\\Python-2.7\\armle-v7\\usr\\include\\python2.7
# : C:\\code\\Python-2.7\\armle-v7\\usr\\lib\\python2.7
# : ;
#}
#else
#{
# using python : 2.7 : /usr/lib/python2.7
# : ~/code/Python-2.7/armle-v7/usr/include/python2.7
# : ~/code/Python-2.7/armle-v7/usr/lib/python2.7
# : ;
#}
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 ;