Skip to content

Commit d128efc

Browse files
committed
libssl of boringssl (commit 52a2c00; Oct 31 2024) seems to require explicit dependency on C++ lib
1 parent bc43bf8 commit d128efc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cmake/boringssl-adjust.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ FUNCTION (BORINGSSL_ADJUST)
1010
ENDIF ()
1111
LIST(APPEND OPENSSL_CRYPTO_LIBRARIES "${LIBDECREPIT_PATH}")
1212
SET(OPENSSL_CRYPTO_LIBRARIES "${OPENSSL_CRYPTO_LIBRARIES}" PARENT_SCOPE)
13-
LIST(APPEND OPENSSL_LIBRARIES "${LIBDECREPIT_PATH}")
13+
IF (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
14+
SET(CXXLIB "-lc++")
15+
ELSEIF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
16+
SET(CXXLIB "-lstdc++")
17+
ELSE ()
18+
MESSAGE(FATAL_ERROR "do not know how to declare dependency on C++ stdlib even though libssl.a depends on it")
19+
ENDIF ()
20+
LIST(APPEND OPENSSL_LIBRARIES "${LIBDECREPIT_PATH}" "${CXXLIB}")
1421
SET(OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES}" PARENT_SCOPE)
1522
ENDIF ()
1623
ENDFUNCTION ()

0 commit comments

Comments
 (0)