diff --git a/Makefile.frag b/Makefile.frag index b469976..acee1c6 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -10,30 +10,13 @@ ifeq (, $(shell which cmake3)) CMAKE = cmake endif -# download and build libcrypto.a for the CRT with -fPIC -$(DEPS_DIR)/openssl: - @echo Fetching libcrypto source - git clone --depth=1 --single-branch --branch OpenSSL_1_1_1-stable https://github.com/openssl/openssl.git $(DEPS_DIR)/openssl - -$(INT_DIR)/lib/libcrypto.a: $(DEPS_DIR)/openssl - @echo Building libcrypto - cd $(DEPS_DIR)/openssl && \ - ./config -fPIC no-md2 no-rc5 no-rfc3779 no-sctp no-ssl-trace no-zlib no-hw no-mdc2 no-seed no-idea \ - no-camellia no-bf no-dsa no-ssl3 no-capieng \ - -DSSL_FORBID_ENULL -DOPENSSL_NO_DTLS1 -DOPENSSL_NO_HEARTBEATS \ - --prefix=$(INT_DIR) --openssldir=$(INT_DIR) && \ - make -j && \ - make install_sw - mkdir -p $(INT_DIR)/lib - ln -s $(INT_DIR)/lib64/libcrypto.a $(INT_DIR)/lib/libcrypto.a || true - CMAKE_CONFIGURE = $(CMAKE) -DCMAKE_INSTALL_PREFIX=$(INT_DIR) -DCMAKE_PREFIX_PATH=$(INT_DIR) -DBUILD_TESTING=OFF CMAKE_BUILD = $(CMAKE) --build CMAKE_BUILD_TYPE ?= RelWithDebInfo CMAKE_TARGET = --config $(CMAKE_BUILD_TYPE) --target install # configure for shared aws-crt-ffi.so -$(BUILD_DIR)/aws-crt-ffi-shared/CMakeCache.txt: $(INT_DIR)/lib/libcrypto.a +$(BUILD_DIR)/aws-crt-ffi-shared/CMakeCache.txt: $(CMAKE_CONFIGURE) -Hcrt/aws-crt-ffi -Bbuild/aws-crt-ffi-shared -DBUILD_SHARED_LIBS=ON # build shared libaws-crt-ffi.so @@ -41,7 +24,7 @@ $(BUILD_DIR)/aws-crt-ffi-shared/libaws-crt-ffi.so: $(BUILD_DIR)/aws-crt-ffi-shar $(CMAKE_BUILD) build/aws-crt-ffi-shared $(CMAKE_TARGET) # configure for static aws-crt-ffi.a -$(BUILD_DIR)/aws-crt-ffi-static/CMakeCache.txt: $(INT_DIR)/lib/libcrypto.a +$(BUILD_DIR)/aws-crt-ffi-static/CMakeCache.txt: $(CMAKE_CONFIGURE) -Hcrt/aws-crt-ffi -Bbuild/aws-crt-ffi-static -DBUILD_SHARED_LIBS=OFF # build static libaws-crt-ffi.a diff --git a/config.m4 b/config.m4 index 25c11e6..9f0b1fe 100644 --- a/config.m4 +++ b/config.m4 @@ -8,8 +8,8 @@ PHP_ARG_WITH(awscrt) if test "$PHP_AWSCRT" != "no"; then # force lib paths to be absolute, or PHP will mangle them cwd=`pwd` - CRT_LIBPATHS="-L${cwd}/build/install/lib" - CRT_LIBS="-laws-crt-ffi -laws-c-auth -laws-c-http -laws-c-cal -laws-c-io -laws-c-compression -laws-c-common -ls2n -l:libcrypto.a" + CRT_LIBPATHS="-L${cwd}/build/install/lib -L${cwd}/build/install/lib64" + CRT_LIBS="-laws-crt-ffi -laws-c-auth -laws-c-http -laws-c-io -laws-c-cal -laws-c-compression -laws-c-common -ls2n -l:libcrypto.a" PHP_ADD_INCLUDE(${cwd}/build/install/include) PHP_EVAL_LIBLINE([$CRT_LIBPATHS $CRT_LIBS], AWSCRT_SHARED_LIBADD) diff --git a/crt/aws-crt-ffi b/crt/aws-crt-ffi index 56b60e5..ea85a85 160000 --- a/crt/aws-crt-ffi +++ b/crt/aws-crt-ffi @@ -1 +1 @@ -Subproject commit 56b60e586b684ff1e8d84ab27f7796707ac752df +Subproject commit ea85a85a82128a2c32378a5fc40249f27c46c8f5