link.pas 20 KB

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