Browse Source

* some scanner optimizes
* automaticly aout2exe for go32v1
* fixed dynamiclinker option which was added at the wrong place

peter 27 years ago
parent
commit
5d25d6f1d6
3 changed files with 209 additions and 129 deletions
  1. 37 31
      compiler/link.pas
  2. 142 95
      compiler/scanner.pas
  3. 30 3
      compiler/systems.pas

+ 37 - 31
compiler/link.pas

@@ -124,7 +124,7 @@ var
   ext  : extstr;
   ext  : extstr;
 begin
 begin
   FSplit(s,path,name,ext);
   FSplit(s,path,name,ext);
-  ExeName:=Path+Name+target_os.ExeExt;
+  ExeName:=Path+Name+target_info.ExeExt;
 end;
 end;
 
 
 
 
@@ -257,10 +257,7 @@ Var
   i            : longint;
   i            : longint;
   prtobj,s,s2  : string;
   prtobj,s,s2  : string;
 begin
 begin
-{ Open linkresponse and write header }
-  assign(linkresponse,inputdir+LinkResName);
-  rewrite(linkresponse);
-
+  WriteResponseFile:=False;
 { set special options for some targets }
 { set special options for some targets }
   prtobj:='prt0';
   prtobj:='prt0';
   case target_info.target of
   case target_info.target of
@@ -275,7 +272,21 @@ begin
                   end;
                   end;
   end;
   end;
 
 
-{ Add library searchpath }
+{ Fix command line options }
+  If not SharedLibFiles.Empty then
+   LinkOptions:='-dynamic-linker='+DynamicLinker+' '+LinkOptions;
+  if Strip then
+   LinkOptions:=LinkOptions+target_link.stripopt;
+
+{ Open linkresponse and write header }
+  assign(linkresponse,inputdir+LinkResName);
+  {$I-}
+   rewrite(linkresponse);
+  {$I+}
+  if ioresult<>0 then
+   exit;
+
+  { Write library searchpath }
   S2:=LibrarySearchPath;
   S2:=LibrarySearchPath;
   Repeat
   Repeat
     i:=Pos(';',S2);
     i:=Pos(';',S2);
@@ -288,7 +299,7 @@ begin
   until S2='';
   until S2='';
 
 
   writeln(linkresponse,target_link.inputstart);
   writeln(linkresponse,target_link.inputstart);
-{ add objectfiles, start with prt0 always }
+  { add objectfiles, start with prt0 always }
   if prtobj<>'' then
   if prtobj<>'' then
    Writeln(linkresponse,FindObjectFile(prtobj));
    Writeln(linkresponse,FindObjectFile(prtobj));
   while not ObjectFiles.Empty do
   while not ObjectFiles.Empty do
@@ -297,7 +308,8 @@ begin
      if s<>'' then
      if s<>'' then
       Writeln(linkresponse,s);
       Writeln(linkresponse,s);
    end;
    end;
-{ Write sharedlibraries like -l<lib> }
+
+  { Write sharedlibraries like -l<lib> }
   While not SharedLibFiles.Empty do
   While not SharedLibFiles.Empty do
    begin
    begin
      S:=SharedLibFiles.Get;
      S:=SharedLibFiles.Get;
@@ -308,7 +320,7 @@ begin
    end;
    end;
   writeln(linkresponse,target_link.inputend);
   writeln(linkresponse,target_link.inputend);
 
 
-{ Write staticlibraries }
+  { Write staticlibraries }
   if not StaticLibFiles.Empty then
   if not StaticLibFiles.Empty then
    begin
    begin
      Writeln(LinkResponse,target_link.GroupStart);
      Writeln(LinkResponse,target_link.GroupStart);
@@ -330,9 +342,8 @@ Function TLinker.MakeExecutable:boolean;
 var
 var
   bindbin    : string[80];
   bindbin    : string[80];
   bindfound  : boolean;
   bindfound  : boolean;
-  _stacksize,i,
-  _heapsize  : longint;
-  s,s2       : string;
+  i          : longint;
+  s          : string;
   dummy      : file;
   dummy      : file;
   success    : boolean;
   success    : boolean;
 begin
 begin
@@ -346,11 +357,6 @@ begin
    end;
    end;
 {$endif Linux}
 {$endif Linux}
 
 
-  If not SharedLibFiles.Empty then
-   LinkOptions:='-dynamic-linker='+DynamicLinker+' '+LinkOptions;
-  if Strip then
-   LinkOptions:=LinkOptions+target_link.stripopt;
-
 { Write used files and libraries }
 { Write used files and libraries }
   WriteResponseFile;
   WriteResponseFile;
 
 
@@ -362,25 +368,20 @@ begin
   Replace(s,'$OPT',LinkOptions);
   Replace(s,'$OPT',LinkOptions);
   Replace(s,'$RES',inputdir+LinkResName);
   Replace(s,'$RES',inputdir+LinkResName);
   success:=DoExec(FindLinker,s,true,false);
   success:=DoExec(FindLinker,s,true,false);
-
 {Bind}
 {Bind}
-  if target_info.target=target_os2 then
+  if target_link.bindbin<>'' then
    begin
    begin
-   {Calculate the stack and heap size in kilobytes, rounded upwards.}
-     _stacksize:=(stacksize+1023) shr 10;
-   {Minimum stacksize for EMX is 32K.}
-     if _stacksize<32 then
-      _stacksize:=32;
-     str(_stacksize,s);
-     _heapsize:=(heapsize+1023) shr 10;
-     str(_heapsize,s2);
-     bindbin:=FindExe('emxbind',bindfound);
+     s:=target_link.bindcmd;
+     Replace(s,'$EXE',exename);
+     Replace(s,'$HEAPKB',tostr((heapsize+1023) shr 10));
+     Replace(s,'$STACKKB',tostr((stacksize+1023) shr 10));
+     bindbin:=FindExe(target_link.bindbin,bindfound);
      if (not bindfound) and (not externlink) then
      if (not bindfound) and (not externlink) then
       begin
       begin
-        Message(exec_w_binder_not_found);
+        Message1(exec_w_binder_not_found,bindbin);
         externlink:=true;
         externlink:=true;
       end;
       end;
-     DoExec(bindbin,'-k'+s+' -o '+exename+'.exe '+exename+' -aim -s'+s2,false,false);
+     DoExec(bindbin,s,false,false);
    end;
    end;
 {Remove ReponseFile}
 {Remove ReponseFile}
   if (success) and (not externlink) then
   if (success) and (not externlink) then
@@ -438,7 +439,12 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.10  1998-05-22 12:32:47  peter
+  Revision 1.11  1998-05-27 00:20:31  peter
+    * some scanner optimizes
+    * automaticly aout2exe for go32v1
+    * fixed dynamiclinker option which was added at the wrong place
+
+  Revision 1.10  1998/05/22 12:32:47  peter
     * fixed -L on the commandline, Dos commandline is only 128 bytes
     * fixed -L on the commandline, Dos commandline is only 128 bytes
 
 
   Revision 1.9  1998/05/12 10:46:59  peter
   Revision 1.9  1998/05/12 10:46:59  peter

+ 142 - 95
compiler/scanner.pas

@@ -147,11 +147,11 @@ unit scanner;
         orgpattern,
         orgpattern,
         pattern        : string;
         pattern        : string;
         macrobuffer    : ^tmacrobuffer;
         macrobuffer    : ^tmacrobuffer;
-        comment_level  : word;
         inputbuffer    : pchar;
         inputbuffer    : pchar;
         inputpointer   : pchar;
         inputpointer   : pchar;
-        parse_types,                      { true, if type declarations are parsed }
+{        parse_types,   }                   { true, if type declarations are parsed }
         s_point        : boolean;
         s_point        : boolean;
+        comment_level,
         yylexcount,
         yylexcount,
         macropos,
         macropos,
         lastlinepos,
         lastlinepos,
@@ -412,8 +412,15 @@ unit scanner;
               readstring[i]:=c;
               readstring[i]:=c;
             end;
             end;
         { get next char }
         { get next char }
-           readchar;
+           c:=inputpointer^;
+           if c=#0 then
+            reload
+           else
+            inc(longint(inputpointer));
          end;
          end;
+      { was the next char a linebreak ? }
+        if c in [#10,#13] then
+         linebreak;
         readstring[0]:=chr(i);
         readstring[0]:=chr(i);
       end;
       end;
 
 
@@ -458,12 +465,16 @@ unit scanner;
               readnumber[i]:=c;
               readnumber[i]:=c;
             end;
             end;
         { get next char }
         { get next char }
-           readchar;
+           c:=inputpointer^;
+           if c=#0 then
+            reload
+           else
+            inc(longint(inputpointer));
          end;
          end;
-        readnumber[0]:=chr(i);
       { was the next char a linebreak ? }
       { was the next char a linebreak ? }
-      {  if c in [#10,#13] then
-         linebreak; }
+        if c in [#10,#13] then
+         linebreak;
+        readnumber[0]:=chr(i);
       end;
       end;
 
 
 
 
@@ -498,7 +509,14 @@ unit scanner;
                end;
                end;
             end;
             end;
           end;
           end;
-          readchar;
+{          readchar; }
+          c:=inputpointer^;
+          if c=#0 then
+           reload
+          else
+           inc(longint(inputpointer));
+          if c in [#10,#13] then
+           linebreak;
         until false;
         until false;
         readcomment[0]:=chr(i);
         readcomment[0]:=chr(i);
       end;
       end;
@@ -508,14 +526,15 @@ unit scanner;
       begin
       begin
         while c in [' ',#9..#13] do
         while c in [' ',#9..#13] do
          begin
          begin
-           readchar;
-           {c:=inputpointer^;
+{           readchar; }
+           c:=inputpointer^;
            if c=#0 then
            if c=#0 then
             reload
             reload
            else
            else
             inc(longint(inputpointer));
             inc(longint(inputpointer));
            if c in [#10,#13] then
            if c in [#10,#13] then
-            linebreak; }
+            linebreak;
+
          end;
          end;
       end;
       end;
 
 
@@ -544,12 +563,15 @@ unit scanner;
            else
            else
             found:=0;
             found:=0;
            end;
            end;
-           readchar;
-           {c:=inputpointer^;
+{           readchar;}
+           c:=inputpointer^;
            if c=#0 then
            if c=#0 then
             reload
             reload
            else
            else
-            inc(longint(inputpointer));}
+            inc(longint(inputpointer));
+           if c in [#10,#13] then
+            linebreak;
+
          until (found=2);
          until (found=2);
       end;
       end;
 
 
@@ -570,14 +592,15 @@ unit scanner;
             '}' : dec_comment_level;
             '}' : dec_comment_level;
             #26 : Message(scan_f_end_of_file);
             #26 : Message(scan_f_end_of_file);
            end;
            end;
-           readchar;
-           {c:=inputpointer^;
+{           readchar; }
+           c:=inputpointer^;
            if c=#0 then
            if c=#0 then
             reload
             reload
            else
            else
-            inc(longint(inputpointer));}
+            inc(longint(inputpointer));
+           if c in [#10,#13] then
+            linebreak;
          end;
          end;
-       {if (c=#10) or (c=#13) then linebreak;}
       end;
       end;
 
 
 
 
@@ -633,18 +656,20 @@ unit scanner;
              else
              else
               found:=0;
               found:=0;
              end;
              end;
-             readchar;
-             {c:=inputpointer^;
+{             readchar; }
+             c:=inputpointer^;
              if c=#0 then
              if c=#0 then
               reload
               reload
              else
              else
-              inc(longint(inputpointer));}
+              inc(longint(inputpointer));
+             if c in [#10,#13] then
+              linebreak;
            until (found=2);
            until (found=2);
          end;
          end;
       end;
       end;
 
 
 
 
-        function yylex : ttoken;
+     function yylex : ttoken;
      var
      var
         y    : ttoken;
         y    : ttoken;
         code : word;
         code : word;
@@ -655,14 +680,14 @@ unit scanner;
       label
       label
          exit_label;
          exit_label;
      begin
      begin
-        tokenpos.line:=current_module^.current_inputfile^.line_no;
-        tokenpos.column:=get_current_col;
-        tokenpos.fileindex:=current_module^.current_index;
         { was the last character a point ? }
         { was the last character a point ? }
         { this code is needed because the scanner if there is a 1. found if  }
         { this code is needed because the scanner if there is a 1. found if  }
         { this is a floating point number or range like 1..3                 }
         { this is a floating point number or range like 1..3                 }
         if s_point then
         if s_point then
           begin
           begin
+             tokenpos.line:=current_module^.current_inputfile^.line_no;
+             tokenpos.column:=get_current_col;
+             tokenpos.fileindex:=current_module^.current_index;
              s_point:=false;
              s_point:=false;
              if c='.' then
              if c='.' then
                begin
                begin
@@ -674,80 +699,87 @@ unit scanner;
              goto exit_label;
              goto exit_label;
           end;
           end;
 
 
+      { Skip all spaces and comments }
         repeat
         repeat
           case c of
           case c of
            '{' : skipcomment;
            '{' : skipcomment;
-           ' ',#9..#13 : skipspace;
+   ' ',#9..#13 : skipspace;
           else
           else
            break;
            break;
           end;
           end;
         until false;
         until false;
 
 
+      { Save current token position }
         lasttokenpos:=longint(inputpointer);
         lasttokenpos:=longint(inputpointer);
         tokenpos.line:=current_module^.current_inputfile^.line_no;
         tokenpos.line:=current_module^.current_inputfile^.line_no;
         tokenpos.column:=get_current_col;
         tokenpos.column:=get_current_col;
         tokenpos.fileindex:=current_module^.current_index;
         tokenpos.fileindex:=current_module^.current_index;
-        { will become line:=lasttokenpos ??;}
-        case c of
-           '_','A'..'Z',
-           'a'..'z' : begin
-                        orgpattern:=readstring;
-                        pattern:=upper(orgpattern);
-                        if (length(pattern) in [2..id_len]) and is_keyword(y) then
-                         yylex:=y
-                        else
-                         begin
-                         { this takes some time ... }
-                           if support_macros then
-                            begin
-                              mac:=pmacrosym(macros^.search(pattern));
-                              if assigned(mac) and (assigned(mac^.buftext)) then
-                               begin
-                               { don't forget the last char }
-                                 dec(longint(inputpointer));
-                                 current_module^.current_inputfile^.bufpos:=inputpointer-inputbuffer;
-                               { this isn't a proper way, but ... }
-                                 hp:=new(pinputfile,init('','Macro '+pattern,''));
-                                 hp^.next:=current_module^.current_inputfile;
-                                 current_module^.current_inputfile:=hp;
-                                 status.currentsource:=current_module^.current_inputfile^.name^;
-                                 { I don't think that we should do that
-                                   because otherwise the file will be searched !! (PM)
-                                   but there is the problem of index !! }
-                                 current_module^.sourcefiles.register_file(hp);
-                                 current_module^.current_index:=hp^.ref_index;
-                               { set an own buffer }
-                                 getmem(hp2,mac^.buflen+1);
-                                 current_module^.current_inputfile^.setbuf(hp2,mac^.buflen+1);
-                                 inputbuffer:=current_module^.current_inputfile^.buf;
-                               { copy text }
-                                 move(mac^.buftext^,inputbuffer^,mac^.buflen);
-                               { put end sign }
-                                 inputbuffer[mac^.buflen+1]:=#0;
-                               { load c }
-                                 c:=inputbuffer^;
-                                 inputpointer:=inputbuffer+1;
-                               { handle empty macros }
-                                 if c=#0 then
-                                  reload;
-                               { play it again ... }
-                                 inc(yylexcount);
-                                 if yylexcount>16 then
-                                  Message(scan_w_macro_deep_ten);
+        
+
+      { Check first for a identifier/keyword, this is 20+% faster (PFV) }       
+
+        if c in ['_','A'..'Z','a'..'z'] then
+         begin
+           orgpattern:=readstring;
+           pattern:=upper(orgpattern);
+           if (length(pattern) in [2..id_len]) and is_keyword(y) then
+            yylex:=y
+           else
+            begin
+            { this takes some time ... }
+              if support_macros then
+               begin
+                 mac:=pmacrosym(macros^.search(pattern));
+                 if assigned(mac) and (assigned(mac^.buftext)) then
+                  begin
+                  { don't forget the last char }
+                    dec(longint(inputpointer));
+                    current_module^.current_inputfile^.bufpos:=inputpointer-inputbuffer;
+                  { this isn't a proper way, but ... }
+                    hp:=new(pinputfile,init('','Macro '+pattern,''));
+                    hp^.next:=current_module^.current_inputfile;
+                    current_module^.current_inputfile:=hp;
+                    status.currentsource:=current_module^.current_inputfile^.name^;
+                    { I don't think that we should do that
+                      because otherwise the file will be searched !! (PM)
+                      but there is the problem of index !! }
+                    current_module^.sourcefiles.register_file(hp);
+                    current_module^.current_index:=hp^.ref_index;
+                  { set an own buffer }
+                    getmem(hp2,mac^.buflen+1);
+                    current_module^.current_inputfile^.setbuf(hp2,mac^.buflen+1);
+                    inputbuffer:=current_module^.current_inputfile^.buf;
+                  { copy text }
+                    move(mac^.buftext^,inputbuffer^,mac^.buflen);
+                  { put end sign }
+                    inputbuffer[mac^.buflen+1]:=#0;
+                  { load c }
+                    c:=inputbuffer^;
+                    inputpointer:=inputbuffer+1;
+                  { handle empty macros }
+                    if c=#0 then
+                     reload;
+                  { play it again ... }
+                    inc(yylexcount);
+                    if yylexcount>16 then
+                     Message(scan_w_macro_deep_ten);
 {$ifdef TP}
 {$ifdef TP}
-                                 yylex:=yylex;
+                    yylex:=yylex;
 {$else}
 {$else}
-                                 yylex:=yylex();
+                    yylex:=yylex();
 {$endif}
 {$endif}
-                               { that's all folks }
-                                 dec(yylexcount);
-                                 exit;
-                               end;
-                            end;
-                           yylex:=ID;
-                         end;
-                        goto exit_label;
-                      end;
+                  { that's all folks }
+                    dec(yylexcount);
+                    exit;
+                  end;
+               end;
+              yylex:=ID;
+            end;
+           goto exit_label;
+         end
+        else    
+         begin
+           case c of
                 '$' : begin
                 '$' : begin
                          pattern:=readnumber;
                          pattern:=readnumber;
                          yylex:=INTCONST;
                          yylex:=INTCONST;
@@ -944,9 +976,8 @@ unit scanner;
                         if c='^' then
                         if c='^' then
                          begin
                          begin
                            readchar;
                            readchar;
-                              c:=upcase(c);
-                              if not(block_type=bt_type) and (c in ['A'..'Z']) then
-{                           if not(block_type=bt_type) and (c in [#64..#128]) then}
+                           c:=upcase(c);
+                           if not(block_type=bt_type) and (c in ['A'..'Z']) then
                             begin
                             begin
                               pattern:=chr(ord(c)-64);
                               pattern:=chr(ord(c)-64);
                               readchar;
                               readchar;
@@ -1056,7 +1087,9 @@ unit scanner;
               Message(scan_f_illegal_char);
               Message(scan_f_illegal_char);
             end;
             end;
            end;
            end;
-       exit_label:
+        end;
+
+exit_label:
      end;
      end;
 
 
 
 
@@ -1069,9 +1102,14 @@ unit scanner;
           end
           end
          else
          else
           readchar;
           readchar;
-        tokenpos.line:=current_module^.current_inputfile^.line_no;
-        tokenpos.column:=get_current_col;
-        tokenpos.fileindex:=current_module^.current_index;
+         with tokenpos do
+          begin
+
+            line:=current_module^.current_inputfile^.line_no;
+            column:=get_current_col;
+            fileindex:=current_module^.current_index;
+          end;
+
          case c of
          case c of
           '{' : begin
           '{' : begin
                   skipcomment;
                   skipcomment;
@@ -1137,11 +1175,15 @@ unit scanner;
    procedure get_cur_file_pos(var fileinfo : tfileposinfo);
    procedure get_cur_file_pos(var fileinfo : tfileposinfo);
 
 
      begin
      begin
-        fileinfo.line:=current_module^.current_inputfile^.line_no;
+        with fileinfo do
+         begin
+           line:=current_module^.current_inputfile^.line_no;
         {fileinfo.fileindex:=current_module^.current_inputfile^.ref_index;}
         {fileinfo.fileindex:=current_module^.current_inputfile^.ref_index;}
         { should allways be the same !! }
         { should allways be the same !! }
-        fileinfo.fileindex:=current_module^.current_index;
-        fileinfo.column:=get_current_col;
+           fileindex:=current_module^.current_index;
+           column:=get_current_col;
+         end;
+
      end;
      end;
 
 
    procedure set_cur_file_pos(const fileinfo : tfileposinfo);
    procedure set_cur_file_pos(const fileinfo : tfileposinfo);
@@ -1214,7 +1256,12 @@ unit scanner;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.20  1998-05-23 01:21:30  peter
+  Revision 1.21  1998-05-27 00:20:32  peter
+    * some scanner optimizes
+    * automaticly aout2exe for go32v1
+    * fixed dynamiclinker option which was added at the wrong place
+
+  Revision 1.20  1998/05/23 01:21:30  peter
     + aktasmmode, aktoptprocessor, aktoutputformat
     + aktasmmode, aktoptprocessor, aktoutputformat
     + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
     + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
     + $LIBNAME to set the library name where the unit will be put in
     + $LIBNAME to set the library name where the unit will be put in

+ 30 - 3
compiler/systems.pas

@@ -78,6 +78,8 @@ unit systems;
        tlinkinfo = record
        tlinkinfo = record
           linkbin       : string[8];
           linkbin       : string[8];
           linkcmd       : string[50];
           linkcmd       : string[50];
+          bindbin       : string[8];
+          bindcmd       : string[50];
           stripopt      : string[2];
           stripopt      : string[2];
           libpathprefix : string[12];
           libpathprefix : string[12];
           libpathsuffix : string[2];
           libpathsuffix : string[2];
@@ -97,7 +99,8 @@ unit systems;
           unitext,
           unitext,
           unitlibext,
           unitlibext,
           asmext,
           asmext,
-          objext      : string[4];
+          objext,
+          exeext      : string[4];
           os          : tos;
           os          : tos;
           link        : tlink;
           link        : tlink;
           assem       : tasm;
           assem       : tasm;
@@ -129,7 +132,7 @@ implementation
             staticlibext : '.A';
             staticlibext : '.A';
             sourceext    : '.PP';
             sourceext    : '.PP';
             pasext       : '.PAS';
             pasext       : '.PAS';
-            exeext       : '.EXE';
+            exeext       : '';      { No .exe, the linker only output a.out ! }
             scriptext    : '.BAT';
             scriptext    : '.BAT';
             Cprefix      : '_';
             Cprefix      : '_';
             newline      : #13#10;
             newline      : #13#10;
@@ -327,6 +330,8 @@ implementation
           (
           (
             linkbin : 'ld';
             linkbin : 'ld';
             linkcmd : '$OPT -o $EXE $RES';
             linkcmd : '$OPT -o $EXE $RES';
+            bindbin : '';
+            bindcmd : '';
             stripopt   : '-s';
             stripopt   : '-s';
             libpathprefix : 'SEARCH_DIR(';
             libpathprefix : 'SEARCH_DIR(';
             libpathsuffix : ')';
             libpathsuffix : ')';
@@ -340,6 +345,8 @@ implementation
           ,(
           ,(
             linkbin : 'ld';
             linkbin : 'ld';
             linkcmd : '-oformat coff-go32 $OPT -o $EXE @$RES';
             linkcmd : '-oformat coff-go32 $OPT -o $EXE @$RES';
+            bindbin : 'aout2exe';
+            bindcmd : '$EXE';
             stripopt   : '-s';
             stripopt   : '-s';
             libpathprefix : '-L';
             libpathprefix : '-L';
             libpathsuffix : '';
             libpathsuffix : '';
@@ -352,6 +359,8 @@ implementation
           ,(
           ,(
             linkbin : 'ld';
             linkbin : 'ld';
             linkcmd : '-oformat coff-go32-exe $OPT -o $EXE @$RES';
             linkcmd : '-oformat coff-go32-exe $OPT -o $EXE @$RES';
+            bindbin : '';
+            bindcmd : '';
             stripopt   : '-s';
             stripopt   : '-s';
             libpathprefix : '-L';
             libpathprefix : '-L';
             libpathsuffix : '';
             libpathsuffix : '';
@@ -364,6 +373,8 @@ implementation
           ,(
           ,(
             linkbin : 'ldw';
             linkbin : 'ldw';
             linkcmd : '$OPT -o $EXE $RES';
             linkcmd : '$OPT -o $EXE $RES';
+            bindbin : '';
+            bindcmd : '';
             stripopt   : '-s';
             stripopt   : '-s';
             libpathprefix : 'SEARCH_DIR(';
             libpathprefix : 'SEARCH_DIR(';
             libpathsuffix : ')';
             libpathsuffix : ')';
@@ -376,6 +387,8 @@ implementation
           ,(
           ,(
             linkbin : 'ld';
             linkbin : 'ld';
             linkcmd : '-o $EXE @$RES';
             linkcmd : '-o $EXE @$RES';
+            bindbin : 'emxbind';
+            bindcmd : '-o $EXE.exe $EXE -k$STACKKB -aim -s$HEAPKB';
             stripopt   : '-s';
             stripopt   : '-s';
             libpathprefix : '-L';
             libpathprefix : '-L';
             libpathsuffix : '';
             libpathsuffix : '';
@@ -402,6 +415,7 @@ implementation
             unitlibext  : '.PPL';
             unitlibext  : '.PPL';
             asmext      : '.S1';
             asmext      : '.S1';
             objext      : '.O1';
             objext      : '.O1';
+            exeext      : ''; { The linker procedures a.out }
             os          : os_GO32V1;
             os          : os_GO32V1;
             link        : link_ldgo32v1;
             link        : link_ldgo32v1;
             assem       : as_o
             assem       : as_o
@@ -417,12 +431,14 @@ implementation
             unitlibext  : '.PPL';
             unitlibext  : '.PPL';
             asmext      : '.S';
             asmext      : '.S';
             objext      : '.O';
             objext      : '.O';
+            exeext      : '.EXE';
 {$else UseAnsiString}
 {$else UseAnsiString}
             smartext    : '.SL';
             smartext    : '.SL';
             unitext     : '.PAU';
             unitext     : '.PAU';
             unitlibext  : '.PPL';
             unitlibext  : '.PPL';
             asmext      : '.SA';
             asmext      : '.SA';
             objext      : '.OA';
             objext      : '.OA';
+            exeext      : '.EXE';
 {$endif UseAnsiString}
 {$endif UseAnsiString}
             os          : os_GO32V2;
             os          : os_GO32V2;
             link        : link_ldgo32v2;
             link        : link_ldgo32v2;
@@ -438,6 +454,7 @@ implementation
             unitlibext  : '.ppl';
             unitlibext  : '.ppl';
             asmext      : '.s';
             asmext      : '.s';
             objext      : '.o';
             objext      : '.o';
+            exeext      : '';
             os          : os_Linux;
             os          : os_Linux;
             link        : link_ld;
             link        : link_ld;
             assem       : as_o
             assem       : as_o
@@ -452,6 +469,7 @@ implementation
             unitlibext  : '.ppl';
             unitlibext  : '.ppl';
             asmext      : '.so2';
             asmext      : '.so2';
             objext      : '.oo2';
             objext      : '.oo2';
+            exeext      : ''; { The linker procedures a.out }
             os          : os_OS2;
             os          : os_OS2;
             link        : link_ldos2;
             link        : link_ldos2;
             assem       : as_o
             assem       : as_o
@@ -466,6 +484,7 @@ implementation
             unitlibext  : '.ppl';
             unitlibext  : '.ppl';
             asmext      : '.s';
             asmext      : '.s';
             objext      : '.o';
             objext      : '.o';
+            exeext      : '.exe';
             os          : os_Win32;
             os          : os_Win32;
             link        : link_ldw;
             link        : link_ldw;
             assem       : as_o
             assem       : as_o
@@ -480,6 +499,7 @@ implementation
             unitlibext  : '.ppl';
             unitlibext  : '.ppl';
             asmext      : '.asm';
             asmext      : '.asm';
             objext      : '.o';
             objext      : '.o';
+            exeext      : '';
             os          : os_Amiga;
             os          : os_Amiga;
             link        : link_ld;
             link        : link_ld;
             assem       : as_o
             assem       : as_o
@@ -494,6 +514,7 @@ implementation
             unitlibext  : '.ppl';
             unitlibext  : '.ppl';
             asmext      : '.s';
             asmext      : '.s';
             objext      : '.o';
             objext      : '.o';
+            exeext      : '';
             os          : os_Atari;
             os          : os_Atari;
             link        : link_ld;
             link        : link_ld;
             assem       : as_o
             assem       : as_o
@@ -508,6 +529,7 @@ implementation
             unitlibext  : '.ppl';
             unitlibext  : '.ppl';
             asmext      : '.s';
             asmext      : '.s';
             objext      : '.o';
             objext      : '.o';
+            exeext      : '';
             os          : os_Mac68k;
             os          : os_Mac68k;
             link        : link_ld;
             link        : link_ld;
             assem       : as_o
             assem       : as_o
@@ -606,7 +628,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.12  1998-05-23 01:21:32  peter
+  Revision 1.13  1998-05-27 00:20:33  peter
+    * some scanner optimizes
+    * automaticly aout2exe for go32v1
+    * fixed dynamiclinker option which was added at the wrong place
+
+  Revision 1.12  1998/05/23 01:21:32  peter
     + aktasmmode, aktoptprocessor, aktoutputformat
     + aktasmmode, aktoptprocessor, aktoutputformat
     + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
     + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
     + $LIBNAME to set the library name where the unit will be put in
     + $LIBNAME to set the library name where the unit will be put in