Skip to content

Commit

Permalink
[MbedTLS] Require C99 standard
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Sep 16, 2020
1 parent 1fbf1bf commit 3dce35b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions M/MbedTLS/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ sources = [
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/mbedtls
mkdir -p $prefix/lib
# llvm-ranlib gets confused, use the binutils one
if [[ "${target}" == *apple* ]]; then
Expand All @@ -21,9 +20,13 @@ if [[ "${target}" == *apple* ]]; then
fi
# enable MD4
sed "s|//#define MBEDTLS_MD4_C|#define MBEDTLS_MD4_C|" -i include/mbedtls/config.h
sed "s|//#define MBEDTLS_MD4_C|#define MBEDTLS_MD4_C|" -i include/mbedtls/config.h
cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}" -DUSE_SHARED_MBEDTLS_LIBRARY=On
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
-DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}" \
-DCMAKE_C_STANDARD=99 \
-DUSE_SHARED_MBEDTLS_LIBRARY=On
make -j${nproc} && make install
"""

Expand All @@ -39,9 +42,8 @@ products = [
]

# Dependencies that must be installed before this package can be built
dependencies = [
dependencies = Dependency[
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)

0 comments on commit 3dce35b

Please sign in to comment.