summaryrefslogtreecommitdiff
path: root/platform/linux
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-05-28 16:23:17 +0200
committerKonstantin Käfer <mail@kkaefer.com>2018-05-28 16:23:17 +0200
commit04cb7132ff0dd2fe4d155fe76b21aee5e12697d3 (patch)
treef56e052ad2f79d7761e49822ae8954a45347e6ea /platform/linux
parent7d050c4cdaf65dedad5ffc740c8819b5aa4e1d47 (diff)
downloadqtlocation-mapboxgl-upstream/curl-dynamic.tar.gz
[linux] load cURL dynamically for wider compatibilityupstream/curl-dynamic
Diffstat (limited to 'platform/linux')
-rw-r--r--platform/linux/config.cmake4
-rw-r--r--platform/linux/src/linking.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/platform/linux/config.cmake b/platform/linux/config.cmake
index 53683daef0..687dd42a77 100644
--- a/platform/linux/config.cmake
+++ b/platform/linux/config.cmake
@@ -113,8 +113,10 @@ macro(mbgl_filesource)
target_add_mason_package(mbgl-filesource PUBLIC sqlite)
+ # We're not referencing any cURL symbols since we're dynamically loading it. However, we want to
+ # link the library anyway since we're definitely going to load it on startup anyway.
target_link_libraries(mbgl-filesource
- PUBLIC -lcurl
+ PUBLIC -Wl,--no-as-needed -lcurl -Wl,--as-needed
)
endmacro()
diff --git a/platform/linux/src/linking.cpp b/platform/linux/src/linking.cpp
new file mode 100644
index 0000000000..7deb6020ad
--- /dev/null
+++ b/platform/linux/src/linking.cpp
@@ -0,0 +1,2 @@
+__asm__(".symver powf,powf@GLIBC_2.2.5");
+__asm__(".symver logf,logf@GLIBC_2.2.5");