Recently I try to run linux applications using TBB library on ARM11 MPCore and I got some problems when cross-compiling TBB.
My cross-compilation environment is described here:
Host: Ubuntu Desktop 10.04 32-bit
Target: Embedded Linux (ARM11 MPCore)
Cross compiler: RealView Compilation Tools 4.0 (RVCT 4.0) and Codesourcery G++ 2010q1-202
TBB version: tbb21_20080925oss
TBB patch version: atomic.Raf_Schietekat.20090402
My first problem is that when I used RVCT 4.0 to compile TBB library, I got some syntax error like this:
"../../include/tbb/machine/
gcc_arm.h", line 65: Error: #1083: Inline assembler syntax error
__TBB_M(release,"mcr p15, 0, r0, c7, c10, 5") // Data Memory Barrier
^
"../../include/tbb/machine/gcc_arm.h", line 65: Error: #1066: expected a string literal
__TBB_M(release,"mcr p15, 0, r0, c7, c10, 5") // Data Memory Barrier
It's because TBB source files have many inline assembly code using the GNU assembler syntax (GAS), and it's incompatible with RVCT and vice versa. It seems that I should convert these assembly code with GAS to appropriate syntax for RVCT.
I think it is really a hard work! Can anyone give some suggestions to solve it without modifying TBB source code?
I've refered the two threads(TBB cross compilation on ARM architecture and Help with TBB in Ubuntu 9.04) and successfully cross-compiled TBB library using CodeSourcery G++, but I always got a segmentation fault when running TBB example processes as Mr. clhjoe mentioned in Help
with TBB in Ubuntu 9.04. I'm not sure whether it's a bug or not. Does anyone get similar problems?
Thanks in advance!
stanley76726


