Ver Fonte

Merged revisions 7170-7172,7187 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r7170 | peter | 2007-04-25 09:32:13 +0200 (Wed, 25 Apr 2007) | 2 lines

* support long section names in executable

........
r7171 | peter | 2007-04-25 10:02:59 +0200 (Wed, 25 Apr 2007) | 2 lines

* support dwarf2 sections

........
r7172 | peter | 2007-04-25 11:06:36 +0200 (Wed, 25 Apr 2007) | 2 lines

* secrel32 relocation support required by dwarf2 under windows

........
r7187 | peter | 2007-04-29 11:48:59 +0200 (Sun, 29 Apr 2007) | 2 lines

* don't use generic section rule for .stab and .stabstr

........

git-svn-id: branches/fixes_2_2@7198 -

joost há 18 anos atrás
pai
commit
e4f7af99e4

+ 1 - 0
compiler/aasmtai.pas

@@ -98,6 +98,7 @@ interface
           aitconst_uleb128bit,
           { win32 only }
           aitconst_rva_symbol,
+          aitconst_secrel32_symbol,
           { darwin only }
           aitconst_indirect_symbol
         );

+ 5 - 2
compiler/aggas.pas

@@ -207,7 +207,7 @@ implementation
       ait_const2str : array[aitconst_128bit..aitconst_indirect_symbol] of string[20]=(
         #9'.fixme128'#9,#9'.quad'#9,#9'.long'#9,#9'.short'#9,#9'.byte'#9,
         #9'.sleb128'#9,#9'.uleb128'#9,
-        #9'.rva'#9,#9'.indirect_symbol'#9
+        #9'.rva'#9,#9'.secrel32'#9,#9'.indirect_symbol'#9
       );
 
 {****************************************************************************}
@@ -676,6 +676,7 @@ implementation
                  aitconst_16bit,
                  aitconst_8bit,
                  aitconst_rva_symbol,
+                 aitconst_secrel32_symbol,
                  aitconst_indirect_symbol :
                    begin
                      if (target_info.system in [system_powerpc_darwin,system_i386_darwin]) and
@@ -737,7 +738,9 @@ implementation
                        end;
                       AsmLn;
                    end;
-                 end;
+                 else
+                   internalerror(200704251);
+               end;
              end;
 
            { the "and defined(FPC_HAS_TYPE_EXTENDED)" isn't optimal but currently the only solution

+ 5 - 0
compiler/assemble.pas

@@ -1159,6 +1159,11 @@ Implementation
                        else
                          ObjData.writereloc(Tai_const(hp).value,sizeof(aint),Objdata.SymbolRef(tai_const(hp).sym),RELOC_RVA);
                      end;
+                   aitconst_secrel32_symbol :
+                     begin
+                       { Required for DWARF2 support under Windows }
+                       ObjData.writereloc(Tai_const(hp).value,sizeof(longint),Objdata.SymbolRef(tai_const(hp).sym),RELOC_SECREL32);
+                     end;
                    aitconst_uleb128bit,
                    aitconst_sleb128bit :
                      begin

+ 21 - 11
compiler/dbgdwarf.pas

@@ -226,7 +226,8 @@ interface
         _use_64bit_headers: Boolean;
         // set to ait_const32bit if use_64bit_headers is false, otherwise
         // to ait_const64bit
-        offsetsymtype: taiconst_type;
+        offsetreltype,
+        offsetabstype : taiconst_type;
         // set if we generated any lineinfo at all. If not, we have to terminate
         // when insertmoduleinfo is called.
         generated_lineinfo: boolean;
@@ -625,9 +626,18 @@ implementation
       begin
          _use_64bit_headers:=state;
          if not(state) then
-           offsetsymtype:=aitconst_32bit
+           begin
+             if (target_info.system in system_windows+system_wince) then
+               offsetabstype:=aitconst_secrel32_symbol
+             else
+               offsetabstype:=aitconst_32bit;
+             offsetreltype:=aitconst_32bit;
+           end
          else
-           offsetsymtype:=aitconst_64bit
+           begin
+             offsetreltype:=aitconst_64bit;
+             offsetabstype:=aitconst_64bit;
+           end;
       end;
 
 
@@ -944,7 +954,7 @@ implementation
         else
           begin
             current_asmdata.asmlists[al_dwarf_abbrev].concat(tai_const.create_uleb128bit(ord(DW_FORM_ref4)));
-            current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_rel_sym(offsetsymtype,current_asmdata.RefAsmSymbol(target_asm.labelprefix+'debug_info0'),sym));
+            current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_rel_sym(offsetreltype,current_asmdata.RefAsmSymbol(target_asm.labelprefix+'debug_info0'),sym));
           end;
       end;
 
@@ -971,7 +981,7 @@ implementation
           { use append_labelentry_dataptr_rel instead }
           internalerror(2007020210);
         append_labelentry_dataptr_common(attr);
-        current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_type_sym(offsetsymtype,sym))
+        current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_type_sym(offsetabstype,sym))
       end;
 
 
@@ -984,7 +994,7 @@ implementation
           targets
         }
         append_labelentry_dataptr_common(attr);
-        current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_rel_sym(offsetsymtype,sym,endsym));
+        current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_rel_sym(offsetreltype,sym,endsym));
       end;
 
 
@@ -2150,7 +2160,7 @@ implementation
         current_asmdata.getlabel(lbl,alt_dbgfile);
         if use_64bit_headers then
           linelist.concat(tai_const.create_32bit(longint($FFFFFFFF)));
-        linelist.concat(tai_const.create_rel_sym(offsetsymtype,
+        linelist.concat(tai_const.create_rel_sym(offsetreltype,
           lbl,current_asmdata.RefAsmSymbol(target_asm.labelprefix+'edebug_line0')));
         linelist.concat(tai_label.create(lbl));
 
@@ -2159,7 +2169,7 @@ implementation
 
         { header length }
         current_asmdata.getlabel(lbl,alt_dbgfile);
-        linelist.concat(tai_const.create_rel_sym(offsetsymtype,
+        linelist.concat(tai_const.create_rel_sym(offsetreltype,
           lbl,current_asmdata.RefAsmSymbol(target_asm.labelprefix+'ehdebug_line0')));
         linelist.concat(tai_label.create(lbl));
 
@@ -2326,7 +2336,7 @@ implementation
         { size }
         if use_64bit_headers then
           current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_32bit(longint($FFFFFFFF)));
-        current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_rel_sym(offsetsymtype,
+        current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_rel_sym(offsetreltype,
           lenstartlabel,current_asmdata.RefAsmSymbol(target_asm.labelprefix+'edebug_info0')));
 
         current_asmdata.asmlists[al_dwarf_info].concat(tai_label.create(lenstartlabel));
@@ -2334,10 +2344,10 @@ implementation
         current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_16bit(dwarf_version));
         { abbrev table (=relative from section start)}
         if not(tf_dwarf_relative_addresses in target_info.flags) then
-          current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_type_sym(offsetsymtype,
+          current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_type_sym(offsetabstype,
             current_asmdata.RefAsmSymbol(target_asm.labelprefix+'debug_abbrev0')))
         else
-          current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_rel_sym(offsetsymtype,
+          current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_rel_sym(offsetreltype,
             current_asmdata.RefAsmSymbol(target_asm.labelprefix+'debug_abbrevsection0'),
             current_asmdata.RefAsmSymbol(target_asm.labelprefix+'debug_abbrev0')));
 

+ 4 - 1
compiler/i386/ag386nsm.pas

@@ -394,7 +394,7 @@ interface
       ait_const2str : array[aitconst_128bit..aitconst_indirect_symbol] of string[20]=(
         #9'FIXME_128BIT'#9,#9'FIXME_64BIT'#9,#9'DD'#9,#9'DW'#9,#9'DB'#9,
         #9'FIXME_SLEB128BIT'#9,#9'FIXME_ULEB128BIT'#9,
-        #9'RVA'#9,#9'FIXMEINDIRECT'#9
+        #9'RVA'#9,#9'SECREL32'#9,#9'FIXMEINDIRECT'#9
       );
 
     procedure T386NasmAssembler.WriteSection(atype:TAsmSectiontype;const aname:string);
@@ -593,6 +593,7 @@ interface
                  aitconst_16bit,
                  aitconst_8bit,
                  aitconst_rva_symbol,
+                 aitconst_secrel32_symbol,
                  aitconst_indirect_symbol :
                    begin
                      AsmWrite(ait_const2str[tai_const(hp).consttype]);
@@ -621,6 +622,8 @@ interface
                      until false;
                      AsmLn;
                    end;
+                 else
+                   internalerror(200704252);
                end;
              end;
 

+ 2 - 0
compiler/ogbase.pas

@@ -66,6 +66,8 @@ interface
          RELOC_RELATIVE,
          { PECoff (Windows) RVA relocation }
          RELOC_RVA,
+         { PECoff (Windows) section relocation, required by DWARF2 debug info }
+         RELOC_SECREL32,
          { Generate a 0 value at the place of the relocation,
            this is used to remove unused vtable entries }
          RELOC_ZERO,

+ 40 - 11
compiler/ogcoff.pas

@@ -425,9 +425,13 @@ implementation
        IMAGE_REL_ARM_SECTION       = $000E;     { Section table index }
        IMAGE_REL_ARM_SECREL        = $000F;     { Offset within section }
 {$endif arm}
-       R_DIR32 = 6;
-       R_IMAGEBASE = 7;
-       R_PCRLONG = 20;
+
+{$ifdef i386}
+       IMAGE_REL_I386_DIR32 = 6;
+       IMAGE_REL_I386_IMAGEBASE = 7;
+       IMAGE_REL_I386_SECREL32 = 11;
+       IMAGE_REL_I386_PCRLONG = 20;
+{$endif i386}
 
        { .reloc section fixup types }
        IMAGE_REL_BASED_HIGHLOW     = 3;  { Applies the delta to the 32-bit field at Offset. }
@@ -818,6 +822,13 @@ const pemagic : array[0..3] of byte = (
 {$endif arm}
                     inc(address,relocval);
                 end;
+              RELOC_SECREL32 :
+                begin
+                  { fixup address when the symbol was known in defined object }
+                  if (relocsec.objdata=objdata) then
+                    dec(address,TCoffObjSection(relocsec).mempos);
+                  inc(address,relocval);
+                end;
 {$ifdef arm}
               RELOC_RELATIVE_24:
                 begin
@@ -1174,14 +1185,18 @@ const pemagic : array[0..3] of byte = (
 
               RELOC_RVA :
                 rel.reloctype:=IMAGE_REL_ARM_ADDR32NB;
+              RELOC_SECREL32 :
+                rel.reloctype:=IMAGE_REL_ARM_SECREL;
 {$endif arm}
 {$ifdef i386}
               RELOC_RELATIVE :
-                rel.reloctype:=R_PCRLONG;
+                rel.reloctype:=IMAGE_REL_I386_PCRLONG;
               RELOC_ABSOLUTE :
-                rel.reloctype:=R_DIR32;
+                rel.reloctype:=IMAGE_REL_I386_DIR32;
               RELOC_RVA :
-                rel.reloctype:=R_IMAGEBASE;
+                rel.reloctype:=IMAGE_REL_I386_IMAGEBASE;
+              RELOC_SECREL32 :
+                rel.reloctype:=IMAGE_REL_I386_SECREL32;
 {$endif i386}
 {$ifdef x86_64}
               RELOC_RELATIVE :
@@ -1202,6 +1217,8 @@ const pemagic : array[0..3] of byte = (
                 rel.reloctype:=IMAGE_REL_AMD64_REL32_4;
               RELOC_RELATIVE_5 :
                 rel.reloctype:=IMAGE_REL_AMD64_REL32_5;
+              RELOC_SECREL32 :
+                rel.reloctype:=IMAGE_REL_AMD64_SECREL;
 {$endif x86_64}
               else
                 internalerror(200603312);
@@ -1497,12 +1514,14 @@ const pemagic : array[0..3] of byte = (
                rel_type:=RELOC_RELATIVE_24;
 {$endif arm}
 {$ifdef i386}
-             R_PCRLONG :
+             IMAGE_REL_I386_PCRLONG :
                rel_type:=RELOC_RELATIVE;
-             R_DIR32 :
+             IMAGE_REL_I386_DIR32 :
                rel_type:=RELOC_ABSOLUTE;
-             R_IMAGEBASE :
+             IMAGE_REL_I386_IMAGEBASE :
                rel_type:=RELOC_RVA;
+             IMAGE_REL_I386_SECREL32 :
+               rel_type:=RELOC_SECREL32;
 {$endif i386}
 {$ifdef x86_64}
              IMAGE_REL_AMD64_REL32:
@@ -1939,12 +1958,22 @@ const pemagic : array[0..3] of byte = (
 
     procedure TCoffexeoutput.ExeSectionList_write_header(p:TObject;arg:pointer);
       var
-        sechdr    : tcoffsechdr;
+        sechdr   : tcoffsechdr;
+        s        : string;
+        strpos   : Aint;
       begin
         with tExeSection(p) do
           begin
             fillchar(sechdr,sizeof(sechdr),0);
-            move(name[1],sechdr.name,length(name));
+            s:=name;
+            if length(s)>8 then
+             begin
+               strpos:=FCoffStrs.size+4;
+               FCoffStrs.writestr(s);
+               FCoffStrs.writestr(#0);
+               s:='/'+ToStr(strpos);
+             end;
+            move(s[1],sechdr.name,length(s));
             sechdr.rvaofs:=mempos;
             if win32 then
               sechdr.vsize:=Size

+ 14 - 9
compiler/systems/t_win.pas

@@ -906,6 +906,8 @@ implementation
       var
         s,s2,
         ibase : TCmdStr;
+        secname,
+        secnames : string;
       begin
         with LinkScript do
           begin
@@ -1007,15 +1009,18 @@ implementation
             Concat('  OBJSECTION .idata$6*');
             Concat('  OBJSECTION .idata$7*');
             Concat('ENDEXESECTION');
-            Concat('EXESECTION .edata');
-            Concat('  OBJSECTION .edata*');
-            Concat('ENDEXESECTION');
-            Concat('EXESECTION .rsrc');
-            Concat('  OBJSECTION .rsrc*');
-            Concat('ENDEXESECTION');
-            Concat('EXESECTION .reloc');
-            Concat('  OBJSECTION .reloc');
-            Concat('ENDEXESECTION');
+            secnames:='.edata,.rsrc,.reloc,'+
+                      '.debug_aranges,.debug_pubnames,.debug_info,.debug_abbrev,.debug_line,.debug_frame,.debug_str,.debug_loc,'+
+                      '.debug_macinfo,.debug_weaknames,.debug_funcnames,.debug_typenames,.debug_varnames,.debug_ranges';
+            repeat
+              secname:=gettoken(secnames,',');
+              if secname='' then
+                break;
+              Concat('EXESECTION '+secname);
+              Concat('  OBJSECTION '+secname+'*');
+              Concat('ENDEXESECTION');
+            until false;
+            { Can't use the generic rules, because that will add also .stabstr to .stab }
             Concat('EXESECTION .stab');
             Concat('  OBJSECTION .stab');
             Concat('ENDEXESECTION');

+ 4 - 1
compiler/x86/agx86int.pas

@@ -351,7 +351,7 @@ implementation
       ait_const2str : array[aitconst_128bit..aitconst_indirect_symbol] of string[20]=(
         #9''#9,#9'DQ'#9,#9'DD'#9,#9'DW'#9,#9'DB'#9,
         #9'FIXMESLEB',#9'FIXEMEULEB',
-        #9'DD RVA'#9,#9'FIXMEINDIRECT'#9
+        #9'DD RVA'#9,#9'DD SECREL32'#9,#9'FIXMEINDIRECT'#9
       );
 
     Function PadTabs(const p:string;addch:char):string;
@@ -527,6 +527,7 @@ implementation
                  aitconst_16bit,
                  aitconst_8bit,
                  aitconst_rva_symbol,
+                 aitconst_secrel32_symbol,
                  aitconst_indirect_symbol :
                    begin
                      AsmWrite(ait_const2str[consttype]);
@@ -554,6 +555,8 @@ implementation
                      until false;
                      AsmLn;
                    end;
+                 else
+                   internalerror(200704253);
                end;
              end;
 

+ 115 - 115
utils/fpcm/fpcmake.inc

@@ -1307,7 +1307,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   'ifndef CROSSBOOTSTRAP'#010+
   'ifneq ($(BINUTILSPREFIX),)'#010+
-  'override FPCOPT+=-XP$(BINU','TILSPREFIX) -Xc'#010+
+  'override FPCOPT+=-XP$(BINU','TILSPREFIX) '#010+
   'endif'#010+
   'ifneq ($(BINUTILSPREFIX),)'#010+
   'override FPCOPT+=-Xr$(RLINKPATH)'#010+
@@ -1319,7 +1319,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'override FPCOPT+=$(addprefix -Fu,$(UNITDIR))'#010+
   'endif'#010+
   'ifdef LIBDIR'#010+
-  'override F','PCOPT+=$(addprefix -Fl,$(LIBDIR))'#010+
+  'override FPCO','PT+=$(addprefix -Fl,$(LIBDIR))'#010+
   'endif'#010+
   'ifdef OBJDIR'#010+
   'override FPCOPT+=$(addprefix -Fo,$(OBJDIR))'#010+
@@ -1333,7 +1333,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'override FPCOPT+=-XX'#010+
   'endif'#010+
   #010+
-  '# Smartlinking',' creation'#010+
+  '# Smartlinking cr','eation'#010+
   'ifdef CREATESMART'#010+
   'override FPCOPT+=-CX'#010+
   'endif'#010+
@@ -1348,7 +1348,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '# (strip, optimize and don'#039't load fpc.cfg)'#010+
   '# fpc 2.1 has -O2 for all targets'#010+
   'ifdef RELEASE'#010+
-  'ifne','q ($(findstring 2.0.,$(FPC_VERSION)),)'#010+
+  'ifneq (','$(findstring 2.0.,$(FPC_VERSION)),)'#010+
   'ifeq ($(CPU_TARGET),i386)'#010+
   'FPCCPUOPT:=-OG2p3'#010+
   'endif'#010+
@@ -1360,9 +1360,9 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   'override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n'#010+
   'override FPCOPTDEF+=RELEASE'#010+
-  'endif',#010+
+  'endif'#010+
   #010+
-  '# Strip'#010+
+  '#',' Strip'#010+
   'ifdef STRIP'#010+
   'override FPCOPT+=-Xs'#010+
   'endif'#010+
@@ -1379,7 +1379,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   '# Needed compiler options'#010+
   'ifdef COMPILER_OPTIONS'#010+
-  'ove','rride FPCOPT+=$(COMPILER_OPTIONS)'#010+
+  'overri','de FPCOPT+=$(COMPILER_OPTIONS)'#010+
   'endif'#010+
   'ifdef COMPILER_UNITDIR'#010+
   'override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))'#010+
@@ -1388,7 +1388,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))'#010+
   'endif'#010+
   'ifdef COMPILER_OBJECTDIR'#010+
-  'ove','rride FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))'#010+
+  'overri','de FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))'#010+
   'endif'#010+
   'ifdef COMPILER_INCLUDEDIR'#010+
   'override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))'#010+
@@ -1399,7 +1399,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'override FPCOPT+=-FD$(CROSSBINDIR)'#010+
   'endif'#010+
   #010+
-  '# Target',' dirs and the prefix to use for clean/install'#010+
+  '# Target di','rs and the prefix to use for clean/install'#010+
   'ifdef COMPILER_TARGETDIR'#010+
   'override FPCOPT+=-FE$(COMPILER_TARGETDIR)'#010+
   'ifeq ($(COMPILER_TARGETDIR),.)'#010+
@@ -1409,13 +1409,13 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   'endif'#010+
   #010+
-  '# Un','it target dir (default is units/<cpu>-<os>/'#010+
+  '# Unit ','target dir (default is units/<cpu>-<os>/'#010+
   'ifdef COMPILER_UNITTARGETDIR'#010+
   'override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)'#010+
   'ifeq ($(COMPILER_UNITTARGETDIR),.)'#010+
   'override UNITTARGETDIRPREFIX='#010+
   'else'#010+
-  'override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETD','IR)/'#010+
+  'override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)','/'#010+
   'endif'#010+
   'else'#010+
   'ifdef COMPILER_TARGETDIR'#010+
@@ -1428,7 +1428,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'override FPCOPT+=-Cg'#010+
   #010+
   'ifeq ($(CPU_TARGET),i386)'#010+
-  'override FPCOPT+=','-Aas'#010+
+  'override FPCOPT+=-Aa','s'#010+
   'endif'#010+
   #010+
   'endif'#010+
@@ -1443,7 +1443,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   #010+
   'ifdef LINKSHARED'#010+
-  '#!!! deactived for testing ove','rride FPCOPT+=-XD'#010+
+  '#!!! deactived for testing overri','de FPCOPT+=-XD'#010+
   'endif'#010+
   #010+
   #010+
@@ -1458,7 +1458,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   #010+
   '[command_end]'#010+
-  '# Add commandline options l','ast so they can override'#010+
+  '# Add commandline options last',' so they can override'#010+
   'ifdef OPT'#010+
   'override FPCOPT+=$(OPT)'#010+
   'endif'#010+
@@ -1470,7 +1470,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   '# Was a config file specified ?'#010+
   'ifdef CFGFILE'#010+
-  'override FPCOPT+=@$(','CFGFILE)'#010+
+  'override FPCOPT+=@$(CFG','FILE)'#010+
   'endif'#010+
   #010+
   '# Use the environment to pass commandline options?'#010+
@@ -1481,7 +1481,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   #010+
   'override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)'#010+
-  'override AFULL_SOURCE=$(CPU_S','OURCE)-$(OS_SOURCE)'#010+
+  'override AFULL_SOURCE=$(CPU_SOUR','CE)-$(OS_SOURCE)'#010+
   #010+
   'ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))'#010+
   'override ACROSSCOMPILE=1'#010+
@@ -1494,7 +1494,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '# Compiler commandline'#010+
   'override COMPILER:=$(FPC) $(FPCOPT)'#010+
   #010+
-  '# also call ppas if with comman','d option -s'#010+
+  '# also call ppas if with command o','ption -s'#010+
   '# but only if the FULL_SOURCE and FULL_TARGET are equal'#010+
   'ifeq (,$(findstring -s ,$(COMPILER)))'#010+
   'EXECPPAS='#010+
@@ -1506,7 +1506,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   #010+
   '[loaderrules]'#010+
-  '###################################','#################################'+
+  '######################################','##############################'+
   '#'#010+
   '# Loaders'#010+
   '#####################################################################'#010+
@@ -1516,7 +1516,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'ifneq ($(TARGET_LOADERS),)'#010+
   'override ALLTARGET+=fpc_loaders'#010+
   'override CLEANTARGET+=fpc_loaders_clean'#010+
-  'over','ride INSTALLTARGET+=fpc_loaders_install'#010+
+  'overrid','e INSTALLTARGET+=fpc_loaders_install'#010+
   #010+
   'override LOADEROFILES:=$(addsuffix $(OEXT),$(TARGET_LOADERS))'#010+
   'endif'#010+
@@ -1525,7 +1525,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'ifdef COMPILER_UNITTARGETDIR'#010+
   '        $(AS) -o $(COMPILER_UNITTARGETDIR)/$*$(OEXT) $<'#010+
   'else'#010+
-  '        $(AS) -o',' $*$(OEXT) $<'#010+
+  '        $(AS) -o $*','$(OEXT) $<'#010+
   'endif'#010+
   #010+
   'fpc_loaders: $(COMPILER_UNITTARGETDIR) $(LOADEROFILES)'#010+
@@ -1536,16 +1536,16 @@ const fpcmakeini : array[0..213,1..240] of char=(
   ')'#010+
   'else'#010+
   '        -$(DEL) $(LOADEROFILES)'#010+
-  'endif'#010,
+  'endif'#010+
   #010+
-  'fpc_loaders_install:'#010+
+  'fp','c_loaders_install:'#010+
   '        $(MKDIR) $(INSTALL_UNITDIR)'#010+
   'ifdef COMPILER_UNITTARGETDIR'#010+
   '        $(INSTALL) $(addprefix $(COMPILER_UNITTARGETDIR)/,$(LOADEROFIL'+
   'ES)) $(INSTALL_UNITDIR)'#010+
   'else'#010+
-  '        $(INSTALL) $(LOADEROFILES) $(INSTALL_UNITDIR)'#010,
-  'endif'#010+
+  '        $(INSTALL) $(LOADEROFILES) $(INSTALL_UNITDIR)'#010+
+  'end','if'#010+
   #010+
   #010+
   '[unitrules]'#010+
@@ -1556,13 +1556,13 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '.PHONY: fpc_units'#010+
   #010+
   'ifneq ($(TARGET_UNITS),)'#010+
-  'override ALLTARGET+=fpc_uni','ts'#010+
+  'override ALLTARGET+=fpc_units'#010,
   #010+
   'override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))'#010+
   'override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITU'+
   'NITS))'#010+
   'override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)'#010+
-  'override CLEANPPUFILES+=$(UNITPP','UFILES) $(IMPLICITUNITPPUFILES)'#010+
+  'override CLEANPPUFILES+=$(UNITPPUFI','LES) $(IMPLICITUNITPPUFILES)'#010+
   'endif'#010+
   #010+
   'fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)'#010+
@@ -1571,7 +1571,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '[exerules]'#010+
   '#####################################################################'#010+
   '# Exes'#010+
-  '##########################################################','##########'+
+  '#############################################################','#######'+
   '#'#010+
   #010+
   '.PHONY: fpc_exes'#010+
@@ -1580,21 +1580,21 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'ifndef CROSSINSTALL'#010+
   'ifneq ($(TARGET_PROGRAMS),)'#010+
   'override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))'#010+
-  'override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_P','ROGRAMS)) $(addpre'+
+  'override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROG','RAMS)) $(addpre'+
   'fix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))'+
   ') $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_'+
   'PROGRAMS)))'#010+
   #010+
   'override ALLTARGET+=fpc_exes'#010+
   'override INSTALLEXEFILES+=$(EXEFILES)'#010+
-  'ov','erride CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)'#010+
+  'overr','ide CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)'#010+
   'ifeq ($(OS_TARGET),os2)'#010+
   'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))'#010+
   'endif'#010+
   'ifeq ($(OS_TARGET),emx)'#010+
   'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))'#010+
-  'endif',#010+
   'endif'#010+
+  'en','dif'#010+
   'endif'#010+
   #010+
   'fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)'#010+
@@ -1603,7 +1603,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '[rstrules]'#010+
   '#####################################################################'#010+
   '# Resource strings'#010+
-  '######################################################','##############'+
+  '#########################################################','###########'+
   '#'#010+
   #010+
   'ifdef TARGET_RSTS'#010+
@@ -1616,7 +1616,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '[examplerules]'#010+
   '#####################################################################'#010+
   '# Examples'#010+
-  '########','############################################################'+
+  '###########','#########################################################'+
   '#'#010+
   #010+
   '.PHONY: fpc_examples'#010+
@@ -1624,17 +1624,17 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'ifneq ($(TARGET_EXAMPLES),)'#010+
   'HASEXAMPLES=1'#010+
   'override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMP'+
-  'LES)) $(addsuffix .pas,$(TARGET_EXAMPLES)) ','$(addsuffix .lpr,$(TARGET'+
+  'LES)) $(addsuffix .pas,$(TARGET_EXAMPLES)) $(a','ddsuffix .lpr,$(TARGET'+
   '_EXAMPLES)) $(addsuffix .dpr,$(TARGET_EXAMPLES)))'#010+
   'override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))'#010+
   'override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addp'+
-  'refix $(STATICLIBPREFIX),$(add','suffix $(STATICLIBEXT),$(TARGET_EXAMPL'+
+  'refix $(STATICLIBPREFIX),$(addsuf','fix $(STATICLIBEXT),$(TARGET_EXAMPL'+
   'ES))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TAR'+
   'GET_EXAMPLES)))'#010+
   #010+
   'override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)'#010+
   'ifeq ($(OS_TARGET),os2)'#010+
-  'override CLEANEXEFILES+=$(addsuffi','x $(AOUTEXT),$(TARGET_EXAMPLES))'#010+
+  'override CLEANEXEFILES+=$(addsuffix $','(AOUTEXT),$(TARGET_EXAMPLES))'#010+
   'endif'#010+
   'ifeq ($(OS_TARGET),emx)'#010+
   'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))'#010+
@@ -1644,7 +1644,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'HASEXAMPLES=1'#010+
   'endif'#010+
   #010+
-  'fpc_examples: all $(EXAMPLEFILES) $(addsuffix ','_all,$(TARGET_EXAMPLED'+
+  'fpc_examples: all $(EXAMPLEFILES) $(addsuffix _al','l,$(TARGET_EXAMPLED'+
   'IRS))'#010+
   #010+
   #010+
@@ -1653,7 +1653,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '# General compile rules'#010+
   '#####################################################################'#010+
   #010+
-  '.PHONY: fpc_all fpc_smart fpc_','debug fpc_release fpc_shared'#010+
+  '.PHONY: fpc_all fpc_smart fpc_deb','ug fpc_release fpc_shared'#010+
   #010+
   '$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)'#010+
   '        @$(ECHOREDIR) Compiled > $(FPCMADE)'#010+
@@ -1666,7 +1666,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'fpc_debug:'#010+
   '        $(MAKE) all DEBUG=1'#010+
   #010+
-  'fp','c_release:'#010+
+  'fpc_r','elease:'#010+
   '        $(MAKE) all RELEASE=1'#010+
   #010+
   '# General compile rules, available for both possible .pp and .pas exte'+
@@ -1675,7 +1675,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res'#010+
   #010+
   '$(COMPILER_UNITTARGETDIR):'#010+
-  '        $(MKDIRTREE) $(CO','MPILER_UNITTARGETDIR)'#010+
+  '        $(MKDIRTREE) $(COMPI','LER_UNITTARGETDIR)'#010+
   #010+
   '$(COMPILER_TARGETDIR):'#010+
   '        $(MKDIRTREE) $(COMPILER_TARGETDIR)'#010+
@@ -1689,7 +1689,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '        $(EXECPPAS)'#010+
   #010+
   '%$(EXEEXT): %.pp'#010+
-  '        $(','COMPILER) $<'#010+
+  '        $(COM','PILER) $<'#010+
   '        $(EXECPPAS)'#010+
   #010+
   '%$(EXEEXT): %.pas'#010+
@@ -1705,20 +1705,20 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '        $(EXECPPAS)'#010+
   #010+
   '%.res: %.rc'#010+
-  '        ','windres -i $< -o $@'#010+
+  '        win','dres -i $< -o $@'#010+
   #010+
   '# Search paths for .ppu, .pp, .pas, .lpr, .dpr'#010+
   'vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#010+
   'vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#010+
   'vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#010+
-  'vp','ath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#010+
+  'vpath',' %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#010+
   'vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)'#010+
   'vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)'#010+
   #010+
   '[sharedrules]'#010+
   '#####################################################################'#010+
   '# Library'#010+
-  '######','##############################################################'+
+  '#########','###########################################################'+
   '#'#010+
   #010+
   '.PHONY: fpc_shared'#010+
@@ -1730,7 +1730,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   #010+
   'ifndef SHARED_LIBNAME'#010+
-  'SHARED_LIBNAME=$(PACKAGE','_NAME)'#010+
+  'SHARED_LIBNAME=$(PACKAGE_NA','ME)'#010+
   'endif'#010+
   #010+
   'ifndef SHARED_FULLNAME'#010+
@@ -1740,7 +1740,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   '# Default sharedlib units are all unit objects'#010+
   'ifndef SHARED_LIBUNITS'#010+
-  'SHARED_LIBUNITS:=$(TARGET_UNITS) $(TAR','GET_IMPLICITUNITS)'#010+
+  'SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET','_IMPLICITUNITS)'#010+
   'override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_L'+
   'IBUNITS))'#010+
   'endif'#010+
@@ -1749,7 +1749,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'ifdef HASSHAREDLIB'#010+
   '        $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1'#010+
   'ifneq ($(SHARED_BUILD),n)'#010+
-  '        $(PPUMO','VE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR)'+
+  '        $(PPUMOVE)',' -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR)'+
   ' -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)'#010+
   'endif'#010+
   'else'#010+
@@ -1758,7 +1758,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   'fpc_shared_install:'#010+
   'ifneq ($(SHARED_BUILD),n)'#010+
-  'ifneq ($(SHARED_LIBUNITS)',',)'#010+
+  'ifneq ($(SHARED_LIBUNITS),)'#010,
   'ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)'#010+
   '        $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INST'+
   'ALL_SHAREDDIR)'#010+
@@ -1767,7 +1767,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   #010+
   '[installrules]'#010+
-  '####################################################','################'+
+  '#######################################################','#############'+
   '#'#010+
   '# Install rules'#010+
   '#####################################################################'#010+
@@ -1775,7 +1775,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall'#010+
   #010+
   'ifdef INSTALL_UNITS'#010+
-  'override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL','_UNITS))'#010+
+  'override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UN','ITS))'#010+
   'endif'#010+
   #010+
   'ifdef INSTALL_BUILDUNIT'#010+
@@ -1785,20 +1785,20 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   'ifdef INSTALLPPUFILES'#010+
   'override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFI'+
-  'LES)) $(addp','refix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEX'+
+  'LES)) $(addpref','ix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEX'+
   'T),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEX'+
   'T),$(STATICLIBEXT),$(INSTALLPPUFILES)))'#010+
   'ifneq ($(UNITTARGETDIRPREFIX),)'#010+
-  'override INSTALLPPUFILES:=$(addprefix $(UN','ITTARGETDIRPREFIX),$(notdi'+
+  'override INSTALLPPUFILES:=$(addprefix $(UNITT','ARGETDIRPREFIX),$(notdi'+
   'r $(INSTALLPPUFILES)))'#010+
   'override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPR'+
   'EFIX),$(notdir $(INSTALLPPULINKFILES))))'#010+
   'endif'#010+
   '# Implicitly install Package.fpc'#010+
   'override INSTALL_CREATEPACKAGEFPC=1'#010+
-  'endif',#010+
+  'endif'#010+
   #010+
-  'ifdef INSTALLEXEFILES'#010+
+  'i','fdef INSTALLEXEFILES'#010+
   'ifneq ($(TARGETDIRPREFIX),)'#010+
   'override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(IN'+
   'STALLEXEFILES)))'#010+
@@ -1807,7 +1807,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   'fpc_install: all $(INSTALLTARGET)'#010+
   'ifdef INSTALLEXEFILES'#010+
-  '        $(MKDIR) $(INSTALL_BINDI','R)'#010+
+  '        $(MKDIR) $(INSTALL_BINDIR)'#010,
   '# Compress the exes if upx is defined'#010+
   'ifdef UPXPROG'#010+
   '        -$(UPXPROG) $(INSTALLEXEFILES)'#010+
@@ -1816,13 +1816,13 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   'ifdef INSTALL_CREATEPACKAGEFPC'#010+
   'ifdef FPCMAKE'#010+
-  '# If the fpcpackage variable i','s set then create and install Package.'+
+  '# If the fpcpackage variable is s','et then create and install Package.'+
   'fpc,'#010+
   '# a safety check is done if Makefile.fpc is available'#010+
   'ifdef PACKAGE_VERSION'#010+
   'ifneq ($(wildcard Makefile.fpc),)'#010+
   '        $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc'#010+
-  '        $(MKDIR) $(INST','ALL_UNITDIR)'#010+
+  '        $(MKDIR) $(INSTALL','_UNITDIR)'#010+
   '        $(INSTALL) Package.fpc $(INSTALL_UNITDIR)'#010+
   'endif'#010+
   'endif'#010+
@@ -1832,13 +1832,13 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '        $(MKDIR) $(INSTALL_UNITDIR)'#010+
   '        $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)'#010+
   'ifneq ($(INSTALLPPULINKFILES),)'#010+
-  '      ','  $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)'#010+
+  '        $','(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)'#010+
   'endif'#010+
   'ifneq ($(wildcard $(LIB_FULLNAME)),)'#010+
   '        $(MKDIR) $(INSTALL_LIBDIR)'#010+
   '        $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)'#010+
   'ifdef inUnix'#010+
-  '        ln -sf $(LIB_FULLNAME) $(INSTALL_','LIBDIR)/$(LIB_NAME)'#010+
+  '        ln -sf $(LIB_FULLNAME) $(INSTALL_LIB','DIR)/$(LIB_NAME)'#010+
   'endif'#010+
   'endif'#010+
   'endif'#010+
@@ -1849,14 +1849,14 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   'fpc_sourceinstall: distclean'#010+
   '        $(MKDIR) $(INSTALL_SOURCEDIR)'#010+
-  '        $(COPYTRE','E) $(BASEDIR)/* $(INSTALL_SOURCEDIR)'#010+
+  '        $(COPYTREE) ','$(BASEDIR)/* $(INSTALL_SOURCEDIR)'#010+
   #010+
   'fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))'#010+
   'ifdef HASEXAMPLES'#010+
   '        $(MKDIR) $(INSTALL_EXAMPLEDIR)'#010+
   'endif'#010+
   'ifdef EXAMPLESOURCEFILES'#010+
-  '        $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_','EXAMPLEDIR)'#010+
+  '        $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXA','MPLEDIR)'#010+
   'endif'#010+
   'ifdef TARGET_EXAMPLEDIRS'#010+
   '        $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EX'+
@@ -1866,7 +1866,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '[distinstallrules]'#010+
   '#####################################################################'#010+
   '# Dist Install'#010+
-  '######','##############################################################'+
+  '#########','###########################################################'+
   '#'#010+
   #010+
   '.PHONY: fpc_distinstall'#010+
@@ -1877,13 +1877,13 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '[zipinstallrules]'#010+
   '#####################################################################'#010+
   '# Zip'#010+
-  '##############','######################################################'+
+  '#################','###################################################'+
   '#'#010+
   #010+
   '.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall'#010+
   #010+
   '# Temporary path to pack a file, can only use a single deep'#010+
-  '# subdir, because the deltree can'#039't see the whole tree t','o remove'+
+  '# subdir, because the deltree can'#039't see the whole tree to r','emove'+
   #010+
   'ifndef PACKDIR'#010+
   'ifndef inUnix'#010+
@@ -1898,7 +1898,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'ifdef DIST_ZIPNAME'#010+
   'ZIPNAME=$(DIST_ZIPNAME)'#010+
   'else'#010+
-  'ZIPNAME=$(PACKAGE_NA','ME)'#010+
+  'ZIPNAME=$(PACKAGE_NAME)',#010+
   'endif'#010+
   'endif'#010+
   #010+
@@ -1915,7 +1915,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   'endif'#010+
   #010+
-  '# Use tar by default u','nder linux'#010+
+  '# Use tar by default unde','r linux'#010+
   'ifndef USEZIP'#010+
   'ifdef inUnix'#010+
   'USETAR=1'#010+
@@ -1930,7 +1930,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '# We need to be able to run in the current OS so fix'#010+
   '# the path separator'#010+
   'ifdef USEZIPWRAPPER'#010+
-  'ZIPPAT','HSEP=$(PATHSEP)'#010+
+  'ZIPPATHSE','P=$(PATHSEP)'#010+
   'ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))'#010+
   'else'#010+
   'ZIPPATHSEP=/'#010+
@@ -1938,13 +1938,13 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   '# Create commands to create the zip/tar file'#010+
   'ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))'#010+
-  'ZIPCMD_CDBASE:=cd $(subst /,$(','ZIPPATHSEP),$(BASEDIR))'#010+
+  'ZIPCMD_CDBASE:=cd $(subst /,$(ZIP','PATHSEP),$(BASEDIR))'#010+
   'ifdef USETAR'#010+
   'ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)'#010+
   'ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *'#010+
   'else'#010+
   'ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)'#010+
-  'ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZI','PPROG)) -Dr $(ZIPOPT) $(ZIPD'+
+  'ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPR','OG)) -Dr $(ZIPOPT) $(ZIPD'+
   'ESTFILE) *'#010+
   'endif'#010+
   #010+
@@ -1953,13 +1953,13 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '        $(MKDIR) $(DIST_DESTDIR)'#010+
   '        $(DEL) $(ZIPDESTFILE)'#010+
   'ifdef USEZIPWRAPPER'#010+
-  '# Handle gecho separate as ','we need to espace \ with \\'#010+
+  '# Handle gecho separate as we ','need to espace \ with \\'#010+
   'ifneq ($(ECHOREDIR),echo)'#010+
   '        $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPE'+
   'R)'#010+
   '        $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)'+
   #010+
-  '        $(ECHOREDIR) -e "$(subst \,\\,$(ZI','PCMD_CDBASE))" >> $(ZIPWRA'+
+  '        $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCM','D_CDBASE))" >> $(ZIPWRA'+
   'PPER)'#010+
   'else'#010+
   '        echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)'#010+
@@ -1969,7 +1969,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'ifdef inUnix'#010+
   '        /bin/sh $(ZIPWRAPPER)'#010+
   'else'#010+
-  '        $(ZI','PWRAPPER)'#010+
+  '        $(ZIPWR','APPER)'#010+
   'endif'#010+
   '        $(DEL) $(ZIPWRAPPER)'#010+
   'else'#010+
@@ -1979,7 +1979,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   'fpc_zipsourceinstall:'#010+
   '        $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIP'+
-  'S','OURCESUFFIX)'#010+
+  'SOUR','CESUFFIX)'#010+
   #010+
   'fpc_zipexampleinstall:'#010+
   'ifdef HASEXAMPLES'#010+
@@ -1992,7 +1992,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   #010+
   '[cleanrules]'#010+
-  '####','################################################################'+
+  '#######','#############################################################'+
   '#'#010+
   '# Clean rules'#010+
   '#####################################################################'#010+
@@ -2000,7 +2000,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '.PHONY: fpc_clean fpc_cleanall fpc_distclean'#010+
   #010+
   'ifdef EXEFILES'#010+
-  'override CLEANEXEFILES:=$(ad','dprefix $(TARGETDIRPREFIX),$(CLEANEXEFIL'+
+  'override CLEANEXEFILES:=$(addpr','efix $(TARGETDIRPREFIX),$(CLEANEXEFIL'+
   'ES))'#010+
   'endif'#010+
   #010+
@@ -2010,11 +2010,11 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   'ifdef CLEANPPUFILES'#010+
   'override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)'+
-  ') $(addpref','ix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$'+
+  ') $(addprefix ','$(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$'+
   '(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(S'+
   'TATICLIBEXT),$(CLEANPPUFILES)))'#010+
   'ifdef DEBUGSYMEXT'#010+
-  'override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(','CLEAN'+
+  'override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLE','AN'+
   'PPUFILES))'#010+
   'endif'#010+
   'override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUF'+
@@ -2024,7 +2024,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   #010+
   'fpc_clean: $(CLEANTARGET)'#010+
-  'ifdef CLEAN','EXEFILES'#010+
+  'ifdef CLEANEXE','FILES'#010+
   '        -$(DEL) $(CLEANEXEFILES)'#010+
   'endif'#010+
   'ifdef CLEANPPUFILES'#010+
@@ -2034,7 +2034,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '        -$(DEL) $(CLEANPPULINKFILES)'#010+
   'endif'#010+
   'ifdef CLEANRSTFILES'#010+
-  '        -$(DEL) $(addprefix $(UNITTARGET','DIRPREFIX),$(CLEANRSTFILES))'+
+  '        -$(DEL) $(addprefix $(UNITTARGETDIR','PREFIX),$(CLEANRSTFILES))'+
   #010+
   'endif'#010+
   'ifdef CLEAN_FILES'#010+
@@ -2044,7 +2044,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '        -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)'#010+
   'endif'#010+
   '        -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(F'+
-  'PCEXTFILE) $(RE','DIRFILE)'#010+
+  'PCEXTFILE) $(REDIR','FILE)'#010+
   '        -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)'#010+
   #010+
   'fpc_cleanall: $(CLEANTARGET)'#010+
@@ -2055,7 +2055,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'ifdef CLEANPPUFILES'#010+
   '        -$(DEL) $(CLEANPPUFILES)'#010+
   'endif'#010+
-  'ifneq ($(','CLEANPPULINKFILES),)'#010+
+  'ifneq ($(CLE','ANPPULINKFILES),)'#010+
   '        -$(DEL) $(CLEANPPULINKFILES)'#010+
   'endif'#010+
   'ifdef CLEANRSTFILES'#010+
@@ -2063,7 +2063,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   'endif'#010+
   '        -$(DELTREE) units'#010+
-  '        -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$','(ASMEXT) *$(STATICL'+
+  '        -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(AS','MEXT) *$(STATICL'+
   'IBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)'#010+
   'ifneq ($(PPUEXT),.ppu)'#010+
   '        -$(DEL) *.o *.ppu *.a'#010+
@@ -2071,7 +2071,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '        -$(DELTREE) *$(SMARTEXT)'#010+
   '        -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FP'+
   'CEXTFILE) $(REDIRFILE)'#010+
-  ' ','       -$(DEL) *_ppas$(BATCHEXT)'#010+
+  '    ','    -$(DEL) *_ppas$(BATCHEXT)'#010+
   'ifdef AOUTEXT'#010+
   '        -$(DEL) *$(AOUTEXT)'#010+
   'endif'#010+
@@ -2083,7 +2083,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   #010+
   '[baseinforules]'#010+
-  '############################################################','########'+
+  '###############################################################','#####'+
   '#'#010+
   '# Base info rules'#010+
   '#####################################################################'#010+
@@ -2095,92 +2095,92 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'fpc_baseinfo:'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  == Package info =='#010+
-  '        @$(ECHO) ',' Package Name..... $(PACKAGE_NAME)'#010+
+  '        @$(ECHO)  Pa','ckage Name..... $(PACKAGE_NAME)'#010+
   '        @$(ECHO)  Package Version.. $(PACKAGE_VERSION)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  == Configuration info =='#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  FPC.......... $(FPC)'#010+
-  '        @$(ECHO)  FPC Version.. $(','FPC_VERSION)'#010+
+  '        @$(ECHO)  FPC Version.. $(FPC','_VERSION)'#010+
   '        @$(ECHO)  Source CPU... $(CPU_SOURCE)'#010+
   '        @$(ECHO)  Target CPU... $(CPU_TARGET)'#010+
   '        @$(ECHO)  Source OS.... $(OS_SOURCE)'#010+
   '        @$(ECHO)  Target OS.... $(OS_TARGET)'#010+
-  '        @$(ECHO)  Full Source.. $(FULL_SOURCE',')'#010+
-  '        @$(ECHO)  Full Target.. $(FULL_TARGET)'#010+
+  '        @$(ECHO)  Full Source.. $(FULL_SOURCE)'#010+
+  ' ','       @$(ECHO)  Full Target.. $(FULL_TARGET)'#010+
   '        @$(ECHO)  SourceSuffix. $(SOURCESUFFIX)'#010+
   '        @$(ECHO)  TargetSuffix. $(TARGETSUFFIX)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  == Directory info =='#010+
   '        @$(ECHO)'#010+
-  '        @$(ECHO)  Requ','ired pkgs... $(REQUIRE_PACKAGES)'#010+
+  '        @$(ECHO)  Require','d pkgs... $(REQUIRE_PACKAGES)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  Basedir......... $(BASEDIR)'#010+
   '        @$(ECHO)  FPCDir.......... $(FPCDIR)'#010+
   '        @$(ECHO)  CrossBinDir..... $(CROSSBINDIR)'#010+
   '        @$(ECHO)  UnitsDir........ $(UNITSDIR)'#010+
-  '  ','      @$(ECHO)  PackagesDir..... $(PACKAGESDIR)'#010+
+  '     ','   @$(ECHO)  PackagesDir..... $(PACKAGESDIR)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  GCC library..... $(GCCLIBDIR)'#010+
   '        @$(ECHO)  Other library... $(OTHERLIBDIR)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  == Tools info =='#010+
   '        @$(ECHO)'#010+
-  '        ','@$(ECHO)  As........ $(AS)'#010+
+  '        @$(','ECHO)  As........ $(AS)'#010+
   '        @$(ECHO)  Ld........ $(LD)'#010+
   '        @$(ECHO)  Ar........ $(AR)'#010+
   '        @$(ECHO)  Rc........ $(RC)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  Mv........ $(MVPROG)'#010+
   '        @$(ECHO)  Cp........ $(CPPROG)'#010+
-  '        @$(EC','HO)  Rm........ $(RMPROG)'#010+
+  '        @$(ECHO)','  Rm........ $(RMPROG)'#010+
   '        @$(ECHO)  GInstall.. $(GINSTALL)'#010+
   '        @$(ECHO)  Echo...... $(ECHO)'#010+
   '        @$(ECHO)  Shell..... $(SHELL)'#010+
   '        @$(ECHO)  Date...... $(DATE)'#010+
   '        @$(ECHO)  FPCMake... $(FPCMAKE)'#010+
-  '        @$(ECHO)  PPU','Move... $(PPUMOVE)'#010+
+  '        @$(ECHO)  PPUMov','e... $(PPUMOVE)'#010+
   '        @$(ECHO)  Upx....... $(UPXPROG)'#010+
   '        @$(ECHO)  Zip....... $(ZIPPROG)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  == Object info =='#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  Target Loaders........ $(TARGET_LOADERS)'#010+
-  '        @$(E','CHO)  Target Units.......... $(TARGET_UNITS)'#010+
+  '        @$(ECHO',')  Target Units.......... $(TARGET_UNITS)'#010+
   '        @$(ECHO)  Target Implicit Units. $(TARGET_IMPLICITUNITS)'#010+
   '        @$(ECHO)  Target Programs....... $(TARGET_PROGRAMS)'#010+
   '        @$(ECHO)  Target Dirs........... $(TARGET_DIRS)'#010+
-  '        @$(ECH','O)  Target Examples....... $(TARGET_EXAMPLES)'#010+
+  '        @$(ECHO) ',' Target Examples....... $(TARGET_EXAMPLES)'#010+
   '        @$(ECHO)  Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  Clean Units......... $(CLEAN_UNITS)'#010+
   '        @$(ECHO)  Clean Files......... $(CLEAN_FILES)'#010+
-  '      ','  @$(ECHO)'#010+
+  '        @','$(ECHO)'#010+
   '        @$(ECHO)  Install Units....... $(INSTALL_UNITS)'#010+
   '        @$(ECHO)  Install Files....... $(INSTALL_FILES)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  == Install info =='#010+
   '        @$(ECHO)'#010+
-  '        @$(ECHO)  DateStr.............. $(DATE','STR)'#010+
+  '        @$(ECHO)  DateStr.............. $(DATESTR',')'#010+
   '        @$(ECHO)  ZipName.............. $(ZIPNAME)'#010+
   '        @$(ECHO)  ZipPrefix............ $(ZIPPREFIX)'#010+
   '        @$(ECHO)  ZipCrossPrefix....... $(ZIPCROSSPREFIX)'#010+
   '        @$(ECHO)  ZipSuffix............ $(ZIPSUFFIX)'#010+
-  '        @$(ECHO)  Fu','llZipName.......... $(FULLZIPNAME)'#010+
+  '        @$(ECHO)  FullZ','ipName.......... $(FULLZIPNAME)'#010+
   '        @$(ECHO)  Install FPC Package.. $(INSTALL_FPCPACKAGE)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  Install base dir..... $(INSTALL_BASEDIR)'#010+
   '        @$(ECHO)  Install binary dir... $(INSTALL_BINDIR)'#010+
-  '        @','$(ECHO)  Install library dir.. $(INSTALL_LIBDIR)'#010+
+  '        @$(E','CHO)  Install library dir.. $(INSTALL_LIBDIR)'#010+
   '        @$(ECHO)  Install units dir.... $(INSTALL_UNITDIR)'#010+
   '        @$(ECHO)  Install source dir... $(INSTALL_SOURCEDIR)'#010+
   '        @$(ECHO)  Install doc dir...... $(INSTALL_DOCDIR)'#010+
-  '        @$(EC','HO)  Install example dir.. $(INSTALL_EXAMPLEDIR)'#010+
+  '        @$(ECHO)','  Install example dir.. $(INSTALL_EXAMPLEDIR)'#010+
   '        @$(ECHO)  Install data dir..... $(INSTALL_DATADIR)'#010+
   '        @$(ECHO)'#010+
   '        @$(ECHO)  Dist destination dir. $(DIST_DESTDIR)'#010+
   '        @$(ECHO)  Dist zip name........ $(DIST_ZIPNAME)'#010+
-  '   ','     @$(ECHO)'#010+
+  '      ','  @$(ECHO)'#010+
   #010+
   '[inforules]'#010+
   '#####################################################################'#010+
@@ -2192,14 +2192,14 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'fpc_info: $(INFORULES)'#010+
   #010+
   '[makefilerules]'#010+
-  '#','###################################################################'+
+  '####','################################################################'+
   '#'#010+
   '# Rebuild Makefile'#010+
   '#####################################################################'#010+
   #010+
   '.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2'+
   ' \'#010+
-  '        ','fpc_makefile_dirs'#010+
+  '        fpc','_makefile_dirs'#010+
   #010+
   'fpc_makefile:'#010+
   '        $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc'#010+
@@ -2210,7 +2210,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'T_DIRS))'#010+
   'endif'#010+
   'ifdef TARGET_EXAMPLEDIRS'#010+
-  '        $','(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TAR'+
+  '        $(FP','CMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TAR'+
   'GET_EXAMPLEDIRS))'#010+
   'endif'#010+
   #010+
@@ -2219,7 +2219,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   #010+
   'fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2'#010+
   #010+
-  'fpc_makefiles: ','fpc_makefile fpc_makefile_dirs'#010+
+  'fpc_makefiles: fpc','_makefile fpc_makefile_dirs'#010+
   #010+
   '[localmakefile]'#010+
   '#####################################################################'#010+
@@ -2227,7 +2227,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '#####################################################################'#010+
   #010+
   'ifneq ($(wildcard fpcmake.loc),)'#010+
-  'i','nclude fpcmake.loc'#010+
+  'incl','ude fpcmake.loc'#010+
   'endif'#010+
   #010+
   #010+
@@ -2237,7 +2237,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '#####################################################################'#010+
   #010+
   '[lclrules]'#010+
-  '###################################','#################################'+
+  '######################################','##############################'+
   '#'#010+
   '# LCL Rules'#010+
   '#####################################################################'#010+
@@ -2247,8 +2247,8 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'ifneq ($(findstring $(OS_TARGET),win32 win64),)'#010+
   'LCL_PLATFORM=win32'#010+
   'else'#010+
-  'LCL_PLATFORM=gt','k'#010+
-  'endif'#010+
+  'LCL_PLATFORM=gtk'#010+
+  'e','ndif'#010+
   'endif'#010+
   'export LCL_PLATFORM'#010+
   #010+
@@ -2260,7 +2260,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   'else'#010+
   'override LCLDIR=wrong'#010+
-  'en','dif'#010+
+  'endif',#010+
   #010+
   '# Check if the default LCLDIR is correct'#010+
   'ifdef DEFAULT_LCLDIR'#010+
@@ -2271,7 +2271,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   #010+
   '# Check for development version'#010+
-  'ifeq (','$(LCLDIR),wrong)'#010+
+  'ifeq ($(L','CLDIR),wrong)'#010+
   'override LCLDIR=$(subst /units/$(LCL_PLATFORM),,$(firstword $(wildcard'+
   ' $(addsuffix /units/$(LCL_PLATFORM),$(BASEDIR)/lcl $(BASEDIR)))))'#010+
   'ifeq ($(LCLDIR),)'#010+
@@ -2280,7 +2280,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   #010+
   '# Check for release version'#010+
-  'ifeq (','$(LCLDIR),wrong)'#010+
+  'ifeq ($(L','CLDIR),wrong)'#010+
   'override LCLDIR=$(subst /units/$(LCL_PLATFORM),,$(firstword $(wildcard'+
   ' $(addsuffix /lib/lazarus/units/$(LCL_PLATFORM),/usr/local /usr))))'#010+
   'ifeq ($(LCLDIR),)'#010+
@@ -2289,20 +2289,20 @@ const fpcmakeini : array[0..213,1..240] of char=(
   'endif'#010+
   #010+
   '# Generate dirs'#010+
-  'override LCLUNIT','DIR:=$(wildcard $(LCLDIR)/units/$(LCL_PLATFORM) $(LC'+
+  'override LCLUNITDIR',':=$(wildcard $(LCLDIR)/units/$(LCL_PLATFORM) $(LC'+
   'LDIR)/units)'#010+
   'override LCLCOMPONENTDIR:=$(wildcard $(LCLDIR)/.. $(LCLDIR)/../compone'+
   'nts $(LCLDIR)/components)'#010+
   'export LCLDIR LCLUNITDIR LCLCOMPONENTDIR'#010+
   #010+
   '# Add LCL dirs to paths'#010+
-  'override REQU','IRE_PACKAGESDIR+=$(LCLCOMPONENTDIR)'#010+
+  'override REQUIRE','_PACKAGESDIR+=$(LCLCOMPONENTDIR)'#010+
   'override COMPILER_UNITDIR+=$(LCLUNITDIR)'#010+
   #010+
   '[lclinforules]'#010+
   '#####################################################################'#010+
   '# LCL Info rules'#010+
-  '############################################################','########'+
+  '###############################################################','#####'+
   '#'#010+
   'override INFORULES+=lclinfo'#010+
   #010+
@@ -2313,7 +2313,7 @@ const fpcmakeini : array[0..213,1..240] of char=(
   '        @$(ECHO)'#010+
   '        @$(ECHO)  Platform............. $(LCL_PLATFORM)'#010+
   '        @$(ECHO)  LCLDIR............... $(LCLDIR)'#010+
-  '        @$(ECHO)  L','CL Unit dir......... $(LCLUNITDIR)'#010+
+  '        @$(ECHO)  LCL ','Unit dir......... $(LCLUNITDIR)'#010+
   '        @$(ECHO)  LCL Component dir.... $(LCLCOMPONENTDIR)'#010+
   '        @$(ECHO)'#010
 );