[Replicate] compatibility with PHP 5.x (#97)

original: https://github.com/awslabs/aws-crt-php/pull/96

- Make sure run the test... Run the test for php5.5
- Add readme section about the mismatch of libcrypto from php and awscrt. 

---------

Co-authored-by: Remi Collet <[email protected]>
This commit is contained in:
Dengke Tang
2023-03-24 13:22:19 -07:00
committed by GitHub
co-authored by Remi Collet
parent ed3f8ca16d
commit 1926277fc7
4 changed files with 31 additions and 10 deletions
+11
View File
@@ -16,8 +16,19 @@ ifneq (OFF,$(USE_OPENSSL))
ifneq (ON,$(USE_OPENSSL))
CMAKE_PREFIX_PATH=-DCMAKE_PREFIX_PATH=$(USE_OPENSSL)
endif
else
# 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.
EXTRA_LDFLAGS="-Wl,--exclude-libs,libcrypto.a"
endif
CMAKE_CONFIGURE = $(CMAKE) \
-DCMAKE_SOURCE_DIR=$(srcdir) \
-DCMAKE_BINARY_DIR=$(CMAKE_BUILD_DIR) \