Bläddra i källkod

+ switch -FD added to specify the path for utilities

florian 27 år sedan
förälder
incheckning
eaab0f1c1b
5 ändrade filer med 76 tillägg och 42 borttagningar
  1. 12 2
      compiler/assemble.pas
  2. 25 4
      compiler/link.pas
  3. 1 0
      compiler/msgidx.inc
  4. 33 33
      compiler/msgtxt.inc
  5. 5 3
      compiler/symppu.inc

+ 12 - 2
compiler/assemble.pas

@@ -140,7 +140,14 @@ begin
   if lastas<>ord(target_asm.id) then
    begin
      lastas:=ord(target_asm.id);
-     LastASBin:=FindExe(target_asm.asmbin,asfound);
+     { is an assembler passed ? }
+     if utilsdirectory<>'' then
+         begin
+            LastASBin:=Search(target_asm.asmbin+source_os.exeext,
+              utilsdirectory,asfound)+target_asm.asmbin+source_os.exeext;
+         end
+       else
+         LastASBin:=FindExe(target_asm.asmbin,asfound);
      if (not asfound) and not(cs_asm_extern in aktglobalswitches) then
       begin
         Message1(exec_w_assembler_not_found,LastASBin);
@@ -521,7 +528,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.29  1998-10-15 16:19:42  peter
+  Revision 1.30  1998-10-16 13:37:14  florian
+    + switch -FD added to specify the path for utilities
+
+  Revision 1.29  1998/10/15 16:19:42  peter
     * fixed asmsynchronize
 
   Revision 1.28  1998/10/14 15:56:43  pierre

+ 25 - 4
compiler/link.pas

@@ -146,7 +146,13 @@ var
 begin
   if LastLDBin='' then
    begin
-     LastLDBin:=FindExe(target_link.linkbin,ldfound);
+     if utilsdirectory<>'' then
+       begin
+          LastLDBin:=Search(target_link.linkbin+source_os.exeext,
+            utilsdirectory,ldfound)+target_link.linkbin+source_os.exeext;
+       end
+     else
+       LastLDBin:=FindExe(target_link.linkbin,ldfound);
      if (not ldfound) and not(cs_link_extern in aktglobalswitches) then
       begin
         Message1(exec_w_linker_not_found,LastLDBin);
@@ -419,7 +425,13 @@ begin
      {When an EMX program runs in DOS, the heap and stack share the
       same memory pool. The heap grows upwards, the stack grows downwards.}
      Replace(s,'$DOSHEAPKB',tostr((stacksize+maxheapsize+1023) shr 10));
-     bindbin:=FindExe(target_link.bindbin,bindfound);
+     if utilsdirectory<>'' then
+       begin
+          bindbin:=Search(target_link.bindbin+source_os.exeext,
+            utilsdirectory,bindfound)+target_link.bindbin+source_os.exeext;
+       end
+     else
+       bindbin:=FindExe(target_link.bindbin,bindfound);
      if (not bindfound) and not (cs_link_extern in aktglobalswitches) then
       begin
         Message1(exec_w_binder_not_found,bindbin);
@@ -455,7 +467,13 @@ var
 begin
   smartpath:=current_module^.path^+FixPath(FixFileName(current_module^.modulename^)+target_info.smartext);
 { find ar binary }
-  arbin:=FindExe(target_ar.arbin,arfound);
+  if utilsdirectory<>'' then
+    begin
+       arbin:=Search(target_ar.arbin+source_os.exeext,
+         utilsdirectory,arfound)+target_ar.arbin+source_os.exeext;
+    end
+  else
+    arbin:=FindExe(target_ar.arbin,arfound);
   if (not arfound) and not(cs_link_extern in aktglobalswitches) then
    begin
      Message(exec_w_ar_not_found);
@@ -499,7 +517,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.33  1998-10-14 13:38:22  peter
+  Revision 1.34  1998-10-16 13:37:18  florian
+    + switch -FD added to specify the path for utilities
+
+  Revision 1.33  1998/10/14 13:38:22  peter
     * fixed path with staticlib/objects in ppufiles
 
   Revision 1.32  1998/10/14 11:03:55  daniel

+ 1 - 0
compiler/msgidx.inc

@@ -497,6 +497,7 @@ type tmsgconst=(
   ol020,
   ol021,
   ol022,
+  ol0129,
   ol023,
   ol024,
   ol025,

+ 33 - 33
compiler/msgtxt.inc

@@ -512,107 +512,107 @@ const msgtxt : array[0..00091,1..240] of char=(+
   '**1e<x>_set path to executable'#000+
   '**1E_same as -Cn'#000+
   '**1F','_set file names and paths'#000+
+  '**2FD<x>_sets the directory where to search for compiler utilities'#000+
   '**2Fe<x>_redirect error output to <x>'#000+
   '**2FE<x>_set exe/unit output path to <x>'#000+
   '*L2Fg<x>_same as -Fl'#000+
   '**2Fi<x>_adds <x> to include path'#000+
-  '**2Fl<x>_adds <x> to library path'#000+
+  '**2Fl<x>_adds',' <x> to library path'#000+
   '*L2FL<x>_uses <x> as dynamic linker'#000+
-  '**2Fo<x>_a','dds <x> to object path'#000+
+  '**2Fo<x>_adds <x> to object path'#000+
   '**2Fr<x>_load error message file <x>'#000+
   '**2Fu<x>_adds <x> to unit path'#000+
   '**2FU<x>_set unit output path to <x>, overrides -FE'#000+
-  '*g1g_generate debugger information'#000+
+  '*g1g_generate debugger informa','tion'#000+
   '*g2gg_use gsym'#000+
   '*g2gd_use dbx'#000+
   '**1i_information'#000+
-  '**1I<x>_adds <x>',' to include path'#000+
+  '**1I<x>_adds <x> to include path'#000+
   '**1k<x>_Pass <x> to the linker'#000+
   '**1l_write logo'#000+
   '**1n_don'#039't read the default config file'#000+
   '**1o<x>_change the name of the executable produced to <x>'#000+
-  '**1pg_generate profile code for gprof'#000+
-  '*L1P_use pipes instead of creating tempo','rary assembler files'#000+
+  '**1pg_gener','ate profile code for gprof'#000+
+  '*L1P_use pipes instead of creating temporary assembler files'#000+
   '**1S_syntax options'#000+
   '**2S2_switch some Delphi 2 extensions on'#000+
   '**2Sc_supports operators like C (*=,+=,/= and -=)'#000+
   '**2Sd_tries to be Delphi compatible'#000+
-  '**2Se_compiler stops after the first error'#000+
+  '**2Se','_compiler stops after the first error'#000+
   '**2Sg_allow LABEL and GOTO'#000+
-  '**','2Si_support C++ stlyed INLINE'#000+
+  '**2Si_support C++ stlyed INLINE'#000+
   '**2Sm_support macros like C (global)'#000+
   '**2So_tries to be TP/BP 7.0 compatible'#000+
   '**2Sp_tries to be gpc compatible'#000+
-  '**2Ss_constructor name must be init (destructor must be done)'#000+
+  '**2Ss_constructor name must be ini','t (destructor must be done)'#000+
   '**2St_allow static keyword in objects'#000+
-  '*','*2Sv_allow variable directives (cvar,external,public,export)'#000+
+  '**2Sv_allow variable directives (cvar,external,public,export)'#000+
   '**1s_don'#039't call assembler and linker (only with -a)'#000+
   '**1u<x>_undefines the symbol <x>'#000+
   '**1U_unit options'#000+
-  '**2Un_don'#039't check the unit name'#000+
+  '**2Un_don',#039't check the unit name'#000+
   '**2Up<x>_same as -Fu<x>'#000+
-  '**2Us_compile a syst','em unit'#000+
+  '**2Us_compile a system unit'#000+
   '**1v<x>_Be verbose. <x> is a combination of the following letters :'#000+
   '**2*_e : Show errors (default)       d : Show debug info'#000+
-  '**2*_w : Show warnings               u : Show unit info'#000+
-  '**2*_n : Show notes                  t : Show tried','/used files'#000+
+  '**2*_w : Show warnings               u :',' Show unit info'#000+
+  '**2*_n : Show notes                  t : Show tried/used files'#000+
   '**2*_h : Show hints                  m : Show defined macros'#000+
   '**2*_i : Show general info           p : Show compiled procedures'#000+
-  '**2*_l : Show linenumbers            c : Show conditionals'#000+
-  '**2*_a : Show everything             0 : S','how nothing (except errors'+
-  ')'#000+
+  '**2*_l : Show linenumbers         ','   c : Show conditionals'#000+
+  '**2*_a : Show everything             0 : Show nothing (except errors)'#000+
   '**2*_b : Show all procedure          r : Rhide/GCC compatibility mode'#000+
   '**2*_    declarations if an error'#000+
   '**2*_    occurs'#000+
   '**1X_executable options'#000+
-  '*L2Xc_link with the c library'#000+
-  '**2XD_link with dynamic libraries (def','ines FPC_LINK_DYNAMIC)'#000+
+  '*','L2Xc_link with the c library'#000+
+  '**2XD_link with dynamic libraries (defines FPC_LINK_DYNAMIC)'#000+
   '**2Xs_strip all symbols from executable'#000+
   '**2XS_link with static libraries (defines FPC_LINK_STATIC)'#000+
   '**0*_Processor specific options:'#000+
-  '3*1A<x>_output format'#000+
+  '3*1A<x>_output for','mat'#000+
   '3*2Ao_coff file using GNU AS'#000+
-  '3*2Anasmcoff_coff file using Nasm'#000,+
+  '3*2Anasmcoff_coff file using Nasm'#000+
   '3*2Anasmelf_elf32 (linux) file using Nasm'#000+
   '3*2Anasmobj_obj file using Nasm'#000+
   '3*2Amasm_obj using Masm (Mircosoft)'#000+
   '3*2Atasm_obj using Tasm (Borland)'#000+
-  '3*1R<x>_assembler reading style'#000+
+  '3*1R<x>_assembler reading sty','le'#000+
   '3*2Ratt_read AT&T style assembler'#000+
-  '3*2Rintel_read Intel style ass','embler'#000+
+  '3*2Rintel_read Intel style assembler'#000+
   '3*2Rdirect_copy assembler text directly to assembler file'#000+
   '3*1O<x>_optimizations'#000+
   '3*2Og_generate smaller code'#000+
   '3*2OG_generate faster code (default)'#000+
-  '3*2Or_keep certain variables in registers (still BUGGY!!!)'#000+
-  '3*2Ou_enable uncertain optimi','zations (see docs)'#000+
+  '3*2Or_keep certain va','riables in registers (still BUGGY!!!)'#000+
+  '3*2Ou_enable uncertain optimizations (see docs)'#000+
   '3*2O1_level 1 optimizations (quick optimizations)'#000+
   '3*2O2_level 2 optimizations (-O1 + slower optimizations)'#000+
   '3*2O3_level 3 optimizations (same as -O2u)'#000+
-  '3*2Op_target processor'#000+
+  '3*2O','p_target processor'#000+
   '3*3Op1_set target processor to 386/486'#000+
-  '3*3Op2_se','t target processor to Pentium/PentiumMMX (tm)'#000+
+  '3*3Op2_set target processor to Pentium/PentiumMMX (tm)'#000+
   '3*3Op3_set target processor to PPro/PII/c6x86/K6 (tm)'#000+
   '3*1T<x>_Target operating system'#000+
-  '3*2TGO32V1_version 1 of DJ Delorie DOS extender'#000+
+  '3*2TGO32V1_version 1 of DJ Delorie DOS ex','tender'#000+
   '3*2TGO32V2_version 2 of DJ Delorie DOS extender'#000+
-  '3*2TLINUX_Li','nux'#000+
+  '3*2TLINUX_Linux'#000+
   '3*2TOS2_OS/2 2.x'#000+
   '3*2TWin32_Windows 32 Bit'#000+
   '6*1A<x>_output format'#000+
   '6*2Ao_Unix o-file using GNU AS'#000+
   '6*2Agas_GNU Motorola assembler'#000+
   '6*2Amit_MIT Syntax (old GAS)'#000+
-  '6*2Amot_Standard Motorola assembler'#000+
+  '6*2Amot_Standa','rd Motorola assembler'#000+
   '6*1O_optimizations'#000+
-  '6*2Oa_turn on the optimize','r'#000+
+  '6*2Oa_turn on the optimizer'#000+
   '6*2Og_generate smaller code'#000+
   '6*2OG_generate faster code (default)'#000+
   '6*2Ox_optimize maximum (still BUGGY!!!)'#000+
   '6*2O2_set target processor to a MC68020+'#000+
-  '6*1R<x>_assembler reading style'#000+
+  '6*1R<x>_assembler reading',' style'#000+
   '6*2RMOT_read motorola style assembler'#000+
-  '6*1T<x>_Target operati','ng system'#000+
+  '6*1T<x>_Target operating system'#000+
   '6*2TAMIGA_Commodore Amiga'#000+
   '6*2TATARI_Atari ST/STe/TT'#000+
   '6*2TMACOS_Macintosh m68k'#000+

+ 5 - 3
compiler/symppu.inc

@@ -215,8 +215,7 @@
 
        { flush to be sure }
          current_ppu^.flush;
-       { create and write header }
-         current_ppu^.header.size:=current_ppu^.size;
+       { create and write header }         current_ppu^.header.size:=current_ppu^.size;
          current_ppu^.header.checksum:=current_ppu^.crc;
          current_ppu^.header.compiler:=wordversion;
          current_ppu^.header.cpu:=word(target_cpu);
@@ -446,7 +445,10 @@
 
 {
   $Log$
-  Revision 1.22  1998-10-14 13:38:24  peter
+  Revision 1.23  1998-10-16 13:37:24  florian
+    + switch -FD added to specify the path for utilities
+
+  Revision 1.22  1998/10/14 13:38:24  peter
     * fixed path with staticlib/objects in ppufiles
 
   Revision 1.21  1998/10/14 10:45:10  pierre