Ticket #34: gdc-fixes.diff

File gdc-fixes.diff, 2.9 kB (added by Florian, 6 years ago)

Patch for the GDC errors (from rev 48)

  • Source/Makefile.gdc

    old new  
    11DMD=gdmd 
    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  
    199199        version(Posix) { 
    200200            char[] vCompilerExe=`gdc`; 
    201201            char[] vCompileOnly= `-c`; 
    202             char[] vLinkerExe=`gdmd`; 
     202            char[] vLinkerExe=`gdc`; 
    203203            bool   vPostSwitches = false; 
    204204            bool   vAppendLinkSwitches = false; 
    205205            char[] vArgDelim = " "; 
     
    213213            char[] vConfigSep = ":"; 
    214214            char[] vLibrarian = `ar`; 
    215215            char[] vLibrarianOpts = `-r`; 
    216             char[] vLinkLibSwitch = "-l-L"; 
     216            char[] vLinkLibSwitch = "-l"; 
    217217            char[] vHomePathId = "HOME"; 
    218218            char[] vEtcPath    = "/etc/"; 
    219219        } 
     
    22042204 
    22052205    ReadCompilerConfigFile(); 
    22062206 
    2207     version(Posix) 
     2207    version(DigitalMars) 
     2208    { 
     2209        version(Posix) 
     2210        { 
     2211            // Unless supplied by the config file, these are the default 
     2212            // libraries to use for linking. 
     2213            if (vDefaultLibs.length == 0) 
     2214            { 
     2215                vDefaultLibs ~= "c"; 
     2216                vDefaultLibs ~= "phobos"; 
     2217                vDefaultLibs ~= "pthread"; 
     2218                vDefaultLibs ~= "m"; 
     2219            } 
     2220        } 
     2221    } 
     2222 
     2223    version(GNU) 
    22082224    { 
    22092225        // Unless supplied by the config file, these are the default 
    22102226        // libraries to use for linking. 
    22112227        if (vDefaultLibs.length == 0) 
    22122228        { 
    22132229            vDefaultLibs ~= "c"; 
    2214             vDefaultLibs ~= "phobos"; 
     2230            vDefaultLibs ~= "gphobos"; 
    22152231            vDefaultLibs ~= "pthread"; 
    22162232            vDefaultLibs ~= "m"; 
    22172233        } 
    22182234    } 
    22192235 
    2220     // Assume phobos will be ignored unless user has specified another set. 
    2221     if (vModulesToIgnore.length == 0) 
    2222         vModulesToIgnore ~= "phobos"; 
     2236    version(DigitalMars) 
     2237    { 
     2238        // Assume phobos will be ignored unless user has specified another set. 
     2239        if (vModulesToIgnore.length == 0) 
     2240            vModulesToIgnore ~= "phobos"; 
     2241    } 
     2242 
     2243    version(GNU) 
     2244    { 
     2245        // Assume gphobos will be ignored unless user has specified another set. 
     2246        if (vModulesToIgnore.length == 0) 
     2247            vModulesToIgnore ~= "gphobos"; 
     2248    } 
    22232249 
    22242250    // Rationalize the ignored modules list. 
    22252251    foreach(char[] m; vModulesToNotice) {