summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-03-19 19:10:31 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2013-03-19 19:10:31 -0400
commit6a2898e76aa2cb8bae61e0e4f6496dbc23819dd0 (patch)
tree20c9b28f515b87c64e3a73959e8cc62545a1d2f1 /src
parent115361547594fd6773de3a0c9235fccd9962dd9c (diff)
Attempt to get more static linking for OpenSSL
Diffstat (limited to 'src')
-rw-r--r--src/compiler.sml9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index 77542811..3efa3694 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -1452,7 +1452,7 @@ fun compileC {cname, oname, ename, libs, profile, debug, linker, link = link'} =
val proto = Settings.currentProtocol ()
val lib = if Settings.getStaticLinking () then
- " " ^ !Settings.configLib ^ "/" ^ #linkStatic proto ^ " " ^ !Settings.configLib ^ "/liburweb.a"
+ " -static " ^ !Settings.configLib ^ "/" ^ #linkStatic proto ^ " " ^ !Settings.configLib ^ "/liburweb.a"
else
"-L" ^ !Settings.configLib ^ " " ^ #linkDynamic proto ^ " -lurweb"
@@ -1468,8 +1468,13 @@ fun compileC {cname, oname, ename, libs, profile, debug, linker, link = link'} =
val linker = Option.getOpt (linker, Config.ccompiler ^ " -Werror" ^ opt ^ " " ^ Config.ccArgs ^ " " ^ Config.pthreadCflags ^ " " ^ Config.pthreadLibs)
+ val ssl = if Settings.getStaticLinking () then
+ Config.openssl ^ " -ldl -lz"
+ else
+ Config.openssl
+
val link = linker
- ^ " " ^ lib ^ " " ^ escapeFilename oname ^ " -lm " ^ Config.openssl ^ " " ^ libs ^ " -o " ^ escapeFilename ename
+ ^ " " ^ lib ^ " " ^ escapeFilename oname ^ " -lm " ^ ssl ^ " " ^ libs ^ " -o " ^ escapeFilename ename
val (compile, link) =
if profile then