aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-01-03 17:07:05 -0500
committerJack Lloyd <[email protected]>2017-01-03 17:07:05 -0500
commit34c45bc3d0874ea2bbf1d83fe235d70a8b644b42 (patch)
treef87d9f640442852bbf3e8e9bc22f22d948537c56 /src
parent4bc97ad2412972d3220a19d940c2770aa7c247c6 (diff)
parent1108a2e1942435b4568ed64c7d0701711a4bd13d (diff)
Merge GH #793 Add iOS target
Diffstat (limited to 'src')
-rw-r--r--src/build-data/cc/clang.txt1
-rw-r--r--src/build-data/os/ios.txt26
-rw-r--r--src/lib/entropy/darwin_secrandom/info.txt2
-rwxr-xr-xsrc/scripts/ci/travis/build.sh5
-rw-r--r--src/tests/unit_x509.cpp2
5 files changed, 34 insertions, 2 deletions
diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt
index 055315c3b..15538307c 100644
--- a/src/build-data/cc/clang.txt
+++ b/src/build-data/cc/clang.txt
@@ -80,5 +80,6 @@ x86_64 -> "-m64"
ppc64 -> "-m64"
darwin -> "-stdlib=libc++"
+ios -> "-stdlib=libc++"
netbsd -> "-D_NETBSD_SOURCE"
</mach_abi_linking>
diff --git a/src/build-data/os/ios.txt b/src/build-data/os/ios.txt
new file mode 100644
index 000000000..6f3888b8f
--- /dev/null
+++ b/src/build-data/os/ios.txt
@@ -0,0 +1,26 @@
+os_type unix
+
+soname_pattern_base "libbotan-{version_major}.{version_minor}.dylib"
+soname_pattern_abi "libbotan-{version_major}.{version_minor}.{abi_rev}.dylib"
+soname_pattern_patch "libbotan-{version_major}.{version_minor}.{abi_rev}.{version_patch}.dylib"
+
+# It doesn't have the 's' option; you need to use needs ranlib
+ar_command "ar cr"
+ar_needs_ranlib yes
+
+doc_dir doc
+
+<target_features>
+dlopen
+gettimeofday
+gmtime_r
+memset_s
+readdir
+timegm
+sockets
+threads
+filesystem
+</target_features>
+
+<aliases>
+</aliases>
diff --git a/src/lib/entropy/darwin_secrandom/info.txt b/src/lib/entropy/darwin_secrandom/info.txt
index 2460d8f86..554a4b3d8 100644
--- a/src/lib/entropy/darwin_secrandom/info.txt
+++ b/src/lib/entropy/darwin_secrandom/info.txt
@@ -6,8 +6,10 @@ darwin_secrandom.h
<os>
darwin
+ios
</os>
<frameworks>
darwin -> Security
+ios -> Security
</frameworks>
diff --git a/src/scripts/ci/travis/build.sh b/src/scripts/ci/travis/build.sh
index 22c3ba1ca..df80dd52e 100755
--- a/src/scripts/ci/travis/build.sh
+++ b/src/scripts/ci/travis/build.sh
@@ -75,8 +75,10 @@ if [ "${BUILD_MODE:0:6}" = "cross-" ]; then
CFG_FLAGS+=(--disable-shared)
MAKE_PREFIX=(xcrun --sdk iphoneos)
if [ "$BUILD_MODE" = "cross-arm32" ]; then
+ CFG_FLAGS+=(--os=ios)
CFG_FLAGS+=(--cpu=armv7 --cc-abi-flags="-arch armv7 -arch armv7s -stdlib=libc++")
elif [ "$BUILD_MODE" = "cross-arm64" ]; then
+ CFG_FLAGS+=(--os=ios)
CFG_FLAGS+=(--cpu=armv8-a --cc-abi-flags="-arch arm64 -stdlib=libc++")
fi
elif [ "$TRAVIS_OS_NAME" = "linux" ]; then
@@ -105,7 +107,8 @@ if [ "${BUILD_MODE:0:6}" = "cross-" ]; then
elif [ "$BUILD_MODE" = "cross-win32" ]; then
CC_BIN=i686-w64-mingw32-g++
# No test prefix needed, PE executes as usual with Wine installed
- CFG_FLAGS+=(--cpu=x86_32 --os=mingw --cc-abi-flags="-static" --disable-shared)
+ CFG_FLAGS+=(--os=mingw)
+ CFG_FLAGS+=(--cpu=x86_32 --cc-abi-flags="-static" --disable-shared)
TEST_EXE=./botan-test.exe
fi
fi
diff --git a/src/tests/unit_x509.cpp b/src/tests/unit_x509.cpp
index 28cd46db7..dbaf88cd8 100644
--- a/src/tests/unit_x509.cpp
+++ b/src/tests/unit_x509.cpp
@@ -772,7 +772,7 @@ Test::Result test_x509_extensions(const std::string& sig_algo, const std::string
Test::rng());
/* Create the CA object */
- Botan::X509_CA ca(ca_cert, *ca_key, hash_fn);
+ Botan::X509_CA ca(ca_cert, *ca_key, hash_fn, Test::rng());
std::unique_ptr<Botan::Private_Key> user_key(make_a_private_key(sig_algo));