Skip to content

Commit

Permalink
revert all changes regarding --exclude-libs,libcrypto.a
Browse files Browse the repository at this point in the history
I don't have time right now to investigate the impact of this change
  • Loading branch information
graebm committed Aug 23, 2024
1 parent ed3b492 commit 484fdda
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmake/AwsCFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,20 @@ function(aws_set_common_properties target)
# This becomes a define in config.h
set(AWS_HAVE_POSIX_LARGE_FILE_SUPPORT ${HAS_LFS} CACHE BOOL "Posix Large File Support")

# Hide symbols from libcrypto.a
# This avoids problems when an application ends up using both libcrypto.a and libcrypto.so.
#
# An example of this happening is the aws-c-io tests.
# All the C libs are compiled statically, but then a PKCS#11 library is
# loaded at runtime which happens to use libcrypto.so from OpenSSL.
# If the symbols from libcrypto.a aren't hidden, then SOME function calls use the libcrypto.a implementation
# and SOME function calls use the libcrypto.so implementation, and this mismatch leads to weird crashes.
if (UNIX AND NOT APPLE)
# If we used target_link_options() (CMake 3.13+) we could make these flags PUBLIC
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--exclude-libs,libcrypto.a")
endif()


endif()

check_include_file(stdint.h HAS_STDINT)
Expand Down

0 comments on commit 484fdda

Please sign in to comment.