MantisBT - CMake
View Issue Details
0013808CMakeCCMakepublic2012-12-21 07:572013-05-06 09:32
Riku Voipio 
Brad King 
normalminoralways
closedfixed 
64-Bit ARM (Aarch64)Linux3.7
CMake 2.8.10.2 
CMake 2.8.11CMake 2.8.11 
0013808: Please add 64-Bit ARM endianness defines to cmake
When building for 64-Buit ARM (officially known as Aarch64), cmake will fail to build due unknown byte order.

In file included from /data/oe/build/tmp-eglibc/work/aarch64-oe-linux/cmake/2.8.10.1-r0.0/cmake-2.8.10.1/Utilities/KWIML/test/test_ABI_C.c:13:0:
/data/oe/build/tmp-eglibc/work/aarch64-oe-linux/cmake/2.8.10.1-r0.0/cmake-2.8.10.1/Utilities/cmIML/ABI.h:419:3:

error: #error "Byte order of target CPU unknown."

With the attached patch, cmake tests pass on the ARMv8 Foundation model simulator.
mkdir oe
cd oe
git clone git://git.linaro.org/openembedded/meta-aarch64.git [^]
# the last commit has already the attached patch, so rewind from head
git checkout 54d06ed77b0cc11ac1e260ee0ab9751f9ed2c4ed
# this will clone and install a lot of stuff - debian/ubuntu expected.
bash meta-aarch64/scripts/init.sh
cd openembedded-core
. oe-init-build-env ../build
bitbake cmake

The bitbake command will take a long while, as it will compile the crosscompiler and all tools first.

This instruction is based upon the following page:

https://wiki.linaro.org/HowTo/ARMv8/OpenEmbedded [^]
No tags attached.
patch 0001-Add-Aarch64-support.patch (1,783) 2012-12-21 07:57
https://public.kitware.com/Bug/file/4601/0001-Add-Aarch64-support.patch
Issue History
2012-12-21 07:57Riku VoipioNew Issue
2012-12-21 07:57Riku VoipioFile Added: 0001-Add-Aarch64-support.patch
2012-12-21 08:35Brad KingAssigned To => Brad King
2012-12-21 08:35Brad KingStatusnew => assigned
2012-12-21 08:37Brad KingNote Added: 0031937
2012-12-21 08:37Brad KingTarget Version => CMake 2.8.11
2012-12-22 09:55Brad KingNote Added: 0031940
2012-12-22 09:55Brad KingStatusassigned => resolved
2012-12-22 09:55Brad KingResolutionopen => fixed
2012-12-22 09:55Brad KingFixed in Version => CMake 2.8.11
2013-05-06 09:32Robert MaynardNote Added: 0032992
2013-05-06 09:32Robert MaynardStatusresolved => closed

Notes
(0031937)
Brad King   
2012-12-21 08:37   
Thanks! Both KWIML and KWSys are shared with other projects so the entry point for changes is not through CMake. I've split your patch into one for each of the two projects. The KWIML one is here:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34916522 [^]

I'll report back again once the KWSys commit is ready.
(0031940)
Brad King   
2012-12-22 09:55   
Here is the commit in KWSys:

 http://public.kitware.com/gitweb?p=KWSys.git;a=commitdiff;h=8ce09af5 [^]

and the commit bringing it into CMake:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=567e7d94 [^]
(0032992)
Robert Maynard   
2013-05-06 09:32   
Closing resolved issues that have not been updated in more than 4 months.