Merge lp:~sumit-semwal/pocl/arm-chrome-port into lp:~pocl/pocl/trunk

Proposed by Sumit Semwal
Status: Merged
Merged at revision: 736
Proposed branch: lp:~sumit-semwal/pocl/arm-chrome-port
Merge into: lp:~pocl/pocl/trunk
Diff against target: 62 lines (+22/-5)
3 files modified
config/xclang (+9/-1)
configure.ac (+11/-4)
scripts/pocl-build.in (+2/-0)
To merge this branch: bzr merge lp:~sumit-semwal/pocl/arm-chrome-port
Reviewer Review Type Date Requested Status
Sumit Semwal Pending
Kalle Raiskila Pending
Review via email: mp+162627@code.launchpad.net

This proposal supersedes a proposal from 2013-04-30.

Description of the change

ARM chromebook port: some minor build changes needed to get a pocl working set under ubuntu 13.04, with 3.3 llvm.

To post a comment you must log in.
Revision history for this message
Kalle Raiskila (kraiskil) wrote : Posted in a previous version of this proposal

This causes all tests (except AMD's radix sort!) to fail with:

+WARNING: Linking two modules of different target triples: /home/buildbot/buildslave/lp_pocl-ARM/build/lib/kernel/arm/kernel-armv7.bc: 'armv7--' and 'armv4t--'

This on Ubuntu 12.04, ARM CortexA9

review: Needs Fixing
Revision history for this message
Pekka Jääskeläinen (pekka-jaaskelainen) wrote : Posted in a previous version of this proposal

Probably because the kernel binary is compiled with different clang parameters (in devices/common.c) than the kernel library.

Revision history for this message
Kalle Raiskila (kraiskil) wrote : Posted in a previous version of this proposal

Looks like cause is the line(s) 61/62 in the diff. Is that there by mistake?

Revision history for this message
Sumit Semwal (sumit-semwal) wrote : Posted in a previous version of this proposal

Yes, it is due to line(s) 61/62, and yes, it is there by mistake! Sending out a new merge request to test!

review: Needs Resubmitting
726. By Pekka Jääskeläinen

Clang++ 3.3 fails to compile the libstdc++ headers from gcc 4.7 in the std=gnu++11 mode. c++11 works.

727. By Pekka Jääskeläinen

Fixed the test suite status' for i686/Ubuntu 12.04LTS (Pentium 4).

728. By Pekka Jääskeläinen

The rotate case seems to fail on LLVM 3.2. XFAIL back until figured out why.

729. By Pekka Jääskeläinen

egrep instead of grep -e seems to be more compatible.

730. By Kalle Raiskila

Don't choke on doubles in test_rotate

731. By Kalle Raiskila

Add --disable-tce option to configure

732. By Pekka Jääskeläinen

Reverted r725 because it caused all tests using cl.hpp to segfault on CentOS x86_64 and ARM. Added cl.hpp to CLEANFILES.

733. By Kalle Raiskila

Handle LLVM 3.4 gracefully.

734. By Kalle Raiskila

Unmark convert type: it started to pass on PPC

735. By Kalle Raiskila

Fix 729 - x86 only should fail.

736. By Kalle Raiskila

Fix compiler flags for ARM gnueabihf (i.e. Ubuntu 13.04).

Patch by Sumit Semwal. Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config/xclang'
2--- config/xclang 2012-11-21 10:53:42 +0000
3+++ config/xclang 2013-05-06 16:09:33 +0000
4@@ -52,5 +52,13 @@
5 fi
6
7 $CLANG -target $host -c -emit-llvm -o $tmpdir/xclang.bc $@
8-$LLC -mtriple=$build -o $tmpdir/xclang.s $tmpdir/xclang.bc
9+
10+# Adjust $LLC call for hard-float in case the build is that
11+case "$build" in
12+arm*gnueabihf)
13+ $LLC -mtriple=$build -float-abi=hard -o $tmpdir/xclang.s $tmpdir/xclang.bc;;
14+*)
15+ $LLC -mtriple=$build -o $tmpdir/xclang.s $tmpdir/xclang.bc;;
16+esac
17+
18 exec $CLANG -target $build $output $tmpdir/xclang.s
19
20=== modified file 'configure.ac'
21--- configure.ac 2013-04-30 15:30:29 +0000
22+++ configure.ac 2013-05-06 16:09:33 +0000
23@@ -591,15 +591,22 @@
24 ;;
25 esac
26 AC_SUBST([ICD_LD_FLAGS])
27-
28 case $host_cpu in
29 armv7l)
30 AC_MSG_NOTICE([using the ARM optimized kernel lib for the native device])
31- #armv7l seems a popular host_cpu in distros. Clang uses "armv7", though
32- OCL_KERNEL_TARGET="armv7"
33+ # check for gnueabihf, and set clang target accordingly
34+ case $host in
35+ armv7l*gnueabihf)
36+ OCL_KERNEL_TARGET="armv7l-unknown-linux-gnueabihf"
37+ HOST_LLC_FLAGS="$HOST_LLC_FLAGS -float-abi=hard";;
38+ *)
39+ #armv7l seems a popular host_cpu in distros. Clang uses "armv7", though
40+ OCL_KERNEL_TARGET="armv7";;
41+ esac
42+
43 # Assume -lm should not be used. TODO: add an embedded math lib
44 # for compiling kernels for ARM envs without usable math libs.
45- HOST_CLANG_FLAGS="$HOST_CLANG_FLAGS -target $OCL_KERNEL_TARGET -mfloat-abi=hard -fPIC"
46+ HOST_CLANG_FLAGS="$HOST_CLANG_FLAGS -target $OCL_KERNEL_TARGET -mfloat-abi=hard"
47 kernel_dir="arm"
48 CL_DEVICE_ADDRESS_BITS=32
49 ;;
50
51=== modified file 'scripts/pocl-build.in'
52--- scripts/pocl-build.in 2013-04-25 13:51:09 +0000
53+++ scripts/pocl-build.in 2013-05-06 16:09:33 +0000
54@@ -45,6 +45,8 @@
55
56 target_dir=${target}
57 case $target in
58+ arm*gnueabihf) target_dir="arm"
59+ target="armv7l-unknown-linux-gnueabihf";;
60 arm*) target_dir="arm"
61 target="armv7";;
62 cellspu-*) target_dir="cellspu";;