diff options
author | Adam Chlipala <adam@chlipala.net> | 2013-03-19 19:10:31 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2013-03-19 19:10:31 -0400 |
commit | bacf194c5cbeeb8a01b200dc32c5b968f7e62c0f (patch) | |
tree | 20c9b28f515b87c64e3a73959e8cc62545a1d2f1 /src | |
parent | 3d21914a4b831ee9c727dd4296e56961c1e4ea89 (diff) |
Attempt to get more static linking for OpenSSL
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler.sml | 9 |
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 |