From b81f0887f0dfe23ef1caaab228927fc654d02294 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 6 Feb 2013 14:41:58 +0400 Subject: [PATCH] Carma board support fixed. --- 3rdparty/tbb/arm_linux_stub.cpp | 10 ++++++++++ platforms/linux/arm-gnueabi-hardfp.toolchain.cmake | 10 ++++++++-- platforms/linux/arm-gnueabi-softfp.toolchain.cmake | 10 ++++++++-- platforms/linux/scripts/cmake_carma.sh | 17 +++++++++++++++++ 4 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 3rdparty/tbb/arm_linux_stub.cpp create mode 100755 platforms/linux/scripts/cmake_carma.sh diff --git a/3rdparty/tbb/arm_linux_stub.cpp b/3rdparty/tbb/arm_linux_stub.cpp new file mode 100644 index 0000000..6026bbe --- /dev/null +++ b/3rdparty/tbb/arm_linux_stub.cpp @@ -0,0 +1,10 @@ +#include "tbb/tbb_misc.h" + +namespace tbb { +namespace internal { + +void affinity_helper::protect_affinity_mask() {} +affinity_helper::~affinity_helper() {} + +} +} \ No newline at end of file diff --git a/platforms/linux/arm-gnueabi-hardfp.toolchain.cmake b/platforms/linux/arm-gnueabi-hardfp.toolchain.cmake index dc7424e..823ab3f 100644 --- a/platforms/linux/arm-gnueabi-hardfp.toolchain.cmake +++ b/platforms/linux/arm-gnueabi-hardfp.toolchain.cmake @@ -2,8 +2,14 @@ set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_SYSTEM_PROCESSOR arm) -set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc-4.6) -set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++-4.6) +if (CARMA) + set(GCC_COMPILER_VERSION "4.5" CACHE STRING "GCC Compiler version") +else() + set(GCC_COMPILER_VERSION "4.6" CACHE STRING "GCC Compiler version") +endif() + +set(CMAKE_C_COMPILER arm-linux-gnueabi-gcc-${GCC_COMPILER_VERSION}) +set(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++-${GCC_COMPILER_VERSION}) set(CMAKE_CXX_FLAGS "" CACHE STRING "c++ flags") set(CMAKE_C_FLAGS "" CACHE STRING "c flags") diff --git a/platforms/linux/arm-gnueabi-softfp.toolchain.cmake b/platforms/linux/arm-gnueabi-softfp.toolchain.cmake index 0c9fb3f..93738be 100644 --- a/platforms/linux/arm-gnueabi-softfp.toolchain.cmake +++ b/platforms/linux/arm-gnueabi-softfp.toolchain.cmake @@ -2,8 +2,14 @@ set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_SYSTEM_PROCESSOR arm) -set(CMAKE_C_COMPILER arm-linux-gnueabi-gcc-4.6) -set(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++-4.6) +if (CARMA) + set(GCC_COMPILER_VERSION "4.5" CACHE STRING "GCC Compiler version") +else() + set(GCC_COMPILER_VERSION "4.6" CACHE STRING "GCC Compiler version") +endif() + +set(CMAKE_C_COMPILER arm-linux-gnueabi-gcc-${GCC_COMPILER_VERSION}) +set(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++-${GCC_COMPILER_VERSION}) set(CMAKE_CXX_FLAGS "" CACHE STRING "c++ flags") set(CMAKE_C_FLAGS "" CACHE STRING "c flags") diff --git a/platforms/linux/scripts/cmake_carma.sh b/platforms/linux/scripts/cmake_carma.sh new file mode 100755 index 0000000..e1fba96 --- /dev/null +++ b/platforms/linux/scripts/cmake_carma.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. +# +# NVIDIA Corporation and its licensors retain all intellectual property +# and proprietary rights in and to this software, related documentation +# and any modifications thereto. Any use, reproduction, disclosure or +# distribution of this software and related documentation without an express +# license agreement from NVIDIA Corporation is strictly prohibited. +# + +mkdir -p build_carma +cd build_carma + +cmake -DCARMA=ON -DWITH_TBB=ON -DBUILD_TBB=ON -DUSE_NEON=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/arm-linux-gnueabi/cuda/ \ +-DCUDA_ARCH_BIN="2.1(2.0)" -DCUDA_ARCH_PTX="" -DCMAKE_SKIP_RPATH=ON -DWITH_CUDA=ON -DWITH_CUBLAS=ON \ +-DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi-softfp.toolchain.cmake $@ ../../.. -- 2.7.4