Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorygorshenin <mipt.vi002@gmail.com>2016-12-08 16:36:29 +0300
committerGitHub <noreply@github.com>2016-12-08 16:36:29 +0300
commita9424f93750deea89b81fa64cf13dfaab48a2044 (patch)
tree6101241120740467c41524eeb8344c92e4a45d82 /tools
parent246c843a1224f20549e8c0e14919db466e3a0f51 (diff)
parent96732cb2f41cad7547930cb1297891b140407d2d (diff)
Merge pull request #4841 from mapsme/fixbuildgcc
[build] Fixed build on linux gcc 4.9
Diffstat (limited to 'tools')
-rwxr-xr-xtools/unix/build_omim.sh15
1 files changed, 5 insertions, 10 deletions
diff --git a/tools/unix/build_omim.sh b/tools/unix/build_omim.sh
index 509ca9f7c4..04e2695935 100755
--- a/tools/unix/build_omim.sh
+++ b/tools/unix/build_omim.sh
@@ -46,7 +46,7 @@ if ! grep "DEFAULT_URLS_JSON" "$OMIM_PATH/private.h" >/dev/null 2>/dev/null; the
fi
BOOST_PATH="${BOOST_PATH:-/usr/local/boost_1.54.0}"
-DEVTOOLSET_PATH=/opt/rh/devtoolset-2
+DEVTOOLSET_PATH=/opt/rh/devtoolset-3
if [ -d "$DEVTOOLSET_PATH" ]; then
export MANPATH=
source "$DEVTOOLSET_PATH/enable"
@@ -70,7 +70,7 @@ if [ "$(uname -s)" == "Darwin" ]; then
SPEC=${SPEC:-macx-clang}
PROCESSES=$(sysctl -n hw.ncpu)
else
- SPEC=${SPEC:-linux-clang-libc++}
+ SPEC=${SPEC-}
PROCESSES=$(nproc)
fi
@@ -89,20 +89,13 @@ build_conf()
(
export BOOST_INCLUDEDIR="$BOOST_PATH/include"
cd "$DIRNAME"
- if [ -n "$DEVTOOLSET_PATH" ]; then
- "$QMAKE" "$OMIM_PATH/omim.pro" -spec $SPEC CONFIG+=$CONF ${CONFIG+"CONFIG*=$CONFIG"} \
- "QMAKE_CXXFLAGS *=--gcc-toolchain=$DEVTOOLSET_PATH/root/usr" \
- "QMAKE_LFLAGS *=--gcc-toolchain=$DEVTOOLSET_PATH/root/usr"
- else
- "$QMAKE" "$OMIM_PATH/omim.pro" -spec $SPEC CONFIG+=$CONF ${CONFIG+"CONFIG*=$CONFIG"}
- fi
+ "$QMAKE" "$OMIM_PATH/omim.pro" ${SPEC:+-spec $SPEC} CONFIG+=$CONF ${CONFIG+"CONFIG*=$CONFIG"}
TMP_FILE="build_error.log"
if ! make -j $PROCESSES 2> "$TMP_FILE"; then
echo '--------------------'
cat "$TMP_FILE"
exit 1
fi
- rm "$TMP_FILE"
)
}
@@ -113,12 +106,14 @@ build_conf_osrm()
DIRNAME="$2"
mkdir -p "$DIRNAME"
OSPEC="$SPEC"
+ # OSRM is built with linux-clang spec
[ "$OSPEC" == "linux-clang-libc++" ] && OSPEC=linux-clang
(
export BOOST_INCLUDEDIR="$BOOST_PATH/include"
cd "$DIRNAME"
if [ -n "$DEVTOOLSET_PATH" ]; then
+ # linux-clang spec requires --gcc-toolchain flag
"$QMAKE" "$OMIM_PATH/omim.pro" -spec $OSPEC "CONFIG+=$CONF osrm no-tests" \
"QMAKE_CXXFLAGS *=--gcc-toolchain=$DEVTOOLSET_PATH/root/usr" \
"QMAKE_LFLAGS *=--gcc-toolchain=$DEVTOOLSET_PATH/root/usr"