link.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  1. {
  2. $Id$
  3. Copyright (c) 1998,99 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. { Needed for LFN support in path to the executable }
  22. {$ifdef GO32V2}
  23. {$define ALWAYSSHELL}
  24. {$endif}
  25. uses cobjects,files;
  26. Type
  27. TLinkerInfo=record
  28. ExeCmd,
  29. DllCmd : array[1..3] of string[80];
  30. ResName : string[12];
  31. ExtraOptions : string;
  32. DynamicLinker : string[80];
  33. end;
  34. PLinker=^TLinker;
  35. TLinker = Object
  36. public
  37. Info : TLinkerInfo;
  38. ObjectFiles,
  39. SharedLibFiles,
  40. StaticLibFiles : TStringContainer;
  41. { Methods }
  42. Constructor Init;
  43. Destructor Done;
  44. procedure AddModuleFiles(hp:pmodule);
  45. function FindObjectFile(s : string) : string;
  46. function FindLibraryFile(s:string;const ext:string) : string;
  47. Procedure AddObject(const S : String);
  48. Procedure AddStaticLibrary(const S : String);
  49. Procedure AddSharedLibrary(S : String);
  50. Function FindUtil(const s:string):String;
  51. Function DoExec(const command,para:string;showinfo,useshell:boolean):boolean;
  52. { Virtuals }
  53. procedure SetDefaultInfo;virtual;
  54. Function MakeExecutable:boolean;virtual;
  55. Function MakeSharedLibrary:boolean;virtual;
  56. Function MakeStaticLibrary(filescnt:longint):boolean;virtual;
  57. end;
  58. Var
  59. Linker : PLinker;
  60. procedure InitLinker;
  61. procedure DoneLinker;
  62. Implementation
  63. uses
  64. {$ifdef Delphi}
  65. dmisc,
  66. {$else Delphi}
  67. dos,
  68. {$endif Delphi}
  69. globtype,systems,
  70. script,globals,verbose,ppu
  71. {$ifdef i386}
  72. {$ifndef NOTARGETLINUX}
  73. ,t_linux
  74. {$endif}
  75. {$ifndef NOTARGETOS2}
  76. ,t_os2
  77. {$endif}
  78. {$ifndef NOTARGETWIN32}
  79. ,t_win32
  80. {$endif}
  81. {$ifndef NOTARGETGO32V1}
  82. ,t_go32v1
  83. {$endif}
  84. {$ifndef NOTARGETGO32V2}
  85. ,t_go32v2
  86. {$endif}
  87. {$endif}
  88. {$ifdef m68k}
  89. {$ifndef NOTARGETLINUX}
  90. ,t_linux
  91. {$endif}
  92. {$endif}
  93. {$ifdef powerpc}
  94. {$ifndef NOTARGETLINUX}
  95. ,t_linux
  96. {$endif}
  97. {$endif}
  98. {$ifdef alpha}
  99. {$ifndef NOTARGETLINUX}
  100. ,t_linux
  101. {$endif}
  102. {$endif}
  103. ,gendef
  104. ;
  105. {*****************************************************************************
  106. TLINKER
  107. *****************************************************************************}
  108. Constructor TLinker.Init;
  109. begin
  110. ObjectFiles.Init_no_double;
  111. SharedLibFiles.Init_no_double;
  112. StaticLibFiles.Init_no_double;
  113. { set generic defaults }
  114. FillChar(Info,sizeof(Info),0);
  115. Info.ResName:='link.res';
  116. { set the linker specific defaults }
  117. SetDefaultInfo;
  118. { Allow Parameter overrides for linker info }
  119. with Info do
  120. begin
  121. if ParaLinkOptions<>'' then
  122. ExtraOptions:=ParaLinkOptions;
  123. if ParaDynamicLinker<>'' then
  124. DynamicLinker:=ParaDynamicLinker;
  125. end;
  126. end;
  127. Destructor TLinker.Done;
  128. begin
  129. ObjectFiles.Done;
  130. SharedLibFiles.Done;
  131. StaticLibFiles.Done;
  132. end;
  133. Procedure TLinker.SetDefaultInfo;
  134. begin
  135. end;
  136. procedure TLinker.AddModuleFiles(hp:pmodule);
  137. var
  138. mask : longint;
  139. begin
  140. with hp^ do
  141. begin
  142. { link unit files }
  143. if (flags and uf_no_link)=0 then
  144. begin
  145. { create mask which unit files need linking }
  146. mask:=link_allways;
  147. if hp^.is_unit then
  148. begin
  149. { static linking ? }
  150. if (cs_link_static in aktglobalswitches) then
  151. begin
  152. if (flags and uf_static_linked)=0 then
  153. Comment(V_Error,'unit '+modulename^+' can''t be static linked')
  154. else
  155. mask:=mask or link_static;
  156. end;
  157. { smart linking ? }
  158. if (cs_link_smart in aktglobalswitches) then
  159. begin
  160. if (flags and uf_smart_linked)=0 then
  161. begin
  162. { if smart not avail then try static linking }
  163. if (flags and uf_static_linked)<>0 then
  164. begin
  165. Comment(V_Warning,'unit '+modulename^+' can''t be smart linked, switching to static linking');
  166. mask:=mask or link_static;
  167. end
  168. else
  169. Comment(V_Error,'unit '+modulename^+' can''t be smart or static linked');
  170. end
  171. else
  172. mask:=mask or link_smart;
  173. end;
  174. { shared linking }
  175. if (cs_link_shared in aktglobalswitches) then
  176. begin
  177. if (flags and uf_shared_linked)=0 then
  178. begin
  179. { if shared not avail then try static linking }
  180. if (flags and uf_static_linked)<>0 then
  181. begin
  182. Comment(V_Warning,'unit '+modulename^+' can''t be shared linked, switching to static linking');
  183. mask:=mask or link_static;
  184. end
  185. else
  186. Comment(V_Error,'unit '+modulename^+' can''t be shared or static linked');
  187. end
  188. else
  189. mask:=mask or link_shared;
  190. end;
  191. end
  192. else
  193. begin
  194. { for programs link always static }
  195. mask:=mask or link_static;
  196. end;
  197. { unit files }
  198. while not linkunitofiles.empty do
  199. AddObject(linkunitofiles.getusemask(mask));
  200. while not linkunitstaticlibs.empty do
  201. AddStaticLibrary(linkunitstaticlibs.getusemask(mask));
  202. while not linkunitsharedlibs.empty do
  203. AddSharedLibrary(linkunitsharedlibs.getusemask(mask));
  204. end;
  205. { Other needed .o and libs, specified using $L,$LINKLIB,external }
  206. mask:=link_allways;
  207. while not linkotherofiles.empty do
  208. AddObject(linkotherofiles.Getusemask(mask));
  209. while not linkotherstaticlibs.empty do
  210. AddStaticLibrary(linkotherstaticlibs.Getusemask(mask));
  211. while not linkothersharedlibs.empty do
  212. AddSharedLibrary(linkothersharedlibs.Getusemask(mask));
  213. end;
  214. end;
  215. Function TLinker.FindUtil(const s:string):string;
  216. var
  217. ldfound : boolean;
  218. LastBin : string;
  219. begin
  220. LastBin:='';
  221. if utilsdirectory<>'' then
  222. LastBin:=Search(s+source_os.exeext,utilsdirectory,ldfound)+s+source_os.exeext;
  223. if LastBin='' then
  224. LastBin:=FindExe(s,ldfound);
  225. if (not ldfound) and not(cs_link_extern in aktglobalswitches) then
  226. begin
  227. Message1(exec_w_util_not_found,s);
  228. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  229. end;
  230. if ldfound then
  231. Message1(exec_t_using_util,LastBin);
  232. FindUtil:=LastBin;
  233. end;
  234. { searches an object file }
  235. function TLinker.FindObjectFile(s:string) : string;
  236. var
  237. found : boolean;
  238. begin
  239. findobjectfile:='';
  240. if s='' then
  241. exit;
  242. if pos('.',s)=0 then
  243. s:=s+target_info.objext;
  244. s:=FixFileName(s);
  245. if FileExists(s) then
  246. begin
  247. Findobjectfile:=s;
  248. exit;
  249. end;
  250. { find object file
  251. 1. cwd
  252. 2. unit search path
  253. 3. local object path
  254. 4. global object path
  255. 5. exepath }
  256. found:=false;
  257. findobjectfile:=search(s,'.',found)+s;
  258. if (not found) then
  259. findobjectfile:=search(s,unitsearchpath,found)+s;
  260. if (not found) and assigned(current_module^.localobjectsearchpath) then
  261. findobjectfile:=search(s,current_module^.localobjectsearchpath^,found)+s;
  262. if (not found) then
  263. findobjectfile:=search(s,objectsearchpath,found)+s;
  264. if (not found) then
  265. findobjectfile:=search(s,exepath,found)+s;
  266. if not(cs_link_extern in aktglobalswitches) and (not found) then
  267. Message1(exec_w_objfile_not_found,s);
  268. end;
  269. { searches an library file }
  270. function TLinker.FindLibraryFile(s:string;const ext:string) : string;
  271. var
  272. found : boolean;
  273. begin
  274. findlibraryfile:='';
  275. if s='' then
  276. exit;
  277. if pos('.',s)=0 then
  278. s:=s+ext;
  279. if FileExists(s) then
  280. begin
  281. FindLibraryFile:=s;
  282. exit;
  283. end;
  284. { find libary
  285. 1. cwd
  286. 2. local libary dir
  287. 3. global libary dir
  288. 4. exe path of the compiler }
  289. found:=false;
  290. findlibraryfile:=search(s,'.',found)+s;
  291. if (not found) and assigned(current_module^.locallibrarysearchpath) then
  292. findlibraryfile:=search(s,current_module^.locallibrarysearchpath^,found)+s;
  293. if (not found) then
  294. findlibraryfile:=search(s,librarysearchpath,found)+s;
  295. if (not found) then
  296. findlibraryfile:=search(s,exepath,found)+s;
  297. if not(cs_link_extern in aktglobalswitches) and (not found) then
  298. Message1(exec_w_libfile_not_found,s);
  299. end;
  300. Procedure TLinker.AddObject(const S : String);
  301. begin
  302. ObjectFiles.Insert(FindObjectFile(s));
  303. end;
  304. Procedure TLinker.AddSharedLibrary(S:String);
  305. begin
  306. { remove prefix 'lib' }
  307. if Copy(s,1,length(target_os.libprefix))=target_os.libprefix then
  308. Delete(s,1,length(target_os.libprefix));
  309. { remove extension if any }
  310. if Copy(s,length(s)-length(target_os.sharedlibext)+1,length(target_os.sharedlibext))=target_os.sharedlibext then
  311. Delete(s,length(s)-length(target_os.sharedlibext)+1,length(target_os.sharedlibext)+1);
  312. { ready to be inserted }
  313. SharedLibFiles.Insert (S);
  314. end;
  315. Procedure TLinker.AddStaticLibrary(const S:String);
  316. begin
  317. StaticLibFiles.Insert(FindLibraryFile(s,target_os.staticlibext));
  318. end;
  319. Function TLinker.DoExec(const command,para:string;showinfo,useshell:boolean):boolean;
  320. begin
  321. DoExec:=true;
  322. if not(cs_link_extern in aktglobalswitches) then
  323. begin
  324. swapvectors;
  325. {$ifdef ALWAYSSHELL}
  326. shell(command+' '+para);
  327. {$else}
  328. if useshell then
  329. shell(command+' '+para)
  330. else
  331. exec(command,para);
  332. {$endif}
  333. swapvectors;
  334. if (doserror<>0) then
  335. begin
  336. Message(exec_w_cant_call_linker);
  337. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  338. DoExec:=false;
  339. end
  340. else
  341. if (dosexitcode<>0) then
  342. begin
  343. Message(exec_w_error_while_linking);
  344. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  345. DoExec:=false;
  346. end;
  347. end;
  348. { Update asmres when externmode is set }
  349. if cs_link_extern in aktglobalswitches then
  350. begin
  351. if showinfo then
  352. AsmRes.AddLinkCommand(Command,Para,current_module^.exefilename^)
  353. else
  354. AsmRes.AddLinkCommand(Command,Para,'');
  355. end;
  356. end;
  357. function TLinker.MakeExecutable:boolean;
  358. begin
  359. MakeExecutable:=false;
  360. Message(exec_e_exe_not_supported);
  361. end;
  362. Function TLinker.MakeSharedLibrary:boolean;
  363. begin
  364. MakeSharedLibrary:=false;
  365. Message(exec_e_dll_not_supported);
  366. end;
  367. Function TLinker.MakeStaticLibrary(filescnt:longint):boolean;
  368. {
  369. FilesCnt holds the amount of .o files created, if filescnt=0 then
  370. no smartlinking is used
  371. }
  372. var
  373. smartpath,
  374. cmdstr,
  375. binstr : string;
  376. success : boolean;
  377. cnt : longint;
  378. begin
  379. MakeStaticLibrary:=false;
  380. smartpath:=current_module^.path^+FixPath(FixFileName(current_module^.modulename^)+target_info.smartext,false);
  381. SplitBinCmd(target_ar.arcmd,binstr,cmdstr);
  382. Replace(cmdstr,'$LIB',current_module^.staticlibfilename^);
  383. if filescnt=0 then
  384. Replace(cmdstr,'$FILES',current_module^.objfilename^)
  385. else
  386. Replace(cmdstr,'$FILES',FixFileName(smartpath+current_module^.asmprefix^+'*'+target_info.objext));
  387. success:=DoExec(FindUtil(binstr),cmdstr,false,true);
  388. { Clean up }
  389. if not(cs_asm_leave in aktglobalswitches) then
  390. if not(cs_link_extern in aktglobalswitches) then
  391. begin
  392. if filescnt=0 then
  393. RemoveFile(current_module^.objfilename^)
  394. else
  395. begin
  396. for cnt:=1 to filescnt do
  397. if not RemoveFile(FixFileName(smartpath+current_module^.asmprefix^+tostr(cnt)+target_info.objext)) then
  398. RemoveFile(FixFileName(smartpath+current_module^.asmprefix^+'e'+tostr(cnt)+target_info.objext));
  399. RemoveDir(smartpath);
  400. end;
  401. end
  402. else
  403. begin
  404. if filescnt=0 then
  405. AsmRes.AddDeleteCommand(current_module^.objfilename^)
  406. else
  407. begin
  408. AsmRes.AddDeleteCommand(smartpath+current_module^.asmprefix^+'*'+target_info.objext);
  409. AsmRes.Add('rmdir '+smartpath);
  410. end;
  411. end;
  412. MakeStaticLibrary:=success;
  413. end;
  414. {*****************************************************************************
  415. Init/Done
  416. *****************************************************************************}
  417. procedure InitLinker;
  418. begin
  419. case target_info.target of
  420. {$ifdef i386}
  421. {$ifndef NOTARGETLINUX}
  422. target_i386_linux :
  423. linker:=new(plinkerlinux,Init);
  424. {$endif}
  425. {$ifndef NOTARGETWIN32}
  426. target_i386_Win32 :
  427. linker:=new(plinkerwin32,Init);
  428. {$endif}
  429. {$ifndef NOTARGETGO32V1}
  430. target_i386_Go32v1 :
  431. linker:=new(plinkergo32v1,Init);
  432. {$endif}
  433. {$ifndef NOTARGETGO32V2}
  434. target_i386_Go32v2 :
  435. linker:=new(plinkergo32v2,Init);
  436. {$endif}
  437. {$ifndef NOTARGETOS2}
  438. target_i386_os2 :
  439. linker:=new(plinkeros2,Init);
  440. {$endif}
  441. {$endif i386}
  442. {$ifdef m68k}
  443. {$ifndef NOTARGETPALMOS}
  444. target_m68k_palmos:
  445. linker:=new(plinker,Init);
  446. {$endif}
  447. {$ifndef NOTARGETLINUX}
  448. target_m68k_linux :
  449. linker:=new(plinkerlinux,Init);
  450. {$endif}
  451. {$endif m68k}
  452. {$ifdef alpha}
  453. {$ifndef NOTARGETLINUX}
  454. target_alpha_linux :
  455. linker:=new(plinkerlinux,Init);
  456. {$endif}
  457. {$endif alpha}
  458. {$ifdef powerpc}
  459. {$ifndef NOTARGETLINUX}
  460. target_powerpc_linux :
  461. linker:=new(plinkerlinux,Init);
  462. {$endif}
  463. {$endif powerpc}
  464. else
  465. linker:=new(plinker,Init);
  466. end;
  467. end;
  468. procedure DoneLinker;
  469. begin
  470. if assigned(linker) then
  471. dispose(linker,done);
  472. end;
  473. end.
  474. {
  475. $Log$
  476. Revision 1.75 1999-10-26 12:25:04 peter
  477. * fixed os2 linker
  478. Revision 1.74 1999/10/21 14:29:34 peter
  479. * redesigned linker object
  480. + library support for linux (only procedures can be exported)
  481. Revision 1.72 1999/09/16 23:05:52 florian
  482. * m68k compiler is again compilable (only gas writer, no assembler reader)
  483. Revision 1.71 1999/09/16 11:34:56 pierre
  484. * typo correction
  485. Revision 1.70 1999/09/15 22:09:16 florian
  486. + rtti is now automatically generated for published classes, i.e.
  487. they are handled like an implicit property
  488. Revision 1.69 1999/09/15 20:24:56 daniel
  489. + Dw switch now does something.
  490. Revision 1.68 1999/08/18 17:05:53 florian
  491. + implemented initilizing of data for the new code generator
  492. so it should compile now simple programs
  493. Revision 1.67 1999/08/16 15:35:23 pierre
  494. * fix for DLL relocation problems
  495. * external bss vars had wrong stabs for pecoff
  496. + -WB11000000 to specify default image base, allows to
  497. load several DLLs with debugging info included
  498. (relocatable DLL are stripped because the relocation
  499. of the .Stab section is misplaced by ldw)
  500. Revision 1.66 1999/08/11 17:26:34 peter
  501. * tlinker object is now inherited for win32 and dos
  502. * postprocessexecutable is now a method of tlinker
  503. Revision 1.65 1999/08/10 12:51:16 pierre
  504. * bind_win32_dll removed (Relocsection used instead)
  505. * now relocsection is true by default ! (needs dlltool
  506. for DLL generation)
  507. Revision 1.64 1999/07/30 23:19:45 peter
  508. * fixed placing of dynamiclinker in link.res (should be the last after
  509. all other libraries)
  510. Revision 1.63 1999/07/29 01:31:39 peter
  511. * fixed shared library linking for glibc2 systems
  512. Revision 1.62 1999/07/27 11:05:51 peter
  513. * glibc 2.1.2 support
  514. Revision 1.61 1999/07/18 10:19:53 florian
  515. * made it compilable with Dlephi 4 again
  516. + fixed problem with large stack allocations on win32
  517. Revision 1.60 1999/07/07 20:33:53 peter
  518. * warning instead of error when switching to static linking
  519. Revision 1.59 1999/07/05 16:21:26 peter
  520. * fixed linking for units without linking necessary
  521. Revision 1.58 1999/07/03 00:29:51 peter
  522. * new link writing to the ppu, one .ppu is needed for all link types,
  523. static (.o) is now always created also when smartlinking is used
  524. Revision 1.57 1999/06/28 16:02:31 peter
  525. * merged
  526. Revision 1.54.2.3 1999/06/28 15:55:40 peter
  527. * also search path if not found in utilsdirectory
  528. Revision 1.54.2.2 1999/06/18 09:51:55 peter
  529. * always use shell() for go32v2 to support LFN
  530. Revision 1.54.2.1 1999/06/15 13:51:56 peter
  531. * also check ld-2.1.so for glibc 2.1, previous was only for 2.1.1
  532. Revision 1.54 1999/06/02 13:25:35 hajny
  533. * fixed stripping symbols for OS/2
  534. Revision 1.53 1999/05/04 21:44:44 florian
  535. * changes to compile it with Delphi 4.0
  536. Revision 1.52 1999/05/03 21:30:30 peter
  537. + glibc 2.1
  538. Revision 1.51 1999/04/28 23:42:33 pierre
  539. * removing of temporary directory with -s option
  540. Revision 1.50 1999/04/25 14:31:48 daniel
  541. * Bug fixed in linking: compiling files on another drive than the one you
  542. currently use you is done correctly.
  543. Revision 1.49 1999/03/25 16:55:30 peter
  544. + unitpath,librarypath,includepath,objectpath directives
  545. Revision 1.48 1999/03/23 16:22:43 peter
  546. * crtbegin/crtend only added if found
  547. Revision 1.47 1999/02/05 16:45:47 michael
  548. + Fixed gluing of options
  549. Revision 1.46 1999/02/05 08:54:26 pierre
  550. + linkofiles splitted inot linkofiles and linkunitfiles
  551. because linkofiles must be stored with directory
  552. to enabled linking of different objects with same name
  553. in a different directory
  554. Revision 1.45 1999/01/29 10:33:07 peter
  555. * objectsearchpath is now also searched if an object is not found
  556. Revision 1.44 1999/01/27 13:07:58 pierre
  557. * problem related with libc : go32v2 and linux differences
  558. Revision 1.43 1999/01/25 15:02:13 peter
  559. * link libc always as last
  560. Revision 1.42 1998/12/11 00:03:19 peter
  561. + globtype,tokens,version unit splitted from globals
  562. Revision 1.41 1998/12/01 23:39:46 pierre
  563. * postprocessexec for win32 changed
  564. Revision 1.40 1998/12/01 12:51:20 peter
  565. * fixed placing of ppas.sh and link.res when using -FE
  566. Revision 1.39 1998/11/30 13:26:23 pierre
  567. * the code for ordering the exported procs/vars was buggy
  568. + added -WB to force binding (Ozerski way of creating DLL)
  569. this is off by default as direct writing of .edata section seems
  570. OK
  571. Revision 1.38 1998/11/30 09:43:13 pierre
  572. * some range check bugs fixed (still not working !)
  573. + added DLL writing support for win32 (also accepts variables)
  574. + TempAnsi for code that could be used for Temporary ansi strings
  575. handling
  576. Revision 1.37 1998/10/26 22:23:31 peter
  577. + fixpath() has an extra option to allow a ./ as path
  578. Revision 1.36 1998/10/22 15:18:44 florian
  579. + switch -vx for win32 added
  580. Revision 1.35 1998/10/19 18:06:23 peter
  581. * use no_double
  582. Revision 1.34 1998/10/16 13:37:18 florian
  583. + switch -FD added to specify the path for utilities
  584. Revision 1.33 1998/10/14 13:38:22 peter
  585. * fixed path with staticlib/objects in ppufiles
  586. Revision 1.32 1998/10/14 11:03:55 daniel
  587. * Forgot to dereference a pointer.
  588. Revision 1.31 1998/10/14 11:01:21 daniel
  589. * Staticlibfilename no longer not include a path. Correction when calling
  590. ar.
  591. Revision 1.30 1998/10/13 13:10:18 peter
  592. * new style for m68k/i386 infos and enums
  593. Revision 1.29 1998/10/13 08:19:34 pierre
  594. + source_os is now set correctly for cross-processor compilers
  595. (tos contains all target_infos and
  596. we use CPU86 and CPU68 conditionals to
  597. get the source operating system
  598. this only works if you do not undefine
  599. the source target !!)
  600. * several cg68k memory leaks fixed
  601. + started to change the code so that it should be possible to have
  602. a complete compiler (both for m68k and i386 !!)
  603. Revision 1.28 1998/10/08 23:28:56 peter
  604. * -vu shows unit info, -vt shows tried/used files
  605. Revision 1.27 1998/10/06 17:16:52 pierre
  606. * some memory leaks fixed (thanks to Peter for heaptrc !)
  607. Revision 1.26 1998/09/29 15:23:05 peter
  608. * remove also the end files for smartlinking
  609. Revision 1.25 1998/09/10 15:25:31 daniel
  610. + Added maxheapsize.
  611. * Corrected semi-bug in calling the assembler and the linker
  612. Revision 1.24 1998/09/07 18:32:45 peter
  613. * fixed for m68k
  614. Revision 1.23 1998/09/03 17:39:04 florian
  615. + better code for type conversation longint/dword to real type
  616. Revision 1.22 1998/09/01 09:01:00 peter
  617. + glibc2 support
  618. Revision 1.21 1998/08/31 12:26:26 peter
  619. * m68k and palmos updates from surebugfixes
  620. Revision 1.20 1998/08/19 10:06:14 peter
  621. * fixed filenames and removedir which supports slash at the end
  622. Revision 1.19 1998/08/17 09:17:47 peter
  623. * static/shared linking updates
  624. Revision 1.18 1998/08/14 21:56:34 peter
  625. * setting the outputfile using -o works now to create static libs
  626. Revision 1.17 1998/08/14 18:16:08 peter
  627. * return after a failed call will now add it to ppas
  628. Revision 1.16 1998/08/12 19:28:15 peter
  629. * better libc support
  630. Revision 1.15 1998/08/10 14:50:02 peter
  631. + localswitches, moduleswitches, globalswitches splitting
  632. Revision 1.14 1998/06/17 14:10:13 peter
  633. * small os2 fixes
  634. * fixed interdependent units with newppu (remake3 under linux works now)
  635. Revision 1.13 1998/06/08 22:59:46 peter
  636. * smartlinking works for win32
  637. * some defines to exclude some compiler parts
  638. Revision 1.12 1998/06/04 23:51:44 peter
  639. * m68k compiles
  640. + .def file creation moved to gendef.pas so it could also be used
  641. for win32
  642. Revision 1.11 1998/05/27 00:20:31 peter
  643. * some scanner optimizes
  644. * automaticly aout2exe for go32v1
  645. * fixed dynamiclinker option which was added at the wrong place
  646. Revision 1.10 1998/05/22 12:32:47 peter
  647. * fixed -L on the commandline, Dos commandline is only 128 bytes
  648. Revision 1.9 1998/05/12 10:46:59 peter
  649. * moved printstatus to verb_def
  650. + V_Normal which is between V_Error and V_Warning and doesn't have a
  651. prefix like error: warning: and is included in V_Default
  652. * fixed some messages
  653. * first time parameter scan is only for -v and -T
  654. - removed old style messages
  655. Revision 1.8 1998/05/11 13:07:54 peter
  656. + $ifdef NEWPPU for the new ppuformat
  657. + $define GDB not longer required
  658. * removed all warnings and stripped some log comments
  659. * no findfirst/findnext anymore to remove smartlink *.o files
  660. Revision 1.7 1998/05/08 09:21:20 michael
  661. * Added missing -Fl message to messages file.
  662. * Corrected mangling of file names when doing Linklib
  663. * -Fl now actually WORKS.
  664. * Librarysearchpath is now a field in linker object.
  665. Revision 1.6 1998/05/06 09:26:49 peter
  666. * fixed ld call with shell
  667. Revision 1.4 1998/05/04 17:54:25 peter
  668. + smartlinking works (only case jumptable left todo)
  669. * redesign of systems.pas to support assemblers and linkers
  670. + Unitname is now also in the PPU-file, increased version to 14
  671. Revision 1.3 1998/04/16 10:54:30 daniel
  672. * Fixed linking for OS/2.
  673. }