Ver código fonte

* merged netbsd start
* profile for win32

peter 24 anos atrás
pai
commit
634a68bf3e

+ 8 - 4
compiler/assemble.pas

@@ -295,7 +295,7 @@ Implementation
              asfound:=FindExe(UtilExe,LastASBin);
            if (not asfound) and not(cs_asm_extern in aktglobalswitches) then
             begin
-              Message1(exec_w_assembler_not_found,LastASBin);
+              Message1(exec_e_assembler_not_found,LastASBin);
               aktglobalswitches:=aktglobalswitches+[cs_asm_extern];
             end;
            if asfound then
@@ -315,14 +315,14 @@ Implementation
            swapvectors;
            if (doserror<>0) then
             begin
-              Message1(exec_w_cant_call_assembler,tostr(doserror));
+              Message1(exec_e_cant_call_assembler,tostr(doserror));
               aktglobalswitches:=aktglobalswitches+[cs_asm_extern];
               callassembler:=false;
             end
            else
             if (dosexitcode<>0) then
              begin
-              Message1(exec_w_error_while_assembling,tostr(dosexitcode));
+              Message1(exec_e_error_while_assembling,tostr(dosexitcode));
               callassembler:=false;
              end;
          end
@@ -1520,7 +1520,11 @@ Implementation
 end.
 {
   $Log$
-  Revision 1.22  2001-07-01 20:16:15  peter
+  Revision 1.23  2001-08-07 18:47:12  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.22  2001/07/01 20:16:15  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN

+ 8 - 4
compiler/comprsrc.pas

@@ -85,7 +85,7 @@ begin
   fsplit(resbin,respath,n,e);
   if (not resfound) and not(cs_link_extern in aktglobalswitches) then
    begin
-     Message(exec_w_res_not_found);
+     Message(exec_e_res_not_found);
      aktglobalswitches:=aktglobalswitches+[cs_link_extern];
    end;
   resobj:=ForceExtension(current_module.objfilename^,target_info.resobjext);
@@ -102,13 +102,13 @@ begin
      swapvectors;
      if (doserror<>0) then
       begin
-        Message(exec_w_cant_call_linker);
+        Message(exec_e_cant_call_linker);
         aktglobalswitches:=aktglobalswitches+[cs_link_extern];
       end
      else
       if (dosexitcode<>0) then
        begin
-         Message(exec_w_error_while_linking);
+         Message(exec_e_error_while_linking);
          aktglobalswitches:=aktglobalswitches+[cs_link_extern];
        end;
     end;
@@ -142,7 +142,11 @@ end;
 end.
 {
   $Log$
-  Revision 1.9  2001-04-18 22:01:53  peter
+  Revision 1.10  2001-08-07 18:47:12  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.9  2001/04/18 22:01:53  peter
     * registration of targets and assemblers
 
   Revision 1.8  2001/03/13 21:01:14  peter

+ 12 - 2
compiler/i386/cgai386.pas

@@ -1541,11 +1541,12 @@ implementation
       if (po_assembler in aktprocsym.definition.procoptions) then
        exit;
       case target_info.target of
+         target_i386_win32,
          target_i386_freebsd,
          target_i386_linux:
            begin
               getaddrlabel(pl);
-              emitinsertcall('mcount');
+              emitinsertcall(target_info.Cprefix+'mcount');
               usedinproc:=usedinproc or ($80 shr byte(R_EDX));
               exprasmList.insert(Taicpu.Op_sym_ofs_reg(A_MOV,S_L,pl,0,R_EDX));
               exprasmList.insert(Tai_section.Create(sec_code));
@@ -2115,6 +2116,11 @@ implementation
        if (not inlined) and (aktprocsym.definition.proctypeoption=potype_proginit) then
            begin
               emitinsertcall('FPC_INITIALIZEUNITS');
+              { initialize profiling for win32 }
+              if (target_info.target=target_I386_WIN32) and
+                 (cs_profile in aktmoduleswitches) then
+                emitinsertcall('__monstartup');
+              { add threadvars }
               oldlist:=exprasmlist;
               exprasmlist:=TAAsmoutput.Create;
               p:=symtablestack;
@@ -3000,7 +3006,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.27  2001-08-06 21:40:49  peter
+  Revision 1.28  2001-08-07 18:47:13  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.27  2001/08/06 21:40:49  peter
     * funcret moved from tprocinfo to tprocdef
 
   Revision 1.26  2001/07/30 20:59:28  peter

+ 4 - 4
compiler/i386/i386ins.dat

@@ -1988,10 +1988,10 @@ rm8,reg_cl            \300\1\xD2\204                  8086
 rm8,imm               \300\1\xC0\204\25               186,SB
 rm16,unity            \320\300\1\xD1\204              8086
 rm16,reg_cl           \320\300\1\xD3\204              8086
-rm16,imm              \320\300\1\xC1\204\25           186,SB
+rm16,imm              \320\300\1\xC1\204\25           186,SW
 rm32,unity            \321\300\1\xD1\204              386
 rm32,reg_cl           \321\300\1\xD3\204              386
-rm32,imm              \321\300\1\xC1\204\25           386,SB
+rm32,imm              \321\300\1\xC1\204\25           386,SD
 
 [SHLD,shldX]
 (Ch_MOp3, Ch_RWFlags, Ch_Rop2)
@@ -2011,10 +2011,10 @@ rm8,reg_cl            \300\1\xD2\205                  8086
 rm8,imm               \300\1\xC0\205\25               186,SB
 rm16,unity            \320\300\1\xD1\205              8086
 rm16,reg_cl           \320\300\1\xD3\205              8086
-rm16,imm              \320\300\1\xC1\205\25           186,SB
+rm16,imm              \320\300\1\xC1\205\25           186,SW
 rm32,unity            \321\300\1\xD1\205              386
 rm32,reg_cl           \321\300\1\xD3\205              386
-rm32,imm              \321\300\1\xC1\205\25           386,SB
+rm32,imm              \321\300\1\xC1\205\25           386,SD
 
 [SHRD,shrdX]
 (Ch_MOp3, Ch_RWFlags, Ch_Rop2)

+ 4 - 4
compiler/i386/i386tab.inc

@@ -6816,7 +6816,7 @@
     ops     : 2;
     optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
     code    : #208#192#1#193#132#21;
-    flags   : if_186 or if_sb
+    flags   : if_186 or if_sw
   ),
   (
     opcode  : A_SHL;
@@ -6837,7 +6837,7 @@
     ops     : 2;
     optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
     code    : #209#192#1#193#132#21;
-    flags   : if_386 or if_sb
+    flags   : if_386 or if_sd
   ),
   (
     opcode  : A_SHLD;
@@ -6935,7 +6935,7 @@
     ops     : 2;
     optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
     code    : #208#192#1#193#133#21;
-    flags   : if_186 or if_sb
+    flags   : if_186 or if_sw
   ),
   (
     opcode  : A_SHR;
@@ -6956,7 +6956,7 @@
     ops     : 2;
     optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
     code    : #209#192#1#193#133#21;
-    flags   : if_386 or if_sb
+    flags   : if_386 or if_sd
   ),
   (
     opcode  : A_SHRD;

+ 6 - 3
compiler/i386/ra386.pas

@@ -373,10 +373,9 @@ var
 begin
   { Check only the most common opcodes here, the others are done in
     the assembler pass }
-  { movd also added as it needs special care here PM }
   case opcode of
     A_PUSH,A_POP,A_DEC,A_INC,A_NOT,A_NEG,
-    A_CMP,A_MOV,A_MOVD,
+    A_CMP,A_MOV,
     A_ADD,A_SUB,A_ADC,A_SBB,
     A_AND,A_OR,A_TEST,A_XOR: ;
   else
@@ -688,7 +687,11 @@ end;
 end.
 {
   $Log$
-  Revision 1.10  2001-08-06 21:40:50  peter
+  Revision 1.11  2001-08-07 18:47:14  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.10  2001/08/06 21:40:50  peter
     * funcret moved from tprocinfo to tprocdef
 
   Revision 1.9  2001/04/13 01:22:19  peter

+ 8 - 4
compiler/link.pas

@@ -227,7 +227,7 @@ begin
    Found:=FindExe(utilexe,Foundbin);
   if (not Found) and not(cs_link_extern in aktglobalswitches) then
    begin
-     Message1(exec_w_util_not_found,utilexe);
+     Message1(exec_e_util_not_found,utilexe);
      aktglobalswitches:=aktglobalswitches+[cs_link_extern];
    end;
   if (FoundBin<>'') then
@@ -364,14 +364,14 @@ begin
      swapvectors;
      if (doserror<>0) then
       begin
-         Message(exec_w_cant_call_linker);
+         Message(exec_e_cant_call_linker);
          aktglobalswitches:=aktglobalswitches+[cs_link_extern];
          DoExec:=false;
       end
      else
       if (dosexitcode<>0) then
        begin
-        Message(exec_w_error_while_linking);
+        Message(exec_e_error_while_linking);
         aktglobalswitches:=aktglobalswitches+[cs_link_extern];
         DoExec:=false;
        end;
@@ -482,7 +482,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.18  2001-06-28 19:46:25  peter
+  Revision 1.19  2001-08-07 18:47:12  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.18  2001/06/28 19:46:25  peter
     * added override and virtual for constructors
 
   Revision 1.17  2001/06/03 15:15:31  peter

+ 10 - 7
compiler/msg/errore.msg

@@ -1561,23 +1561,23 @@ exec_e_cant_create_objectfile=09003_E_Can't create object file: $1
 exec_e_cant_create_archivefile=09004_E_Can't create archive file: $1
 % The mentioned file can't be create. Check if you've
 % permission to create this file
-exec_w_assembler_not_found=09005_W_Assembler $1 not found, switching to external assembling
+exec_e_assembler_not_found=09005_E_Assembler $1 not found, switching to external assembling
 exec_t_using_assembler=09006_T_Using assembler: $1
-exec_w_error_while_assembling=09007_W_Error while assembling exitcode $1
-exec_w_cant_call_assembler=09008_W_Can't call the assembler, error $1 switching to external assembling
+exec_e_error_while_assembling=09007_E_Error while assembling exitcode $1
+exec_e_cant_call_assembler=09008_E_Can't call the assembler, error $1 switching to external assembling
 exec_i_assembling=09009_I_Assembling $1
 exec_i_assembling_smart=09010_I_Assembling smartlink $1
 exec_w_objfile_not_found=09011_W_Object $1 not found, Linking may fail !
 exec_w_libfile_not_found=09012_W_Library $1 not found, Linking may fail !
-exec_w_error_while_linking=09013_W_Error while linking
-exec_w_cant_call_linker=09014_W_Can't call the linker, switching to external linking
+exec_e_error_while_linking=09013_E_Error while linking
+exec_e_cant_call_linker=09014_E_Can't call the linker, switching to external linking
 exec_i_linking=09015_I_Linking $1
-exec_w_util_not_found=09016_W_Util $1 not found, switching to external linking
+exec_e_util_not_found=09016_E_Util $1 not found, switching to external linking
 exec_t_using_util=09017_T_Using util $1
 exec_e_exe_not_supported=09018_E_Creation of Executables not supported
 exec_e_dll_not_supported=09019_E_Creation of Dynamic/Shared Libraries not supported
 exec_i_closing_script=09020_I_Closing script $1
-exec_w_res_not_found=09021_W_resource compiler not found, switching to external mode
+exec_e_res_not_found=09021_E_resource compiler not found, switching to external mode
 exec_i_compilingresource=09022_I_Compiling resource $1
 exec_t_unit_not_static_linkable_switch_to_smart=09023_T_unit $1 can't be static linked, switching to smart linking
 exec_t_unit_not_smart_linkable_switch_to_static=09024_T_unit $1 can't be smart linked, switching to static linking
@@ -1832,6 +1832,9 @@ Free Pascal Compiler version $FPCVER
 Compiler Date  : $FPCDATE
 Compiler Target: $FPCTARGET
 
+Supported targets:
+  $OSTARGETS
+
 This program comes under the GNU General Public Licence
 For more information read COPYING.FPC
 

+ 8 - 8
compiler/msgidx.inc

@@ -489,23 +489,23 @@ const
   exec_d_cant_create_asmfile=09002;
   exec_e_cant_create_objectfile=09003;
   exec_e_cant_create_archivefile=09004;
-  exec_w_assembler_not_found=09005;
+  exec_e_assembler_not_found=09005;
   exec_t_using_assembler=09006;
-  exec_w_error_while_assembling=09007;
-  exec_w_cant_call_assembler=09008;
+  exec_e_error_while_assembling=09007;
+  exec_e_cant_call_assembler=09008;
   exec_i_assembling=09009;
   exec_i_assembling_smart=09010;
   exec_w_objfile_not_found=09011;
   exec_w_libfile_not_found=09012;
-  exec_w_error_while_linking=09013;
-  exec_w_cant_call_linker=09014;
+  exec_e_error_while_linking=09013;
+  exec_e_cant_call_linker=09014;
   exec_i_linking=09015;
-  exec_w_util_not_found=09016;
+  exec_e_util_not_found=09016;
   exec_t_using_util=09017;
   exec_e_exe_not_supported=09018;
   exec_e_dll_not_supported=09019;
   exec_i_closing_script=09020;
-  exec_w_res_not_found=09021;
+  exec_e_res_not_found=09021;
   exec_i_compilingresource=09022;
   exec_t_unit_not_static_linkable_switch_to_smart=09023;
   exec_t_unit_not_smart_linkable_switch_to_static=09024;
@@ -592,7 +592,7 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 33070;
+  MsgTxtSize = 33103;
 
   MsgIdxMax : array[1..20] of longint=(
     17,59,179,37,41,41,98,14,35,42,

+ 55 - 53
compiler/msgtxt.inc

@@ -532,24 +532,24 @@ const msgtxt : array[0..000137,1..240] of char=(
   '09002_E_Can'#039't create assember file: $1'#000+
   '09003_E_Can'#039't create object file: $1'#000+
   '09004_E_Can'#039't create archive file: $1'#000+
-  '09005_W_Assembler',' $1 not found, switching to external assembling'#000+
+  '09005_E_Assembler',' $1 not found, switching to external assembling'#000+
   '09006_T_Using assembler: $1'#000+
-  '09007_W_Error while assembling exitcode $1'#000+
-  '09008_W_Can'#039't call the assembler, error $1 switching to external a'+
+  '09007_E_Error while assembling exitcode $1'#000+
+  '09008_E_Can'#039't call the assembler, error $1 switching to external a'+
   'ssembling'#000+
   '09009_I_Assembling $1'#000+
   '09010_I_Assembling smar','tlink $1'#000+
   '09011_W_Object $1 not found, Linking may fail !'#000+
   '09012_W_Library $1 not found, Linking may fail !'#000+
-  '09013_W_Error while linking'#000+
-  '09014_W_Can'#039't call the linker, switching to external linking'#000+
+  '09013_E_Error while linking'#000+
+  '09014_E_Can'#039't call the linker, switching to external linking'#000+
   '09015_I_Linking $1'#000+
-  '09016_W_Util $1 not found,',' switching to external linking'#000+
+  '09016_E_Util $1 not found,',' switching to external linking'#000+
   '09017_T_Using util $1'#000+
   '09018_E_Creation of Executables not supported'#000+
   '09019_E_Creation of Dynamic/Shared Libraries not supported'#000+
   '09020_I_Closing script $1'#000+
-  '09021_W_resource compiler not found, switching to extern','al mode'#000+
+  '09021_E_resource compiler not found, switching to extern','al mode'#000+
   '09022_I_Compiling resource $1'#000+
   '09023_T_unit $1 can'#039't be static linked, switching to smart linking'+
   #000+
@@ -646,162 +646,164 @@ const msgtxt : array[0..000137,1..240] of char=(
   'Compiler Date  : $FPCDATE'#010+
   'Compiler Targ','et: $FPCTARGET'#010+
   #010+
+  'Supported targets:'#010+
+  '  $OSTARGETS'#010+
+  #010+
   'This program comes under the GNU General Public Licence'#010+
   'For more information read COPYING.FPC'#010+
   #010+
   'Report bugs,suggestions etc to:'#010+
   '                 [email protected]'#000+
-  '11025_**0*_put + after a boolean switch option to enable i','t, - to di'+
+  '11025_**0*_put + after a ','boolean switch option to enable it, - to di'+
   'sable it'#010+
   '**1a_the compiler doesn'#039't delete the generated assembler file'#010+
   '**2al_list sourcecode lines in assembler file'#010+
   '**2ar_list register allocation/release info in assembler file'#010+
-  '**2at_list temp allocation/release info in assemble','r file'#010+
+  '**2at_list temp al','location/release info in assembler file'#010+
   '**1b_generate browser info'#010+
   '**2bl_generate local symbol info'#010+
   '**1B_build all modules'#010+
   '**1C<x>_code generation options:'#010+
   '**2CD_create also dynamic library (not supported)'#010+
-  '**2Ch<n>_<n> bytes heap (between 1023 and 67107840)'#010+
-  '**2Ci_IO-checki','ng'#010+
+  '**2Ch<n>_<n> bytes heap (between 1','023 and 67107840)'#010+
+  '**2Ci_IO-checking'#010+
   '**2Cn_omit linking stage'#010+
   '**2Co_check overflow of integer operations'#010+
   '**2Cr_range checking'#010+
   '**2Cs<n>_set stack size to <n>'#010+
   '**2Ct_stack checking'#010+
   '**2CX_create also smartlinked library'#010+
-  '**1d<x>_defines the symbol <x>'#010+
+  '**1d<x>_defines the symbo','l <x>'#010+
   '*O1D_generate a DEF file'#010+
-  '*O','2Dd<x>_set description to <x>'#010+
+  '*O2Dd<x>_set description to <x>'#010+
   '*O2Dw_PM application'#010+
   '**1e<x>_set path to executable'#010+
   '**1E_same as -Cn'#010+
   '**1F<x>_set file names and paths:'#010+
   '**2FD<x>_sets the directory where to search for compiler utilities'#010+
-  '**2Fe<x>_redirect error output to <x>'#010+
-  '**','2FE<x>_set exe/unit output path to <x>'#010+
+  '**2Fe<x','>_redirect error output to <x>'#010+
+  '**2FE<x>_set exe/unit output path to <x>'#010+
   '**2Fi<x>_adds <x> to include path'#010+
   '**2Fl<x>_adds <x> to library path'#010+
   '*L2FL<x>_uses <x> as dynamic linker'#010+
   '**2Fo<x>_adds <x> to object path'#010+
-  '**2Fr<x>_load error message file <x>'#010+
-  '**2Fu<x>_adds <x> to unit p','ath'#010+
+  '**2Fr<x>_load error message fil','e <x>'#010+
+  '**2Fu<x>_adds <x> to unit path'#010+
   '**2FU<x>_set unit output path to <x>, overrides -FE'#010+
   '*g1g_generate debugger information:'#010+
   '*g2gg_use gsym'#010+
   '*g2gd_use dbx'#010+
   '*g2gh_use heap trace unit (for memory leak debugging)'#010+
-  '*g2gl_use line info unit to show more info for backtraces'#010+
-  '*g2gc_g','enerate checks for pointers'#010+
+  '*g2gl_use line info unit to show',' more info for backtraces'#010+
+  '*g2gc_generate checks for pointers'#010+
   '**1i_information'#010+
   '**2iD_return compiler date'#010+
   '**2iV_return compiler version'#010+
   '**2iSO_return compiler OS'#010+
   '**2iSP_return compiler processor'#010+
   '**2iTO_return target OS'#010+
-  '**2iTP_return target processor'#010+
-  '**1I<x>_adds <x> to incl','ude path'#010+
+  '**2iTP_return target p','rocessor'#010+
+  '**1I<x>_adds <x> to include path'#010+
   '**1k<x>_Pass <x> to the linker'#010+
   '**1l_write logo'#010+
   '**1n_don'#039't read the default config file'#010+
   '**1o<x>_change the name of the executable produced to <x>'#010+
-  '**1pg_generate profile code for gprof (defines FPC_PROFILE)'#010+
-  '*L1P_use pipes instead of ','creating temporary assembler files'#010+
+  '**1pg_generate profile code for gprof (defines FPC_PR','OFILE)'#010+
+  '*L1P_use pipes instead of creating temporary assembler files'#010+
   '**1S<x>_syntax options:'#010+
   '**2S2_switch some Delphi 2 extensions on'#010+
   '**2Sc_supports operators like C (*=,+=,/= and -=)'#010+
   '**2Sa_include assertion code.'#010+
-  '**2Sd_tries to be Delphi compatible'#010+
-  '**2Se<x>_compiler stops ','after the <x> errors (default is 1)'#010+
+  '**2Sd_tries to be Delphi co','mpatible'#010+
+  '**2Se<x>_compiler stops after the <x> errors (default is 1)'#010+
   '**2Sg_allow LABEL and GOTO'#010+
   '**2Sh_Use ansistrings'#010+
   '**2Si_support C++ styled INLINE'#010+
   '**2Sm_support macros like C (global)'#010+
   '**2So_tries to be TP/BP 7.0 compatible'#010+
-  '**2Sp_tries to be gpc compatible'#010+
-  '**2Ss_construc','tor name must be init (destructor must be done)'#010+
+  '**2Sp_tries to',' be gpc compatible'#010+
+  '**2Ss_constructor name must be init (destructor must be done)'#010+
   '**2St_allow static keyword in objects'#010+
   '**1s_don'#039't call assembler and linker (only with -a)'#010+
   '**1u<x>_undefines the symbol <x>'#010+
   '**1U_unit options:'#010+
-  '**2Un_don'#039't check the unit name'#010+
-  '**2Ur_generate rel','ease unit files'#010+
+  '**2Un_don'#039't check',' the unit name'#010+
+  '**2Ur_generate release unit files'#010+
   '**2Us_compile a system unit'#010+
   '**1v<x>_Be verbose. <x> is a combination of the following letters:'#010+
   '**2*_e : Show errors (default)       d : Show debug info'#010+
-  '**2*_w : Show warnings               u : Show unit info'#010+
-  '**2*_n : Show no','tes                  t : Show tried/used files'#010+
+  '**2*_w : Show warnings               u ',': Show unit info'#010+
+  '**2*_n : Show notes                  t : Show tried/used files'#010+
   '**2*_h : Show hints                  m : Show defined macros'#010+
   '**2*_i : Show general info           p : Show compiled procedures'#010+
-  '**2*_l : Show linenumbers            c : Show conditionals'#010+
-  '**2*_a ',': Show everything             0 : Show nothing (except errors'+
-  ')'#010+
+  '**2*_l : Show linenumbers        ','    c : Show conditionals'#010+
+  '**2*_a : Show everything             0 : Show nothing (except errors)'#010+
   '**2*_b : Show all procedure          r : Rhide/GCC compatibility mode'#010+
   '**2*_    declarations if an error    x : Executable info (Win32 only)'#010+
-  '**2*_    occurs'#010+
-  '**1X_executable optio','ns:'#010+
+  '**2*','_    occurs'#010+
+  '**1X_executable options:'#010+
   '*L2Xc_link with the c library'#010+
   '**2Xs_strip all symbols from executable'#010+
   '**2XD_try to link dynamic          (defines FPC_LINK_DYNAMIC)'#010+
   '**2XS_try to link static (default) (defines FPC_LINK_STATIC)'#010+
-  '**2XX_try to link smart            (defines',' FPC_LINK_SMART)'#010+
+  '**2XX_try ','to link smart            (defines FPC_LINK_SMART)'#010+
   '**0*_Processor specific options:'#010+
   '3*1A<x>_output format:'#010+
   '3*2Aas_assemble using GNU AS'#010+
   '3*2Aasaout_assemble using GNU AS for aout (Go32v1)'#010+
   '3*2Anasmcoff_coff (Go32v2) file using Nasm'#010+
-  '3*2Anasmelf_elf32 (Linux) file using Nasm'#010+
-  '3*','2Anasmobj_obj file using Nasm'#010+
+  '3*2Anasmelf','_elf32 (Linux) file using Nasm'#010+
+  '3*2Anasmobj_obj file using Nasm'#010+
   '3*2Amasm_obj file using Masm (Microsoft)'#010+
   '3*2Atasm_obj file using Tasm (Borland)'#010+
   '3*2Acoff_coff (Go32v2) using internal writer'#010+
   '3*2Apecoff_pecoff (Win32) using internal writer'#010+
-  '3*1R<x>_assembler reading style:'#010+
-  '3*2R','att_read AT&T style assembler'#010+
+  '3*1R','<x>_assembler reading style:'#010+
+  '3*2Ratt_read AT&T style assembler'#010+
   '3*2Rintel_read Intel style assembler'#010+
   '3*2Rdirect_copy assembler text directly to assembler file'#010+
   '3*1O<x>_optimizations:'#010+
   '3*2Og_generate smaller code'#010+
-  '3*2OG_generate faster code (default)'#010+
-  '3*2Or_keep certain variable','s in registers'#010+
+  '3*2OG_generate faster code (def','ault)'#010+
+  '3*2Or_keep certain variables in registers'#010+
   '3*2Ou_enable uncertain optimizations (see docs)'#010+
   '3*2O1_level 1 optimizations (quick optimizations)'#010+
   '3*2O2_level 2 optimizations (-O1 + slower optimizations)'#010+
-  '3*2O3_level 3 optimizations (-O2 repeatedly, max 5 times)'#010+
-  '3*2Op<x>_tar','get processor:'#010+
+  '3*2O3_level 3 optimizations (-O2 repe','atedly, max 5 times)'#010+
+  '3*2Op<x>_target processor:'#010+
   '3*3Op1_set target processor to 386/486'#010+
   '3*3Op2_set target processor to Pentium/PentiumMMX (tm)'#010+
   '3*3Op3_set target processor to PPro/PII/c6x86/K6 (tm)'#010+
   '3*1T<x>_Target operating system:'#010+
-  '3*2TGO32V1_version 1 of DJ Delorie DOS exten','der'#010+
+  '3*2TGO32V1_','version 1 of DJ Delorie DOS extender'#010+
   '3*2TGO32V2_version 2 of DJ Delorie DOS extender'#010+
   '3*2TLINUX_Linux'#010+
   '3*2Tnetware_Novell Netware Module (experimental)'#010+
   '3*2TOS2_OS/2 2.x'#010+
   '3*2TSUNOS_SunOS/Solaris'#010+
   '3*2TWin32_Windows 32 Bit'#010+
-  '3*1W<x>_Win32 target options'#010+
-  '3*2WB<x>_Set Image base to H','exadecimal <x> value'#010+
+  '3*1W<x>_Win32 target opt','ions'#010+
+  '3*2WB<x>_Set Image base to Hexadecimal <x> value'#010+
   '3*2WC_Specify console type application'#010+
   '3*2WD_Use DEFFILE to export functions of DLL or EXE'#010+
   '3*2WF_Specify full-screen type application (OS/2 only)'#010+
   '3*2WG_Specify graphic type application'#010+
-  '3*2WN_Do not generate relocation c','ode (necessary for debugging)'#010+
+  '3','*2WN_Do not generate relocation code (necessary for debugging)'#010+
   '3*2WR_Generate relocation code'#010+
   '6*1A<x>_output format'#010+
   '6*2Aas_Unix o-file using GNU AS'#010+
   '6*2Agas_GNU Motorola assembler'#010+
   '6*2Amit_MIT Syntax (old GAS)'#010+
-  '6*2Amot_Standard Motorola assembler'#010+
+  '6*2Amot_Standard Motorola assemb','ler'#010+
   '6*1O_optimizations:'#010+
-  '6*2Oa_tur','n on the optimizer'#010+
+  '6*2Oa_turn on the optimizer'#010+
   '6*2Og_generate smaller code'#010+
   '6*2OG_generate faster code (default)'#010+
   '6*2Ox_optimize maximum (still BUGGY!!!)'#010+
   '6*2O2_set target processor to a MC68020+'#010+
   '6*1R<x>_assembler reading style:'#010+
-  '6*2RMOT_read motorola style assembler'#010+
-  '6*1T','<x>_Target operating system:'#010+
+  '6*2RMOT_r','ead motorola style assembler'#010+
+  '6*1T<x>_Target operating system:'#010+
   '6*2TAMIGA_Commodore Amiga'#010+
   '6*2TATARI_Atari ST/STe/TT'#010+
   '6*2TMACOS_Macintosh m68k'#010+

+ 21 - 1
compiler/scandir.pas

@@ -597,6 +597,21 @@ implementation
       end;
 {$ENDIF}
 
+    procedure dir_profile;
+      var
+        mac : tmacro;
+      begin
+        do_moduleswitch(cs_profile);
+        { defined/undefine FPC_PROFILE }
+        mac:=tmacro(current_scanner.macros.search('FPC_PROFILE'));
+        if not assigned(mac) then
+         begin
+           mac:=tmacro.create('FPC_PROFILE');
+           current_scanner.macros.insert(mac);
+         end;
+        mac.defined:=(cs_profile in aktmoduleswitches);
+      end;
+
     procedure dir_rangechecks;
       begin
         do_delphiswitch('R');
@@ -839,6 +854,7 @@ implementation
 {$IFDEF TestVarsets}
         AddDirective('PACKSET',{$ifdef FPCPROCVAR}@{$endif}dir_packset);
 {$ENDIF}
+        AddDirective('PROFILE',{$ifdef FPCPROCVAR}@{$endif}dir_profile);
         AddDirective('R',{$ifdef FPCPROCVAR}@{$endif}dir_resource);
         AddDirective('RANGECHECKS',{$ifdef FPCPROCVAR}@{$endif}dir_rangechecks);
         AddDirective('REFERENCEINFO',{$ifdef FPCPROCVAR}@{$endif}dir_referenceinfo);
@@ -871,7 +887,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.5  2001-07-01 20:16:16  peter
+  Revision 1.6  2001-08-07 18:47:13  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.5  2001/07/01 20:16:16  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN

+ 13 - 3
compiler/systems.pas

@@ -56,8 +56,9 @@ interface
             target_i386_GO32V1,target_i386_GO32V2,target_i386_linux,
               target_i386_OS2,target_i386_Win32,target_i386_freebsd,
               target_i386_Netware,target_i386_sunos,target_i386_beos,
+              target_i386_NetBsd,
             target_m68k_Amiga,target_m68k_Atari,target_m68k_Mac,
-              target_m68k_linux,target_m68k_PalmOS,
+              target_m68k_linux,target_m68k_PalmOS,target_m68k_NetBsd,
             target_alpha_linux,
             target_powerpc_linux,target_powerpc_macos
        );
@@ -78,7 +79,7 @@ interface
               ld_i386_OS2,ld_i386_Win32,ld_i386_freebsd,
               ld_i386_Netware,ld_i386_sunos,ld_i386_beos,
             ld_m68k_Amiga,ld_m68k_Atari,ld_m68k_Mac,
-              ld_m68k_linux,ld_m68k_PalmOS,
+              ld_m68k_linux,ld_m68k_PalmOS,ld_m68k_freebsd,
             ld_alpha_linux,
             ld_powerpc_linux,ld_powerpc_macos
        );
@@ -91,6 +92,10 @@ interface
             ,res_gnu_windres,res_emxbind
        );
 
+       tscript = (script_none
+            ,script_dos,script_unix,script_amiga
+       );
+
 
 {*****************************************************************************
                                Structures
@@ -181,6 +186,7 @@ interface
           linkextern   : tld;  { external linker, used by -s }
           ar           : tar;
           res          : tres;
+          script       : tscript;
           endian       : tendian;
           alignment    : talignmentinfo;
           size_of_pointer : byte;
@@ -630,7 +636,11 @@ finalization
 end.
 {
   $Log$
-  Revision 1.21  2001-07-01 20:16:18  peter
+  Revision 1.22  2001-08-07 18:47:13  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.21  2001/07/01 20:16:18  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN

+ 6 - 1
compiler/targets/t_amiga.pas

@@ -74,6 +74,7 @@ implementation
             linkextern   : ld_m68k_amiga;
             ar           : ar_m68k_ar;
             res          : res_none;
+            script       : script_amiga;
             endian       : endian_big;
             stackalignment : 2;
             maxCrecordalignment : 4;
@@ -93,7 +94,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.3  2001-06-03 15:15:31  peter
+  Revision 1.4  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.3  2001/06/03 15:15:31  peter
     * dllprt0 stub for linux shared libs
     * pass -init and -fini for linux shared libs
     * libprefix splitted into staticlibprefix and sharedlibprefix

+ 6 - 1
compiler/targets/t_atari.pas

@@ -74,6 +74,7 @@ implementation
             linkextern   : ld_m68k_atari;
             ar           : ar_m68k_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_big;
             stackalignment : 2;
             maxCrecordalignment : 4;
@@ -93,7 +94,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.3  2001-06-03 15:15:31  peter
+  Revision 1.4  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.3  2001/06/03 15:15:31  peter
     * dllprt0 stub for linux shared libs
     * pass -init and -fini for linux shared libs
     * libprefix splitted into staticlibprefix and sharedlibprefix

+ 6 - 1
compiler/targets/t_beos.pas

@@ -472,6 +472,7 @@ end;
             linkextern   : ld_i386_beos;
             ar           : ar_gnu_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_little;
             alignment    :
               (
@@ -510,7 +511,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.4  2001-07-01 20:16:20  peter
+  Revision 1.5  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.4  2001/07/01 20:16:20  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN

+ 146 - 5
compiler/targets/t_fbsd.pas

@@ -203,7 +203,7 @@ begin
      DllCmd[1]:='ld $OPT -shared -L. -o $EXE $RES';
      DllCmd[2]:='strip --strip-unneeded $EXE';
      { first try glibc2 }
-     {$ifndef BSD} {Keep linux code in place. FBSD might go to a different
+{$ifdef GLIBC2} {Keep linux code in place. FBSD might go to a different
                                 glibc too once}
      DynamicLinker:='/lib/ld-linux.so.2';
      if FileExists(DynamicLinker) then
@@ -217,11 +217,10 @@ begin
       end
      else
       DynamicLinker:='/lib/ld-linux.so.1';
-     {$ELSE}
+{$else}
       DynamicLinker:='';
-     {$endif}
+{$endif}
    end;
-
 end;
 
 
@@ -449,6 +448,7 @@ end;
                                      Initialize
 *****************************************************************************}
 
+{$ifdef i386}
     const
        target_i386_freebsd_info : ttargetinfo =
           (
@@ -483,6 +483,7 @@ end;
             linkextern   : ld_i386_freebsd;
             ar           : ar_gnu_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_little;
             alignment    :
               (
@@ -510,16 +511,156 @@ end;
             use_function_relative_addresses : true
           );
 
+       target_i386_netbsd_info : ttargetinfo =
+          (
+            target       : target_i386_NetBSD;
+            name         : 'NetBSD for i386';
+            shortname    : 'NetBSD';
+            flags        : [];
+            cpu          : i386;
+            unit_env     : 'BSDUNITS';
+            extradefines : 'UNIX;BSD';
+            sharedlibext : '.so';
+            staticlibext : '.a';
+            sourceext    : '.pp';
+            pasext       : '.pas';
+            exeext       : '';
+            defext       : '.def';
+            scriptext    : '.sh';
+            smartext     : '.sl';
+            unitext      : '.ppu';
+            unitlibext   : '.ppl';
+            asmext       : '.s';
+            objext       : '.o';
+            resext       : '.res';
+            resobjext    : '.or';
+            staticlibprefix : 'libp';
+            sharedlibprefix : 'lib';
+            Cprefix      : '';
+            newline      : #10;
+            assem        : as_i386_elf32;
+            assemextern  : as_i386_as;
+            link         : ld_i386_freebsd;
+            linkextern   : ld_i386_freebsd;
+            ar           : ar_gnu_ar;
+            res          : res_none;
+            script       : script_unix;
+            endian       : endian_little;
+            alignment    :
+              (
+                procalign       : 4;
+                loopalign       : 4;
+                jumpalign       : 0;
+                constalignmin   : 0;
+                constalignmax   : 1;
+                varalignmin     : 0;
+                varalignmax     : 1;
+                localalignmin   : 0;
+                localalignmax   : 1;
+                paraalign       : 4;
+                recordalignmin  : 0;
+                recordalignmax  : 2;
+                maxCrecordalign : 4
+              );
+            size_of_pointer : 4;
+            size_of_longint : 4;
+            heapsize    : 256*1024;
+            maxheapsize : 32768*1024;
+            stacksize   : 8192;
+            DllScanSupported:false;
+            use_bound_instruction : false;
+            use_function_relative_addresses : true
+          );
+{$endif i386}
+
+{$ifdef m68k}
+    const
+       target_i386_netbsd_info : ttargetinfo =
+          (
+            target       : target_i386_NetBSD;
+            name         : 'NetBSD for i386';
+            shortname    : 'NetBSD';
+            flags        : [];
+            cpu          : i386;
+            unit_env     : 'BSDUNITS';
+            extradefines : 'UNIX;BSD';
+            sharedlibext : '.so';
+            staticlibext : '.a';
+            sourceext    : '.pp';
+            pasext       : '.pas';
+            exeext       : '';
+            defext       : '.def';
+            scriptext    : '.sh';
+            smartext     : '.sl';
+            unitext      : '.ppu';
+            unitlibext   : '.ppl';
+            asmext       : '.s';
+            objext       : '.o';
+            resext       : '.res';
+            resobjext    : '.or';
+            staticlibprefix : 'libp';
+            sharedlibprefix : 'lib';
+            Cprefix      : '';
+            newline      : #10;
+            assem        : as_m68k_as;
+            assemextern  : as_m68k_as;
+            link         : ld_m68k_freebsd;
+            linkextern   : ld_m68k_freebsd;
+            ar           : ar_gnu_ar;
+            res          : res_none;
+            script       : script_unix;
+            endian       : endian_big;
+            alignment    :
+              (
+                procalign       : 4;
+                loopalign       : 4;
+                jumpalign       : 0;
+                constalignmin   : 0;
+                constalignmax   : 1;
+                varalignmin     : 0;
+                varalignmax     : 1;
+                localalignmin   : 0;
+                localalignmax   : 1;
+                paraalign       : 4;
+                recordalignmin  : 0;
+                recordalignmax  : 2;
+                maxCrecordalign : 4
+              );
+            size_of_pointer : 4;
+            size_of_longint : 4;
+            heapsize    : 256*1024;
+            maxheapsize : 32768*1024;
+            stacksize   : 8192;
+            DllScanSupported:false;
+            use_bound_instruction : false;
+            use_function_relative_addresses : true
+          );
+{$endif m68k}
 
 initialization
+{$ifdef i386}
   RegisterLinker(ld_i386_freebsd,TLinkerFreeBSD);
   RegisterImport(target_i386_freebsd,timportlibfreebsd);
   RegisterExport(target_i386_freebsd,texportlibfreebsd);
   RegisterTarget(target_i386_freebsd_info);
+  RegisterImport(target_i386_netbsd,timportlibfreebsd);
+  RegisterExport(target_i386_netbsd,texportlibfreebsd);
+  RegisterTarget(target_i386_netbsd_info);
+{$endif i386}
+{$ifdef m68k}
+  RegisterLinker(ld_m68k_freebsd,TLinkerFreeBSD);
+  RegisterImport(target_m68k_netbsd,timportlibfreebsd);
+  RegisterExport(target_m68k_netbsd,texportlibfreebsd);
+  RegisterTarget(target_m68k_netbsd_info);
+{$endif m68k}
 end.
 {
   $Log$
-  Revision 1.8  2001-07-01 20:16:20  peter
+  Revision 1.9  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.8  2001/07/01 20:16:20  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN

+ 6 - 1
compiler/targets/t_go32v1.pas

@@ -225,6 +225,7 @@ end;
             linkextern   : ld_i386_go32v1;
             ar           : ar_gnu_ar;
             res          : res_none;
+            script       : script_dos;
             endian       : endian_little;
             alignment    :
               (
@@ -259,7 +260,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.7  2001-07-01 20:16:20  peter
+  Revision 1.8  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.7  2001/07/01 20:16:20  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN

+ 6 - 1
compiler/targets/t_go32v2.pas

@@ -447,6 +447,7 @@ end;
             linkextern   : ld_i386_go32v2;
             ar           : ar_gnu_ar;
             res          : res_none;
+            script       : script_dos;
             endian       : endian_little;
             alignment    :
               (
@@ -481,7 +482,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.9  2001-07-10 21:01:35  peter
+  Revision 1.10  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.9  2001/07/10 21:01:35  peter
     * fixed crash with writing of the linker script
 
   Revision 1.8  2001/07/01 20:16:20  peter

+ 9 - 1
compiler/targets/t_linux.pas

@@ -509,6 +509,7 @@ end;
             linkextern   : ld_i386_linux;
             ar           : ar_gnu_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_little;
             alignment    :
               (
@@ -572,6 +573,7 @@ end;
             linkextern   : ld_m68k_linux;
             ar           : ar_m68k_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_big;
             stackalignment : 2;
             maxCrecordalignment : 32;
@@ -619,6 +621,7 @@ end;
             assemsrc     : as_powerpc_as;
             ar           : ar_powerpc_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_big;
             stackalignment : 8;
             maxCrecordalignment : 32;
@@ -668,6 +671,7 @@ end;
             linkextern   : ld_alpha_linux;
             ar           : ar_alpha_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_little;
             stackalignment : 8;
             maxCrecordalignment : 32;
@@ -711,7 +715,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.10  2001-07-01 20:16:20  peter
+  Revision 1.11  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.10  2001/07/01 20:16:20  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN

+ 7 - 1
compiler/targets/t_macos.pas

@@ -75,6 +75,7 @@ implementation
             linkextern   : ld_m68k_mac;
             ar           : ar_m68k_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_big;
             stackalignment : 2;
             maxCrecordalignment : 4;
@@ -125,6 +126,7 @@ implementation
             linkextern   : ld_powerpc_macos;
             ar           : ar_powerpc_ar;
             res          : res_powerpc_mpw;
+            script       : script_unix;
             endian       : endian_big;
             stackalignment : 8;
             maxCrecordalignment : 32;
@@ -150,7 +152,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.3  2001-06-03 15:15:32  peter
+  Revision 1.4  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.3  2001/06/03 15:15:32  peter
     * dllprt0 stub for linux shared libs
     * pass -init and -fini for linux shared libs
     * libprefix splitted into staticlibprefix and sharedlibprefix

+ 6 - 1
compiler/targets/t_nwm.pas

@@ -489,6 +489,7 @@ end;
             linkextern   : ld_i386_netware;
             ar           : ar_gnu_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_little;
             alignment    :
               (
@@ -525,7 +526,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.8  2001-07-01 20:16:20  peter
+  Revision 1.9  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.8  2001/07/01 20:16:20  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN

+ 6 - 1
compiler/targets/t_os2.pas

@@ -547,6 +547,7 @@ end;
             linkextern   : ld_i386_os2;
             ar           : ar_gnu_ar;
             res          : res_emxbind;
+            script       : script_dos;
             endian       : endian_little;
             alignment    :
               (
@@ -583,7 +584,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.8  2001-07-01 20:16:20  peter
+  Revision 1.9  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.8  2001/07/01 20:16:20  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN

+ 6 - 1
compiler/targets/t_palmos.pas

@@ -75,6 +75,7 @@ implementation
             linkextern   : ld_m68k_palmos;
             ar           : ar_m68k_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_big;
             stackalignment : 2;
             maxCrecordalignment : 32;
@@ -96,7 +97,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.3  2001-06-03 15:15:32  peter
+  Revision 1.4  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.3  2001/06/03 15:15:32  peter
     * dllprt0 stub for linux shared libs
     * pass -init and -fini for linux shared libs
     * libprefix splitted into staticlibprefix and sharedlibprefix

+ 6 - 1
compiler/targets/t_sunos.pas

@@ -512,6 +512,7 @@ end;
             linkextern   : ld_i386_sunos;
             ar           : ar_gnu_ar;
             res          : res_none;
+            script       : script_unix;
             endian       : endian_little;
             alignment    :
               (
@@ -548,7 +549,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.8  2001-07-01 20:16:21  peter
+  Revision 1.9  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.8  2001/07/01 20:16:21  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN

+ 12 - 1
compiler/targets/t_win32.pas

@@ -756,6 +756,12 @@ begin
      if s<>'' then
       LinkRes.AddFileName(GetShortName(s));
    end;
+  { add libaries required for profiling }
+  if cs_profile in aktmoduleswitches then
+   begin
+     LinkRes.Add('-lgmon');
+     LinkRes.Add('-lc');
+   end;
   LinkRes.Add(')');
 
   { Write staticlibraries }
@@ -1431,6 +1437,7 @@ function tDLLScannerWin32.scan(const binname:string):longbool;
             linkextern   : ld_i386_win32;
             ar           : ar_gnu_arw;
             res          : res_gnu_windres;
+            script       : script_dos;
             endian       : endian_little;
             alignment    :
               (
@@ -1470,7 +1477,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.14  2001-07-01 20:16:21  peter
+  Revision 1.15  2001-08-07 18:47:15  peter
+    * merged netbsd start
+    * profile for win32
+
+  Revision 1.14  2001/07/01 20:16:21  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN