# HG changeset patch # User Adam Chlipala # Date 1363734631 14400 # Node ID bcae365efa85c89563f58ec6fece83f833d3d675 # Parent c1e3805e604e509e76ce7d3f78aa50536dbe179c Attempt to get more static linking for OpenSSL diff -r c1e3805e604e -r bcae365efa85 src/compiler.sml --- a/src/compiler.sml Fri Mar 15 16:09:55 2013 -0400 +++ b/src/compiler.sml Tue Mar 19 19:10:31 2013 -0400 @@ -1452,7 +1452,7 @@ 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 @@ 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