comparison 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
comparison
equal deleted inserted replaced
636:9fb1f559d9e9 637:29dc68c949b0
149 char *p = (char *)global.params.libfiles->data[i]; 149 char *p = (char *)global.params.libfiles->data[i];
150 args.push_back(p); 150 args.push_back(p);
151 } 151 }
152 152
153 // default libs 153 // default libs
154 if(global.params.os == OSLinux || global.params.os == OSMacOSX) 154 switch(global.params.os) {
155 { 155 case OSLinux:
156 case OSMacOSX:
157 args.push_back("-ldl");
158 case OSFreeBSD:
156 args.push_back("-lpthread"); 159 args.push_back("-lpthread");
157 args.push_back("-ldl");
158 args.push_back("-lm"); 160 args.push_back("-lm");
159 } 161 break;
160 else if (global.params.os == OSWindows) 162
161 { 163 case OSWindows:
162 // FIXME: I'd assume kernel32 etc 164 // FIXME: I'd assume kernel32 etc
165 break;
163 } 166 }
164 167
165 // object files 168 // object files
166 for (int i = 0; i < global.params.objfiles->dim; i++) 169 for (int i = 0; i < global.params.objfiles->dim; i++)
167 { 170 {