瀏覽代碼

* prefix for import libraries now configurable rather than hardcoded, plus fixed issue with name of OS/2 import libraries

git-svn-id: trunk@12727 -
Tomas Hajny 16 年之前
父節點
當前提交
54f3d28ce8

+ 1 - 1
compiler/finput.pas

@@ -640,7 +640,7 @@ uses
          asmfilename:=stringdup(p+n+target_info.asmext);
          objfilename:=stringdup(p+n+target_info.objext);
          ppufilename:=stringdup(p+n+target_info.unitext);
-         importlibfilename:=stringdup(p+target_info.staticClibprefix+'imp'+n+target_info.staticlibext);
+         importlibfilename:=stringdup(p+target_info.importlibprefix+n+target_info.importlibext);
          staticlibfilename:=stringdup(p+target_info.staticlibprefix+n+target_info.staticlibext);
 
          { output dir of exe can be specified separatly }

+ 2 - 0
compiler/systems.pas

@@ -357,6 +357,8 @@ interface
           staticClibext,
           staticClibprefix : string[4];
           sharedClibprefix : string[4];
+          importlibprefix : string[10];
+          importlibext : string[4];
           Cprefix      : string[2];
           newline      : string[2];
           dirsep       : char;

+ 4 - 0
compiler/systems/i_amiga.pas

@@ -56,6 +56,8 @@ unit i_amiga;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -115,6 +117,8 @@ unit i_amiga;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';

+ 8 - 2
compiler/systems/i_atari.pas

@@ -39,8 +39,6 @@ unit i_atari;
             short_name   : 'ATARI';
             unit_env     : '';
             extradefines : '';
-            sharedlibext : '.dll';
-            staticlibext : '.a';
             exeext       : '.tpp';
             defext       : '';
             scriptext    : '';
@@ -51,8 +49,16 @@ unit i_atari;
             objext       : '.o';
             resext       : '.res';
             resobjext    : '.or';
+            sharedlibext : '.dll';
+            staticlibext : '.a';
             staticlibprefix : '';
             sharedlibprefix : '';
+            sharedClibext : '.dll';
+            staticClibext : '.a';
+            staticClibprefix : 'lib';
+            sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             p_ext_support : false;
             Cprefix      : '_';
             newline      : #10;

+ 2 - 0
compiler/systems/i_beos.pas

@@ -57,6 +57,8 @@ unit i_beos;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';

+ 22 - 0
compiler/systems/i_bsd.pas

@@ -85,6 +85,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -148,6 +150,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -208,6 +212,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #10;
             dirsep       : '/';
@@ -267,6 +273,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #10;
             dirsep       : '/';
@@ -326,6 +334,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -385,6 +395,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -446,6 +458,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #10;
             dirsep       : '/';
@@ -507,6 +521,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #10;
             dirsep       : '/';
@@ -568,6 +584,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #10;
             dirsep       : '/';
@@ -629,6 +647,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #10;
             dirsep       : '/';
@@ -689,6 +709,8 @@ unit i_bsd;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #10;
             dirsep       : '/';

+ 4 - 0
compiler/systems/i_embed.pas

@@ -56,6 +56,8 @@ unit i_embed;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -116,6 +118,8 @@ unit i_embed;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';

+ 3 - 1
compiler/systems/i_emx.pas

@@ -61,12 +61,14 @@ unit i_emx;
             resobjext    : '.or';
             sharedlibext : '.dll';
             staticlibext : '.a';
-            staticlibprefix : '';
+            staticlibprefix : 'libp';
             sharedlibprefix : '';
             sharedClibext : '.dll';
             staticClibext : '.a';
             staticClibprefix : '';
             sharedClibprefix : '';
+            importlibprefix : '';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #13#10;
             dirsep       : '\';

+ 2 - 0
compiler/systems/i_gba.pas

@@ -57,6 +57,8 @@ unit i_gba;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';

+ 2 - 0
compiler/systems/i_go32v2.pas

@@ -56,6 +56,8 @@ unit i_go32v2;
             staticClibext : '.a';
             staticClibprefix : '';
             sharedClibprefix : '';
+            importlibprefix : '';
+            importlibext : '.al';
             Cprefix      : '_';
             newline      : #13#10;
             dirsep       : '\';

+ 2 - 0
compiler/systems/i_haiku.pas

@@ -58,6 +58,8 @@ unit i_haiku;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';

+ 20 - 0
compiler/systems/i_linux.pas

@@ -61,6 +61,8 @@ unit i_linux;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -122,6 +124,8 @@ unit i_linux;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -183,6 +187,8 @@ unit i_linux;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -244,6 +250,8 @@ unit i_linux;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -305,6 +313,8 @@ unit i_linux;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -365,6 +375,8 @@ unit i_linux;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -426,6 +438,8 @@ unit i_linux;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -488,6 +502,8 @@ unit i_linux;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -550,6 +566,8 @@ unit i_linux;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -611,6 +629,8 @@ unit i_linux;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';

+ 2 - 0
compiler/systems/i_macos.pas

@@ -55,6 +55,8 @@ unit i_macos;
             staticClibext : 'Lib';
             staticClibprefix : '';
             sharedClibprefix : '';
+            importlibprefix : 'imp';
+            importlibext : 'Lib';
             Cprefix      : '';
             newline      : #13;
             dirsep       : ':';

+ 2 - 0
compiler/systems/i_morph.pas

@@ -56,6 +56,8 @@ unit i_morph;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';

+ 2 - 0
compiler/systems/i_nds.pas

@@ -58,6 +58,8 @@ unit i_nds;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';

+ 2 - 0
compiler/systems/i_nwl.pas

@@ -56,6 +56,8 @@ unit i_nwl;
             staticClibext : '.a';
             staticClibprefix : '';
             sharedClibprefix : '';
+            importlibprefix : 'imp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #13#10;
             dirsep       : '/';

+ 2 - 0
compiler/systems/i_nwm.pas

@@ -56,6 +56,8 @@ unit i_nwm;
             staticClibext : '.a';
             staticClibprefix : '';
             sharedClibprefix : '';
+            importlibprefix : 'imp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #13#10;
             dirsep       : '/';

+ 3 - 1
compiler/systems/i_os2.pas

@@ -61,12 +61,14 @@ unit i_os2;
             resobjext    : '.or';
             sharedlibext : '.dll';
             staticlibext : '.a';
-            staticlibprefix : '';
+            staticlibprefix : 'libp';
             sharedlibprefix : '';
             sharedClibext : '.dll';
             staticClibext : '.a';
             staticClibprefix : '';
             sharedClibprefix : '';
+            importlibprefix : '';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #13#10;
             dirsep       : '\';

+ 4 - 0
compiler/systems/i_palmos.pas

@@ -56,6 +56,8 @@ unit i_palmos;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #10;
             dirsep       : '/';
@@ -126,6 +128,8 @@ unit i_palmos;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #10;
             dirsep       : '/';

+ 4 - 0
compiler/systems/i_sunos.pas

@@ -56,6 +56,8 @@ unit i_sunos;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';
@@ -116,6 +118,8 @@ unit i_sunos;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : 'lib';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #10;
             dirsep       : '/';

+ 4 - 0
compiler/systems/i_symbian.pas

@@ -58,6 +58,8 @@ unit i_symbian;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #13#10;
             dirsep       : '\';
@@ -119,6 +121,8 @@ unit i_symbian;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #13#10;
             dirsep       : '\';

+ 2 - 0
compiler/systems/i_watcom.pas

@@ -56,6 +56,8 @@ unit i_watcom;
             staticClibext : '.a';
             staticClibprefix : '';
             sharedClibprefix : '';
+            importlibprefix : 'imp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #13#10;
             dirsep       : '\';

+ 2 - 0
compiler/systems/i_wdosx.pas

@@ -56,6 +56,8 @@ unit i_wdosx;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #13#10;
             dirsep       : '\';

+ 8 - 0
compiler/systems/i_win.pas

@@ -60,6 +60,8 @@ unit i_win;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #13#10;
             dirsep       : '\';
@@ -121,6 +123,8 @@ unit i_win;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #13#10;
             dirsep       : '\';
@@ -182,6 +186,8 @@ unit i_win;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '';
             newline      : #13#10;
             dirsep       : '\';
@@ -243,6 +249,8 @@ unit i_win;
             staticClibext : '.a';
             staticClibprefix : 'lib';
             sharedClibprefix : '';
+            importlibprefix : 'libimp';
+            importlibext : '.a';
             Cprefix      : '_';
             newline      : #13#10;
             dirsep       : '\';

+ 2 - 5
compiler/systems/t_os2.pas

@@ -353,22 +353,19 @@ end;
       const
         ar_magic:array[1..8] of char='!<arch>'#10;
       var
-          libname : string;
           i,j  : longint;
           ImportLibrary : TImportLibrary;
           ImportSymbol  : TImportSymbol;
       begin
-        LibName:=FixFileName(Current_Module.RealModuleName^ + Target_Info.StaticLibExt);
         seq_no:=1;
-        current_module.linkotherstaticlibs.add(libname,link_always);
-        assign(out_file,current_module.outputpath^+libname);
+        current_module.linkotherstaticlibs.add(Current_Module.ImportLibFilename^,link_always);
+        assign(out_file,Current_Module.ImportLibFilename^);
         rewrite(out_file,1);
         blockwrite(out_file,ar_magic,sizeof(ar_magic));
 
         for i:=0 to current_module.ImportLibraryList.Count-1 do
           begin
             ImportLibrary:=TImportLibrary(current_module.ImportLibraryList[i]);
-{            LibName:=FixFileName(ImportLibrary.Name + Target_Info.StaticCLibExt);}
             for j:=0 to ImportLibrary.ImportSymbolList.Count-1 do
               begin
                 ImportSymbol:=TImportSymbol(ImportLibrary.ImportSymbolList[j]);