emeryberger/Hoard

can not cross compile in arm

van201314 opened this issue · 6 comments

when i cross compilt it, it is error:
{standard input}: Assembler messages:
{standard input}:1118: Error: misaligned branch destination
{standard input}:1128: Error: misaligned branch destination
{standard input}:1132: Error: misaligned branch destination
{standard input}: Assembler messages:
{standard input}:356: Error: misaligned branch destination
{standard input}:366: Error: misaligned branch destination
{standard input}:370: Error: misaligned branch destination

any idea?

Can you provide some more information, such as command lines, platform, etc.?

Facing the same problem. used this command option. Reused the above with arm specific compiler
ARM_GCC_COMPILE = /abfdata/ks.giri/toolchain/arm-2010q1/bin/arm-none-linux-gnueabi-g++ -std=c++0x -fno-builtin-malloc -pipe -g $(CPPFLAGS) -fin line-limit=20000 -finline-functions -DNDEBUG $(INCLUDES) -D_REENTRANT=1 -shared $(GNU_SRC) -Bsymbolic -o libhoard.so -ldl -lpthread

The target CPU architecture is cortex ARMV7

What version of C++ compiler are you using?

I just successfully cross-compiled it with the following compiler:

$ arm-linux-gnueabihf-g++ --version
arm-linux-gnueabihf-g++ (Ubuntu/Linaro 4.9.2-10ubuntu10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Results - without Hoard:

$ qemu-arm -L /usr/arm-linux-gnueabihf/ ./threadtest 1 1000 1000 0 1
Running threadtest for 1 threads, 1000 iterations, 1000 objects, 0 work and 1 objSize...
Time elapsed = 2.01558

with Hoard:

$ qemu-arm -L /usr/arm-linux-gnueabihf/ ./threadtest-hoard 1 1000 1000 0 1
Running threadtest for 1 threads, 1000 iterations, 1000 objects, 0 work and 1 objSize...
Time elapsed = 1.22465

I expect that it will work fine as long as you are using a modern C++ compiler.

Updated Makefile with appropriate command line for ARM cross-compilation (commit f7ea721).