From cfcc24e9d54a5b3c31de8b4a82e55f4ac55ecb82 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 2 Jan 2017 23:34:14 +0100 Subject: Add os ios --- configure.py | 2 +- src/build-data/cc/clang.txt | 1 + src/build-data/os/ios.txt | 26 ++++++++++++++++++++++++++ src/lib/entropy/darwin_secrandom/info.txt | 2 ++ src/scripts/ci/travis/build.sh | 2 ++ 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/build-data/os/ios.txt diff --git a/configure.py b/configure.py index c5e7fcd06..14b995826 100755 --- a/configure.py +++ b/configure.py @@ -2150,7 +2150,7 @@ def main(argv = None): options.compiler = 'gcc' else: options.compiler = 'msvc' - elif options.os == 'darwin' or options.os == 'freebsd': + elif options.os in ['darwin', 'freebsd', 'ios']: if have_program('clang++'): options.compiler = 'clang' elif options.os == 'openbsd': 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" 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 + + +dlopen +gettimeofday +gmtime_r +memset_s +readdir +timegm +sockets +threads +filesystem + + + + 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 darwin +ios darwin -> Security +ios -> Security diff --git a/src/scripts/ci/travis/build.sh b/src/scripts/ci/travis/build.sh index 22c3ba1ca..a27cde117 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 -- cgit v1.2.3