Ticket #33: patch

File patch, 3.3 kB (added by keinfarbton, 6 years ago)

svn diff from revision 48

  • Source/Makefile.unix

    old new  
    11DMD=dmd 
    2 DFLAGS=-op -release -inline 
     2DFLAGS=-op -release -inline -version=BuildVerbose 
    33SOURCES=build.d util/pathex_bn.d util/pathex.d source_bn.d util/str.d build_bn.d util/booltype.d util/fdt_bn.d util/str_bn.d source.d util/fdt.d util/fileex.d util/fileex_bn.d util/linetoken.d util/linetoken_bn.d util/macro.d util/file2.d 
    44 
    55all: build 
  • Source/build.d

    old new  
    138138            char[] vLibrarianOpts = `-c -p256`; 
    139139            char[] vHomePathId = "HOME"; 
    140140            char[] vEtcPath    = ""; 
     141        char[]     vSymInfoSwitch = "/co"; 
     142        char[]     vOutFileSwitch = "-of"; 
    141143        } 
    142144 
    143145        version(Posix) { 
     
    159161            char[] vLibrarianOpts = `-r`; 
    160162            char[] vHomePathId = "HOME"; 
    161163            char[] vEtcPath    = "/etc/"; 
     164        char[] vSymInfoSwitch = "-g"; 
     165        char[] vOutFileSwitch = "-o "; 
    162166        } 
    163167 
    164168        char[]     vVersionSwitch = "-version"; 
    165169        char[]     vDebugSwitch = "-debug"; 
    166170        char[][]   vCompilerDefs; 
    167         char[]     vOutFileSwitch = "-of"; 
    168171        char[]     vImportPath = "-I"; 
    169172        bool       vUseModBaseName = false; 
    170173        char[]     vLinkLibSwitch = "-l"; 
    171         char[]     vSymInfoSwitch = "/co"; 
    172174    } 
    173175 
    174176    version(GNU) { 
     
    220222        char[]     vOutFileSwitch = "-o "; 
    221223        char[][]   vCompilerDefs; 
    222224        char[]     vImportPath = "-I "; 
    223         char[]     vSymInfoSwitch = "/co"; 
     225        char[]     vSymInfoSwitch = "-g"; 
    224226        /* GDC places object files in the directory from which it is called */ 
    225227        bool       vUseModBaseName = true; 
    226228    } 
     
    935937        if (lFileName.length > 0) 
    936938        { 
    937939            lCmdItem = lFileName; 
    938             if ( util.str.ends(lCmdItem, "." ~ vLibExtention) == True) 
    939            
    940                 // Cut off extention. 
    941                 lCmdItem.length = lCmdItem.length - vLibExtention.length - 1; 
    942                 lLibraryFiles ~= lCmdItem; 
    943            
    944             else 
    945            
     940            //if ( util.str.ends(lCmdItem, "." ~ vLibExtention) == True) 
     941            //
     942            //    // Cut off extention. 
     943            //    lCmdItem.length = lCmdItem.length - vLibExtention.length - 1; 
     944            //    lLibraryFiles ~= lCmdItem; 
     945            //
     946            //else 
     947            //
    946948                lFilesToLink ~= lCmdItem; 
    947            
     949            //
    948950        } 
    949951    } 
    950952 
     
    11211123                { 
    11221124                    if (util.str.begins(lCompileArg, "-L") == True) 
    11231125                    { 
    1124                         lLinkerSwitches ~= lCompileArg[2..$]; 
     1126                        lLinkerSwitches ~= " " ~ lCompileArg[2..$]; 
    11251127                    } 
    11261128                } 
    11271129                foreach( char[] lSwitch; std.string.split(vLinkerDefs ~ lLinkerSwitches, "/")) 
     
    22102212        { 
    22112213            vDefaultLibs ~= "c"; 
    22122214            vDefaultLibs ~= "phobos"; 
     2215            vDefaultLibs ~= "pthread"; 
    22132216            vDefaultLibs ~= "m"; 
    22142217        } 
    22152218    }