Unverified Commit 678fa45b by Patrick Steinhardt Committed by GitHub

Merge pull request #4678 from staticfloat/sf/mbedtls_linkage

Link `mbedTLS` libraries in when `SHA1_BACKEND` == "mbedTLS"
parents c103616f 82849b96
...@@ -58,12 +58,12 @@ matrix: ...@@ -58,12 +58,12 @@ matrix:
- compiler: gcc - compiler: gcc
env: env:
MBEDTLS=1 MBEDTLS=1
OPTIONS="-DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release -DUSE_HTTPS=mbedTLS -DMBEDTLS_ROOT_DIR=../deps/mbedtls" OPTIONS="-DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release -DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS -DMBEDTLS_ROOT_DIR=../deps/mbedtls"
os: linux os: linux
- compiler: gcc - compiler: gcc
env: env:
MBEDTLS=1 MBEDTLS=1
OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON -DUSE_HTTPS=mbedTLS -DMBEDTLS_ROOT_DIR=../deps/mbedtls" OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON -DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS -DMBEDTLS_ROOT_DIR=../deps/mbedtls"
os: linux os: linux
allow_failures: allow_failures:
- env: COVERITY=1 - env: COVERITY=1
......
...@@ -284,8 +284,13 @@ ELSEIF(SHA1_BACKEND STREQUAL "CommonCrypto") ...@@ -284,8 +284,13 @@ ELSEIF(SHA1_BACKEND STREQUAL "CommonCrypto")
ELSEIF (SHA1_BACKEND STREQUAL "mbedTLS") ELSEIF (SHA1_BACKEND STREQUAL "mbedTLS")
ADD_FEATURE_INFO(SHA ON "using mbedTLS") ADD_FEATURE_INFO(SHA ON "using mbedTLS")
SET(GIT_SHA1_MBEDTLS 1) SET(GIT_SHA1_MBEDTLS 1)
FILE(GLOB SRC_SHA1 src/hash/hash_mbedtls.c) FILE(GLOB SRC_SHA1 hash/hash_mbedtls.c)
LIST(APPEND LIBGIT2_PC_REQUIRES "mbedtls") LIST(APPEND LIBGIT2_INCLUDES ${MBEDTLS_INCLUDE_DIR})
LIST(APPEND LIBGIT2_LIBS ${MBEDTLS_LIBRARIES})
# mbedTLS has no pkgconfig file, hence we can't require it
# https://github.com/ARMmbed/mbedtls/issues/228
# For now, pass its link flags as our own
LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
ELSE() ELSE()
MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend ${SHA1_BACKEND}") MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend ${SHA1_BACKEND}")
ENDIF() ENDIF()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment