summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-10-19 09:12:41 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2016-10-19 09:12:41 (GMT)
commit10afe5f61585db3944c70808af36b74da09ae061 (patch)
tree8e736fa8af1cb2791edb0b06bcc03b0dc06f87ef
parentfab01f4f1a11e0e2db971247a3dd8e00ccb9bcbe (diff)
downloadnetsurf-10afe5f61585db3944c70808af36b74da09ae061.tar.gz
netsurf-10afe5f61585db3944c70808af36b74da09ae061.tar.bz2
fix curl/openssl library link ordering
-rw-r--r--Makefile6
-rw-r--r--frontends/windows/Makefile4
2 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c5c374b..586e61e 100644
--- a/Makefile
+++ b/Makefile
@@ -544,7 +544,10 @@ NETSURF_FEATURE_OPENSSL_CFLAGS := -DWITH_OPENSSL
NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE
NETSURF_FEATURE_NSPSL_CFLAGS := -DWITH_NSPSL
-$(eval $(call pkg_config_find_and_add_enabled,OPENSSL,openssl,OpenSSL))
+# libcurl and openssl ordering matters as if libcurl requires ssl it
+# needs to come first in link order to ensure its symbols can be
+# resolved by the subsequent openssl
+
# freemint does not support pkg-config for libcurl
ifeq ($(HOST),mint)
CFLAGS += $(shell curl-config --cflags)
@@ -552,6 +555,7 @@ ifeq ($(HOST),mint)
else
$(eval $(call pkg_config_find_and_add_enabled,CURL,libcurl,Curl))
endif
+$(eval $(call pkg_config_find_and_add_enabled,OPENSSL,openssl,OpenSSL))
$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG))
$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
diff --git a/frontends/windows/Makefile b/frontends/windows/Makefile
index a3a95d9..cfb1712 100644
--- a/frontends/windows/Makefile
+++ b/frontends/windows/Makefile
@@ -10,8 +10,8 @@ CFLAGS += -I${GCCSDK_INSTALL_ENV}/include/
$(eval $(call pkg_config_find_and_add,libcares,Cares))
$(eval $(call pkg_config_find_and_add,zlib,ZLib))
-
-LDFLAGS += -lssl -lcrypto -lgnurx -lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -mwindows
+# libraries for windows API
+LDFLAGS += -lgnurx -lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -lshlwapi -mwindows
CFLAGS += -U__STRICT_ANSI__ -mwin32
# only windows versions after XP are supported