From e52239f525d59f965dbbc5dbe2c28314498690b0 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Mon, 6 Jan 2020 16:06:35 +0200 Subject: Use prefixed ssl libs when "-openssl-linked" configure params is used As long as we do a multi abi build in one go there is no easy way for us to know where the ssl libs are located for each ABI. The easiest way is to use libs prefixed with the ABI. For configure set we are using "_arm64-v8a" prefix as the configure script will always use arm64-v8a to run the tests. Don't show the OPENSSL_LIBS example as it won't work on Android. Here https://github.com/KDAB/android_openssl/commit/ebb0b68be4 you can find a script which builds these libs. Fixes: QTBUG-80862 Change-Id: I019c2a208ae48a7356b8f3933d0f4aad5ac156a3 Reviewed-by: Andy Shaw --- src/network/configure.json | 6 +++++- src/network/ssl/ssl.pri | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/network/configure.json b/src/network/configure.json index f501465c91..ddf8f4c709 100644 --- a/src/network/configure.json +++ b/src/network/configure.json @@ -93,6 +93,10 @@ "libs": "-llibssl -llibcrypto -lUser32 -lWs2_32 -lAdvapi32 -lCrypt32", "condition": "config.msvc" }, + { + "libs": "-lssl_arm64-v8a -lcrypto_arm64-v8a", + "condition": "config.android" + }, { "libs": "-lssl -lcrypto", "condition": "!config.msvc" @@ -445,7 +449,7 @@ "report": [ { "type": "note", - "condition": "features.openssl-linked && libs.openssl.source != 0 + "condition": "!config.android && features.openssl-linked && libs.openssl.source != 0 && input.openssl.prefix == '' && input.openssl.libs == '' && input.openssl.libs.debug == ''", "message": "When linking against OpenSSL, you can override the default library names through OPENSSL_LIBS. diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri index 8bb70a2aed..a9b7197aca 100644 --- a/src/network/ssl/ssl.pri +++ b/src/network/ssl/ssl.pri @@ -125,9 +125,11 @@ qtConfig(ssl) { # - libs in \lib\VC\static # - configure: -openssl -openssl-linked -I \include -L \lib\VC\static OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32" OPENSSL_LIBS_DEBUG="-lssleay32MDd -llibeay32MDd" OPENSSL_LIBS_RELEASE="-lssleay32MD -llibeay32MD" - qtConfig(openssl-linked): \ - QMAKE_USE_FOR_PRIVATE += openssl - else: \ + qtConfig(openssl-linked): { + android { + build_pass: LIBS_PRIVATE += -lssl_$${QT_ARCH} -lcrypto_$${QT_ARCH} + } else: QMAKE_USE_FOR_PRIVATE += openssl + } else: \ QMAKE_USE_FOR_PRIVATE += openssl/nolink win32 { LIBS_PRIVATE += -lcrypt32 -- cgit v1.2.3