Mercurial > projects > ldc
diff gen/linker.cpp @ 637:29dc68c949b0
Applied the FreeBSD patch from Ralith, closes ticket #95 , slightly changed but basically the same. Thanx Ralith :)
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 02 Oct 2008 03:25:46 +0200 |
parents | aaba4f7c6d8a |
children | 6aaa3d3c1183 |
line wrap: on
line diff
--- a/gen/linker.cpp Thu Oct 02 01:42:21 2008 +0200 +++ b/gen/linker.cpp Thu Oct 02 03:25:46 2008 +0200 @@ -151,15 +151,18 @@ } // default libs - if(global.params.os == OSLinux || global.params.os == OSMacOSX) - { + switch(global.params.os) { + case OSLinux: + case OSMacOSX: + args.push_back("-ldl"); + case OSFreeBSD: args.push_back("-lpthread"); - args.push_back("-ldl"); args.push_back("-lm"); - } - else if (global.params.os == OSWindows) - { + break; + + case OSWindows: // FIXME: I'd assume kernel32 etc + break; } // object files