aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-10-16 12:12:49 +0200
committerSimon Warta <[email protected]>2015-10-16 12:12:49 +0200
commitf257cb324614adb5f9266ca185ab2bfeb64b1dd4 (patch)
treeebc1e2bea4a77f194dbd69f8d76d44df52336e09
parentbe33a49c734b5b83cbf64fa132c062ba8643bbe1 (diff)
parentdb96431235190ebe7ec50ddbc73d3a05e4e712d0 (diff)
Merge pull request #298 from tiwoc/arm64
Support for 64 bit ARM
-rw-r--r--.travis.yml10
-rw-r--r--src/build-data/arch/arm32.txt (renamed from src/build-data/arch/arm.txt)2
-rw-r--r--src/build-data/arch/arm64.txt12
-rw-r--r--src/build-data/cc/gcc.txt3
-rw-r--r--src/lib/utils/bswap.h4
-rwxr-xr-xsrc/scripts/ci/travis/build.sh22
6 files changed, 39 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml
index 2f268564c..2efbb1f91 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,7 +18,7 @@ os:
- linux
- osx
-osx_image: xcode6.4
+osx_image: xcode7
compiler:
- clang
@@ -34,8 +34,8 @@ env:
- TARGETOS="desktop" MODULES="min" BUILD_MODE="shared"
- TARGETOS="desktop" MODULES="min" BUILD_MODE="static"
- - TARGETOS="ios" MODULES="all" BUILD_MODE="shared"
- - TARGETOS="ios" MODULES="all" BUILD_MODE="static"
+ - TARGETOS="ios32" MODULES="all" BUILD_MODE="static"
+ - TARGETOS="ios64" MODULES="all" BUILD_MODE="static"
matrix:
exclude:
@@ -50,9 +50,9 @@ matrix:
- compiler: clang
env: TARGETOS="desktop" MODULES="min" BUILD_MODE="static"
- os: linux
- env: TARGETOS="ios" MODULES="all" BUILD_MODE="shared"
+ env: TARGETOS="ios32" MODULES="all" BUILD_MODE="static"
- os: linux
- env: TARGETOS="ios" MODULES="all" BUILD_MODE="static"
+ env: TARGETOS="ios64" MODULES="all" BUILD_MODE="static"
# END BUILD MATRIX
cache:
diff --git a/src/build-data/arch/arm.txt b/src/build-data/arch/arm32.txt
index 81ecc05c3..67be376d6 100644
--- a/src/build-data/arch/arm.txt
+++ b/src/build-data/arch/arm32.txt
@@ -1,8 +1,8 @@
-
endian little
family arm
<aliases>
+arm
armel # For Debian
armhf # For Debian
evbarm # For NetBSD
diff --git a/src/build-data/arch/arm64.txt b/src/build-data/arch/arm64.txt
new file mode 100644
index 000000000..362cf88d3
--- /dev/null
+++ b/src/build-data/arch/arm64.txt
@@ -0,0 +1,12 @@
+endian little
+wordsize 64
+
+family arm
+
+<aliases>
+aarch64
+</aliases>
+
+<submodels>
+armv8-a
+</submodels>
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index 877ce4d58..4eacacef2 100644
--- a/src/build-data/cc/gcc.txt
+++ b/src/build-data/cc/gcc.txt
@@ -91,7 +91,8 @@ sh4 -> "-m4 -mieee"
# *removed* from the submodel name before it's put into SUBMODEL.
alpha -> "-mcpu=SUBMODEL" alpha-
-arm -> "-march=SUBMODEL"
+arm32 -> "-march=SUBMODEL"
+arm64 -> "-march=SUBMODEL"
superh -> "-mSUBMODEL" sh
hppa -> "-march=SUBMODEL" hppa
ia64 -> "-mtune=SUBMODEL"
diff --git a/src/lib/utils/bswap.h b/src/lib/utils/bswap.h
index 6773b196d..beb3f9555 100644
--- a/src/lib/utils/bswap.h
+++ b/src/lib/utils/bswap.h
@@ -31,7 +31,7 @@ inline u16bit reverse_bytes(u16bit val)
*/
inline u32bit reverse_bytes(u32bit val)
{
-#if BOTAN_GCC_VERSION >= 430 && !defined(BOTAN_TARGET_CPU_IS_ARM_FAMILY)
+#if BOTAN_GCC_VERSION >= 430 && !defined(BOTAN_TARGET_ARCH_IS_ARM32)
/*
GCC intrinsic added in 4.3, works for a number of CPUs
@@ -47,7 +47,7 @@ inline u32bit reverse_bytes(u32bit val)
asm("bswapl %0" : "=r" (val) : "0" (val));
return val;
-#elif defined(BOTAN_USE_GCC_INLINE_ASM) && defined(BOTAN_TARGET_CPU_IS_ARM_FAMILY)
+#elif defined(BOTAN_USE_GCC_INLINE_ASM) && defined(BOTAN_TARGET_ARCH_IS_ARM32)
asm ("eor r3, %1, %1, ror #16\n\t"
"bic r3, r3, #0x00FF0000\n\t"
diff --git a/src/scripts/ci/travis/build.sh b/src/scripts/ci/travis/build.sh
index e1ced58d3..369450091 100755
--- a/src/scripts/ci/travis/build.sh
+++ b/src/scripts/ci/travis/build.sh
@@ -23,7 +23,7 @@ if [ "$CXX" = "g++" ]; then
export CXX="/usr/bin/g++-4.8"
fi
-#enable ccache
+# enable ccache
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
ccache --max-size=30M
ccache --show-stats
@@ -31,10 +31,17 @@ if [ "$TRAVIS_OS_NAME" = "linux" ]; then
export CXX="ccache $CXX"
fi
-if [ "$TARGETOS" = "ios" ]; then
+# configure
+if [ "$TARGETOS" = "ios32" ]; then
./configure.py "${CFG_FLAGS[@]}" --cpu=armv7 --cc=clang \
- --cc-abi-flags="-arch armv7 -arch armv7s -stdlib=libc++ --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/" \
+ --cc-abi-flags="-arch armv7 -arch armv7s -stdlib=libc++" \
--prefix=/tmp/botan-installation
+
+elif [ "$TARGETOS" = "ios64" ]; then
+ ./configure.py "${CFG_FLAGS[@]}" --cpu=armv8-a --cc=clang \
+ --cc-abi-flags="-arch arm64 -stdlib=libc++" \
+ --prefix=/tmp/botan-installation
+
else
$CXX --version
./configure.py "${CFG_FLAGS[@]}" --cc="$CC" --cc-bin="$CXX" \
@@ -42,9 +49,14 @@ else
--prefix=/tmp/botan-installation
fi
-make -j 2
+# build
+if [ "${TARGETOS:0:3}" = "ios" ]; then
+ xcrun --sdk iphoneos make -j 2
+else
+ make -j 2
+fi
-if [ "$MODULES" != "min" ] && [ "$TARGETOS" != "ios" ]; then
+if [ "$MODULES" != "min" ] && [ "${TARGETOS:0:3}" != "ios" ]; then
./botan-test
fi