[build] Fix OSRM build on GCC 4.9

This commit is contained in:
Ilya Zverev 2016-12-19 13:43:16 +03:00 committed by Vladimir Byko-Ianko
parent 7d5b196a5b
commit 13fe496f8f
2 changed files with 4 additions and 10 deletions

View file

@ -149,8 +149,9 @@ if(CMAKE_BUILD_TYPE MATCHES Release)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0" AND NOT MINGW)
message(STATUS "Using gcc specific binutils for LTO.")
set(CMAKE_AR "/usr/bin/gcc-ar")
set(CMAKE_RANLIB "/usr/bin/gcc-ranlib")
get_filename_component(GCC_PATH "${CMAKE_CXX_COMPILER}" PATH)
set(CMAKE_AR "${GCC_PATH}/gcc-ar")
set(CMAKE_RANLIB "${GCC_PATH}/gcc-ranlib")
endif()
endif()
endif()

View file

@ -112,14 +112,7 @@ build_conf_osrm()
(
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"
else
"$QMAKE" "$OMIM_PATH/omim.pro" -spec $OSPEC "CONFIG+=$CONF osrm"
fi
"$QMAKE" "$OMIM_PATH/omim.pro" ${SPEC:+-spec $SPEC} "CONFIG+=$CONF osrm" ${CONFIG+"CONFIG*=$CONFIG"}
make -j $PROCESSES
)
}