link.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  1. {
  2. $Id$
  3. Copyright (c) 1998 by the FPC development team
  4. This unit handles the linker and binder calls for programs and
  5. libraries
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. ****************************************************************************
  18. }
  19. Unit link;
  20. Interface
  21. uses cobjects,files;
  22. Type
  23. TLinker = Object
  24. Glibc2,
  25. LinkToC, { Should we link to the C libs? }
  26. Strip : Boolean; { Strip symbols ? }
  27. ObjectFiles,
  28. SharedLibFiles,
  29. StaticLibFiles : TStringContainer;
  30. LibrarySearchPath, { Search path for libraries }
  31. LinkOptions : string; { Additional options to the linker }
  32. DynamicLinker : String[80]; { What Dynamic linker ? }
  33. LinkResName : String[32]; { Name of response file }
  34. { Methods }
  35. Constructor Init;
  36. Destructor Done;
  37. procedure AddModuleFiles(hp:pmodule);
  38. function FindObjectFile(s : string) : string;
  39. function FindLibraryFile(s:string;const ext:string) : string;
  40. Procedure AddObject(const S : String);
  41. Procedure AddStaticLibrary(const S : String);
  42. Procedure AddSharedLibrary(S : String);
  43. Function FindLinker:String; { Find linker, sets Name }
  44. Function DoExec(const command,para:string;info,useshell:boolean):boolean;
  45. Function WriteResponseFile:Boolean;
  46. Function MakeExecutable:boolean;
  47. Procedure MakeStaticLibrary(filescnt:longint);
  48. Procedure MakeSharedLibrary;
  49. end;
  50. PLinker=^TLinker;
  51. Var
  52. Linker : TLinker;
  53. Implementation
  54. uses
  55. globtype,systems,
  56. script,globals,verbose
  57. {$ifdef i386}
  58. ,win_targ
  59. {$endif}
  60. {$ifdef linux}
  61. ,linux
  62. {$endif}
  63. ,dos
  64. ;
  65. {$ifndef linux}
  66. Procedure Shell(command:string);
  67. { This is already defined in the linux.ppu for linux, need for the *
  68. expansion under linux }
  69. var
  70. comspec : string;
  71. begin
  72. comspec:=getenv('COMSPEC');
  73. Exec(comspec,' /C '+command);
  74. end;
  75. {$endif}
  76. Constructor TLinker.Init;
  77. begin
  78. ObjectFiles.Init_no_double;
  79. SharedLibFiles.Init_no_double;
  80. StaticLibFiles.Init_no_double;
  81. LinkToC:=False;
  82. Glibc2:=false;
  83. Strip:=false;
  84. LinkOptions:='';
  85. {$ifdef linux}
  86. { first try glibc2 }
  87. DynamicLinker:='/lib/ld-linux.so.2';
  88. if FileExists(DynamicLinker) then
  89. Glibc2:=true
  90. else
  91. DynamicLinker:='/lib/ld-linux.so.1';
  92. LibrarySearchPath:='/lib;/usr/lib';
  93. {$else}
  94. DynamicLinker:='';
  95. LibrarySearchPath:='';
  96. {$endif}
  97. LinkResName:='link.res';
  98. end;
  99. Destructor TLinker.Done;
  100. begin
  101. ObjectFiles.Done;
  102. SharedLibFiles.Done;
  103. StaticLibFiles.Done;
  104. end;
  105. procedure TLinker.AddModuleFiles(hp:pmodule);
  106. begin
  107. with hp^ do
  108. begin
  109. while not linkunitfiles.empty do
  110. AddObject(linkunitfiles.Get);
  111. while not linkofiles.empty do
  112. AddObject(linkofiles.Get);
  113. while not linksharedlibs.empty do
  114. AddSharedLibrary(linksharedlibs.Get);
  115. while not linkstaticlibs.empty do
  116. AddStaticLibrary(linkstaticlibs.Get);
  117. end;
  118. end;
  119. var
  120. LastLDBin : string;
  121. Function TLinker.FindLinker:string;
  122. var
  123. ldfound : boolean;
  124. begin
  125. if LastLDBin='' then
  126. begin
  127. if utilsdirectory<>'' then
  128. begin
  129. LastLDBin:=Search(target_link.linkbin+source_os.exeext,
  130. utilsdirectory,ldfound)+target_link.linkbin+source_os.exeext;
  131. end
  132. else
  133. LastLDBin:=FindExe(target_link.linkbin,ldfound);
  134. if (not ldfound) and not(cs_link_extern in aktglobalswitches) then
  135. begin
  136. Message1(exec_w_linker_not_found,LastLDBin);
  137. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  138. end;
  139. if ldfound then
  140. Message1(exec_t_using_linker,LastLDBin);
  141. end;
  142. FindLinker:=LastLDBin;
  143. end;
  144. { searches an object file }
  145. function TLinker.FindObjectFile(s:string) : string;
  146. var
  147. found : boolean;
  148. begin
  149. if pos('.',s)=0 then
  150. s:=s+target_info.objext;
  151. s:=FixFileName(s);
  152. if FileExists(s) then
  153. begin
  154. Findobjectfile:=s;
  155. exit;
  156. end;
  157. findobjectfile:=search(s,'.;'+unitsearchpath+';'+exepath,found)+s;
  158. { if not found then check the object searchpath also }
  159. if not found then
  160. findobjectfile:=search(s,objectsearchpath,found)+s;
  161. if not(cs_link_extern in aktglobalswitches) and (not found) then
  162. Message1(exec_w_objfile_not_found,s);
  163. end;
  164. { searches an library file }
  165. function TLinker.FindLibraryFile(s:string;const ext:string) : string;
  166. var
  167. found : boolean;
  168. begin
  169. if pos('.',s)=0 then
  170. s:=s+ext;
  171. if FileExists(s) then
  172. begin
  173. FindLibraryFile:=s;
  174. exit;
  175. end;
  176. findlibraryfile:=search(s,'.;'+librarysearchpath+';'+exepath,found)+s;
  177. if not(cs_link_extern in aktglobalswitches) and (not found) then
  178. Message1(exec_w_libfile_not_found,s);
  179. end;
  180. Procedure TLinker.AddObject(const S : String);
  181. begin
  182. ObjectFiles.Insert(FindObjectFile(s));
  183. end;
  184. Procedure TLinker.AddSharedLibrary(S:String);
  185. begin
  186. { remove prefix 'lib' }
  187. if Copy(s,1,length(target_os.libprefix))=target_os.libprefix then
  188. Delete(s,1,length(target_os.libprefix));
  189. { remove extension if any }
  190. if Copy(s,length(s)-length(target_os.sharedlibext)+1,length(target_os.sharedlibext))=target_os.sharedlibext then
  191. Delete(s,length(s)-length(target_os.sharedlibext)+1,length(target_os.sharedlibext)+1);
  192. { ready to be inserted }
  193. SharedLibFiles.Insert (S);
  194. end;
  195. Procedure TLinker.AddStaticLibrary(const S:String);
  196. begin
  197. StaticLibFiles.Insert(FindLibraryFile(s,target_os.staticlibext));
  198. end;
  199. Function TLinker.DoExec(const command,para:string;info,useshell:boolean):boolean;
  200. begin
  201. DoExec:=true;
  202. if not(cs_link_extern in aktglobalswitches) then
  203. begin
  204. swapvectors;
  205. if useshell then
  206. shell(command+' '+para)
  207. else
  208. exec(command,para);
  209. swapvectors;
  210. if (doserror<>0) then
  211. begin
  212. Message(exec_w_cant_call_linker);
  213. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  214. DoExec:=false;
  215. end
  216. else
  217. if (dosexitcode<>0) then
  218. begin
  219. Message(exec_w_error_while_linking);
  220. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  221. DoExec:=false;
  222. end;
  223. end;
  224. { Update asmres when externmode is set }
  225. if cs_link_extern in aktglobalswitches then
  226. begin
  227. if info then
  228. AsmRes.AddLinkCommand(Command,Para,current_module^.exefilename^)
  229. else
  230. AsmRes.AddLinkCommand(Command,Para,'');
  231. end;
  232. end;
  233. Function TLinker.WriteResponseFile : Boolean;
  234. Var
  235. LinkResponse : Text;
  236. i : longint;
  237. prtobj,s,s2 : string;
  238. found,linux_link_c,
  239. linklibc : boolean;
  240. procedure WriteRes(const s:string);
  241. begin
  242. if s<>'' then
  243. WriteLn(Linkresponse,s);
  244. end;
  245. begin
  246. WriteResponseFile:=False;
  247. linux_link_c:=false;
  248. { set special options for some targets }
  249. linklibc:=SharedLibFiles.Find('c');
  250. prtobj:='prt0';
  251. case target_info.target of
  252. target_m68k_Palmos,
  253. target_i386_Win32 :
  254. begin
  255. if DLLsource then
  256. prtobj:='wdllprt0'
  257. else
  258. prtobj:='wprt0';
  259. end;
  260. target_m68k_linux,
  261. target_i386_linux :
  262. begin
  263. if cs_profile in aktmoduleswitches then
  264. begin
  265. prtobj:='gprt0';
  266. if not glibc2 then
  267. AddSharedLibrary('gmon');
  268. AddSharedLibrary('c');
  269. linklibc:=true;
  270. end
  271. else
  272. begin
  273. if linklibc then
  274. prtobj:='cprt0';
  275. end;
  276. if linklibc then
  277. linux_link_c:=true;
  278. end;
  279. end;
  280. { Fix command line options }
  281. If not SharedLibFiles.Empty then
  282. LinkOptions:='-dynamic-linker='+DynamicLinker+' '+LinkOptions;
  283. if Strip and not(cs_debuginfo in aktmoduleswitches) then
  284. LinkOptions:=LinkOptions+' '+target_link.stripopt;
  285. { Open linkresponse and write header }
  286. assign(linkresponse,current_module^.outpath^+LinkResName);
  287. {$I-}
  288. rewrite(linkresponse);
  289. {$I+}
  290. if ioresult<>0 then
  291. exit;
  292. { Write library searchpath }
  293. S2:=LibrarySearchPath;
  294. Repeat
  295. i:=Pos(';',S2);
  296. If i=0 then
  297. i:=255;
  298. S:=Copy(S2,1,i-1);
  299. If S<>'' then
  300. WriteRes(target_link.libpathprefix+s+target_link.libpathsuffix);
  301. Delete (S2,1,i);
  302. until S2='';
  303. WriteRes(target_link.inputstart);
  304. { add objectfiles, start with prt0 always }
  305. if prtobj<>'' then
  306. WriteRes(FindObjectFile(prtobj));
  307. if {linklibc this is only for linux }linux_link_c then
  308. begin
  309. WriteRes(search('crti.o',librarysearchpath,found)+'crti.o');
  310. WriteRes(search('crtbegin.o',librarysearchpath,found)+'crtbegin.o');
  311. end;
  312. while not ObjectFiles.Empty do
  313. begin
  314. s:=ObjectFiles.Get;
  315. if s<>'' then
  316. WriteRes(s);
  317. end;
  318. if linux_link_c then
  319. begin
  320. WriteRes(search('crtend.o',librarysearchpath,found)+'crtend.o');
  321. WriteRes(search('crtn.o',librarysearchpath,found)+'crtn.o');
  322. end;
  323. { Write sharedlibraries like -l<lib> }
  324. While not SharedLibFiles.Empty do
  325. begin
  326. S:=SharedLibFiles.Get;
  327. if s<>'c' then
  328. begin
  329. i:=Pos(target_os.sharedlibext,S);
  330. if i>0 then
  331. Delete(S,i,255);
  332. WriteRes(target_link.libprefix+s);
  333. end
  334. else
  335. linklibc:=true;
  336. end;
  337. { be sure that libc is the last lib }
  338. { arghhhh this is wrong for DJGPP !!!
  339. DJGPP need gcc after c lib (umod...) (PM) }
  340. if linklibc then
  341. WriteRes(target_link.libprefix+'c');
  342. { add libgcc after ! }
  343. if linklibc and (target_info.target=target_i386_go32v2) then
  344. WriteRes(target_link.libprefix+'gcc');
  345. WriteRes(target_link.inputend);
  346. { Write staticlibraries }
  347. if not StaticLibFiles.Empty then
  348. begin
  349. WriteRes(target_link.GroupStart);
  350. While not StaticLibFiles.Empty do
  351. begin
  352. S:=StaticLibFiles.Get;
  353. WriteRes(s)
  354. end;
  355. WriteRes(target_link.GroupEnd);
  356. end;
  357. { Close response }
  358. close(linkresponse);
  359. WriteResponseFile:=True;
  360. end;
  361. function TLinker.MakeExecutable:boolean;
  362. var
  363. bindbin : string[80];
  364. bindfound : boolean;
  365. s : string;
  366. success : boolean;
  367. ii : longint;
  368. begin
  369. {$ifdef linux}
  370. if LinkToC then
  371. begin
  372. AddObject('/usr/lib/crt0.o');
  373. AddObject('lprt');
  374. AddStaticLibrary('libc.a');
  375. AddStaticLibrary('libgcc.a');
  376. end;
  377. {$endif Linux}
  378. { Write used files and libraries }
  379. WriteResponseFile;
  380. { Call linker }
  381. if not(cs_link_extern in aktglobalswitches) then
  382. Message1(exec_i_linking,current_module^.exefilename^);
  383. s:=target_link.linkcmd;
  384. if DLLsource then
  385. Replace(s,'$EXE',current_module^.sharedlibfilename^)
  386. else
  387. Replace(s,'$EXE',current_module^.exefilename^);
  388. Replace(s,'$OPT',LinkOptions);
  389. Replace(s,'$RES',current_module^.outpath^+LinkResName);
  390. success:=DoExec(FindLinker,s,true,false);
  391. {Bind}
  392. if (target_link.bindbin[1]<>'') and
  393. ((target_info.target<>target_i386_win32) or bind_win32_dll) then
  394. for ii:=1 to target_link.binders do
  395. begin
  396. s:=target_link.bindcmd[ii];
  397. Replace(s,'$OPT',LinkOptions);
  398. Replace(s,'$RES',current_module^.outpath^+LinkResName);
  399. if DLLsource then
  400. Replace(s,'$EXE',current_module^.sharedlibfilename^)
  401. else
  402. Replace(s,'$EXE',current_module^.exefilename^);
  403. {Size of the heap when an EMX program runs in OS/2.}
  404. Replace(s,'$HEAPMB',tostr((maxheapsize+1048575) shr 20));
  405. {Size of the stack when an EMX program runs in OS/2.}
  406. Replace(s,'$STACKKB',tostr((stacksize+1023) shr 10));
  407. {When an EMX program runs in DOS, the heap and stack share the
  408. same memory pool. The heap grows upwards, the stack grows downwards.}
  409. Replace(s,'$DOSHEAPKB',tostr((stacksize+maxheapsize+1023) shr 10));
  410. if utilsdirectory<>'' then
  411. begin
  412. bindbin:=Search(target_link.bindbin[ii]+source_os.exeext,
  413. utilsdirectory,bindfound)+target_link.bindbin[ii]+source_os.exeext;
  414. end
  415. else
  416. bindbin:=FindExe(target_link.bindbin[ii],bindfound);
  417. if (not bindfound) and not (cs_link_extern in aktglobalswitches) then
  418. begin
  419. Message1(exec_w_binder_not_found,bindbin);
  420. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  421. end;
  422. DoExec(bindbin,s,false,false);
  423. end;
  424. { Post processor executable }
  425. {$ifdef i386}
  426. if (target_info.target=target_i386_Win32) and success and
  427. not(cs_link_extern in aktglobalswitches) then
  428. if DLLsource then
  429. win_targ.postprocessexecutable(current_module^.sharedlibfilename^)
  430. else
  431. win_targ.postprocessexecutable(current_module^.exefilename^);
  432. {$endif}
  433. {Remove ReponseFile}
  434. if (success) and not(cs_link_extern in aktglobalswitches) then
  435. RemoveFile(current_module^.outpath^+LinkResName);
  436. MakeExecutable:=success; { otherwise a recursive call to link method }
  437. end;
  438. Procedure TLinker.MakeStaticLibrary(filescnt:longint);
  439. {
  440. FilesCnt holds the amount of .o files created, if filescnt=0 then
  441. no smartlinking is used
  442. }
  443. var
  444. smartpath,
  445. s,
  446. arbin : string;
  447. arfound : boolean;
  448. cnt : longint;
  449. begin
  450. smartpath:=current_module^.path^+FixPath(FixFileName(current_module^.modulename^)+target_info.smartext,false);
  451. { find ar binary }
  452. if utilsdirectory<>'' then
  453. begin
  454. arbin:=Search(target_ar.arbin+source_os.exeext,
  455. utilsdirectory,arfound)+target_ar.arbin+source_os.exeext;
  456. end
  457. else
  458. arbin:=FindExe(target_ar.arbin,arfound);
  459. if (not arfound) and not(cs_link_extern in aktglobalswitches) then
  460. begin
  461. Message(exec_w_ar_not_found);
  462. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  463. end;
  464. s:=target_ar.arcmd;
  465. Replace(s,'$LIB',current_module^.staticlibfilename^);
  466. if filescnt=0 then
  467. Replace(s,'$FILES',current_module^.objfilename^)
  468. else
  469. Replace(s,'$FILES',FixFileName(smartpath+current_module^.asmprefix^+'*'+target_info.objext));
  470. DoExec(arbin,s,false,true);
  471. { Clean up }
  472. if not(cs_asm_leave in aktglobalswitches) and not(cs_link_extern in aktglobalswitches) then
  473. begin
  474. if filescnt=0 then
  475. RemoveFile(current_module^.objfilename^)
  476. else
  477. begin
  478. for cnt:=1 to filescnt do
  479. if not RemoveFile(FixFileName(smartpath+current_module^.asmprefix^+tostr(cnt)+target_info.objext)) then
  480. RemoveFile(FixFileName(smartpath+current_module^.asmprefix^+'e'+tostr(cnt)+target_info.objext));
  481. RemoveDir(smartpath);
  482. end;
  483. end;
  484. end;
  485. Procedure TLinker.MakeSharedLibrary;
  486. var
  487. s : string;
  488. begin
  489. s:=' -shared -o $LIB $FILES';
  490. Replace(s,'$LIB',current_module^.sharedlibfilename^);
  491. Replace(s,'$FILES',current_module^.objfilename^);
  492. if DoExec(FindLinker,s,false,false) then
  493. RemoveFile(current_module^.objfilename^);
  494. end;
  495. end.
  496. {
  497. $Log$
  498. Revision 1.47 1999-02-05 16:45:47 michael
  499. + Fixed gluing of options
  500. Revision 1.46 1999/02/05 08:54:26 pierre
  501. + linkofiles splitted inot linkofiles and linkunitfiles
  502. because linkofiles must be stored with directory
  503. to enabled linking of different objects with same name
  504. in a different directory
  505. Revision 1.45 1999/01/29 10:33:07 peter
  506. * objectsearchpath is now also searched if an object is not found
  507. Revision 1.44 1999/01/27 13:07:58 pierre
  508. * problem related with libc : go32v2 and linux differences
  509. Revision 1.43 1999/01/25 15:02:13 peter
  510. * link libc always as last
  511. Revision 1.42 1998/12/11 00:03:19 peter
  512. + globtype,tokens,version unit splitted from globals
  513. Revision 1.41 1998/12/01 23:39:46 pierre
  514. * postprocessexec for win32 changed
  515. Revision 1.40 1998/12/01 12:51:20 peter
  516. * fixed placing of ppas.sh and link.res when using -FE
  517. Revision 1.39 1998/11/30 13:26:23 pierre
  518. * the code for ordering the exported procs/vars was buggy
  519. + added -WB to force binding (Ozerski way of creating DLL)
  520. this is off by default as direct writing of .edata section seems
  521. OK
  522. Revision 1.38 1998/11/30 09:43:13 pierre
  523. * some range check bugs fixed (still not working !)
  524. + added DLL writing support for win32 (also accepts variables)
  525. + TempAnsi for code that could be used for Temporary ansi strings
  526. handling
  527. Revision 1.37 1998/10/26 22:23:31 peter
  528. + fixpath() has an extra option to allow a ./ as path
  529. Revision 1.36 1998/10/22 15:18:44 florian
  530. + switch -vx for win32 added
  531. Revision 1.35 1998/10/19 18:06:23 peter
  532. * use no_double
  533. Revision 1.34 1998/10/16 13:37:18 florian
  534. + switch -FD added to specify the path for utilities
  535. Revision 1.33 1998/10/14 13:38:22 peter
  536. * fixed path with staticlib/objects in ppufiles
  537. Revision 1.32 1998/10/14 11:03:55 daniel
  538. * Forgot to dereference a pointer.
  539. Revision 1.31 1998/10/14 11:01:21 daniel
  540. * Staticlibfilename no longer not include a path. Correction when calling
  541. ar.
  542. Revision 1.30 1998/10/13 13:10:18 peter
  543. * new style for m68k/i386 infos and enums
  544. Revision 1.29 1998/10/13 08:19:34 pierre
  545. + source_os is now set correctly for cross-processor compilers
  546. (tos contains all target_infos and
  547. we use CPU86 and CPU68 conditionnals to
  548. get the source operating system
  549. this only works if you do not undefine
  550. the source target !!)
  551. * several cg68k memory leaks fixed
  552. + started to change the code so that it should be possible to have
  553. a complete compiler (both for m68k and i386 !!)
  554. Revision 1.28 1998/10/08 23:28:56 peter
  555. * -vu shows unit info, -vt shows tried/used files
  556. Revision 1.27 1998/10/06 17:16:52 pierre
  557. * some memory leaks fixed (thanks to Peter for heaptrc !)
  558. Revision 1.26 1998/09/29 15:23:05 peter
  559. * remove also the end files for smartlinking
  560. Revision 1.25 1998/09/10 15:25:31 daniel
  561. + Added maxheapsize.
  562. * Corrected semi-bug in calling the assembler and the linker
  563. Revision 1.24 1998/09/07 18:32:45 peter
  564. * fixed for m68k
  565. Revision 1.23 1998/09/03 17:39:04 florian
  566. + better code for type conversation longint/dword to real type
  567. Revision 1.22 1998/09/01 09:01:00 peter
  568. + glibc2 support
  569. Revision 1.21 1998/08/31 12:26:26 peter
  570. * m68k and palmos updates from surebugfixes
  571. Revision 1.20 1998/08/19 10:06:14 peter
  572. * fixed filenames and removedir which supports slash at the end
  573. Revision 1.19 1998/08/17 09:17:47 peter
  574. * static/shared linking updates
  575. Revision 1.18 1998/08/14 21:56:34 peter
  576. * setting the outputfile using -o works now to create static libs
  577. Revision 1.17 1998/08/14 18:16:08 peter
  578. * return after a failed call will now add it to ppas
  579. Revision 1.16 1998/08/12 19:28:15 peter
  580. * better libc support
  581. Revision 1.15 1998/08/10 14:50:02 peter
  582. + localswitches, moduleswitches, globalswitches splitting
  583. Revision 1.14 1998/06/17 14:10:13 peter
  584. * small os2 fixes
  585. * fixed interdependent units with newppu (remake3 under linux works now)
  586. Revision 1.13 1998/06/08 22:59:46 peter
  587. * smartlinking works for win32
  588. * some defines to exclude some compiler parts
  589. Revision 1.12 1998/06/04 23:51:44 peter
  590. * m68k compiles
  591. + .def file creation moved to gendef.pas so it could also be used
  592. for win32
  593. Revision 1.11 1998/05/27 00:20:31 peter
  594. * some scanner optimizes
  595. * automaticly aout2exe for go32v1
  596. * fixed dynamiclinker option which was added at the wrong place
  597. Revision 1.10 1998/05/22 12:32:47 peter
  598. * fixed -L on the commandline, Dos commandline is only 128 bytes
  599. Revision 1.9 1998/05/12 10:46:59 peter
  600. * moved printstatus to verb_def
  601. + V_Normal which is between V_Error and V_Warning and doesn't have a
  602. prefix like error: warning: and is included in V_Default
  603. * fixed some messages
  604. * first time parameter scan is only for -v and -T
  605. - removed old style messages
  606. Revision 1.8 1998/05/11 13:07:54 peter
  607. + $ifdef NEWPPU for the new ppuformat
  608. + $define GDB not longer required
  609. * removed all warnings and stripped some log comments
  610. * no findfirst/findnext anymore to remove smartlink *.o files
  611. Revision 1.7 1998/05/08 09:21:20 michael
  612. * Added missing -Fl message to messages file.
  613. * Corrected mangling of file names when doing Linklib
  614. * -Fl now actually WORKS.
  615. * Librarysearchpath is now a field in linker object.
  616. Revision 1.6 1998/05/06 09:26:49 peter
  617. * fixed ld call with shell
  618. Revision 1.4 1998/05/04 17:54:25 peter
  619. + smartlinking works (only case jumptable left todo)
  620. * redesign of systems.pas to support assemblers and linkers
  621. + Unitname is now also in the PPU-file, increased version to 14
  622. Revision 1.3 1998/04/16 10:54:30 daniel
  623. * Fixed linking for OS/2.
  624. }