Ticket #17: build.d.r43.bsd-posix-fix.diff
| File build.d.r43.bsd-posix-fix.diff, 4.2 kB (added by rasmus at-flajm-dot-se, 6 years ago) |
|---|
-
trunk/Source/build.d
old new 120 120 char[] vConfigSep = ";"; 121 121 char[] vLibrarian = `lib`; 122 122 char[] vLibrarianOpts = `-c -p256`; 123 char[] vLinkerDebugSymInfoSwitch = " /co"; 123 124 } 124 125 125 126 version(Posix) { 126 char[] vCompilerExe=` dmd`;127 char[] vCompilerExe=`gdmd`; 127 128 char[] vCompileOnlySwitch= ` -c`; 128 129 char[] vLinkerExe=`ld`; 129 130 char[] vConfigFile=`dmd.conf`; 130 131 char[] vCompilerPath=``; 131 132 char[] vLinkerPath=``; 132 char[] vLinkerDefSwitches=` /noi/map`;133 char[] vLinkerDefSwitches=``; 133 134 char[] vConfigPath=`/etc/`; 134 135 char[] vLibPaths = ``; 135 136 char[] vConfigSep = ":"; 136 137 char[] vLibrarian = `ar`; 137 138 char[] vLibrarianOpts = `-r`; 139 char[] vLinkerDebugSymInfoSwitch = " -g"; 138 140 } 139 141 140 142 char[] vVersionSwitch = "-version="; … … 143 145 char[] vOutFileSwitch = "-of"; 144 146 char[] vImportPathSwitch = "-I"; 145 147 char[] vNoLinkSwitch = "-c"; 148 char[] vLinkOutputSwitch = "-o "; 149 char[] vLinkLibSwitch = "-l"; 146 150 } 147 151 148 152 version(GNU) { … … 159 163 char[] vConfigSep = ";"; 160 164 char[] vLibrarian = `lib`; 161 165 char[] vLibrarianOpts = `-c`; 166 167 char[] vVersionSwitch = "-fversion="; 168 char[] vDebugSwitch = "-fdebug"; 169 char[] vOutFileSwitch = "-o "; 170 char[] vKeepPathSwitch = ""; 171 char[] vImportPathSwitch = "-I "; 172 char[] vLinkOutputSwitch = "-o "; 173 char[] vLinkLibSwitch = "-l"; 174 char[] vLinkerDebugSymInfoSwitch = " /co"; 162 175 } 163 176 164 177 version(Posix) { 165 char[] vCompilerExe=`gdc`; 178 // Using GDC's GDMD wrapper script 179 char[] vCompilerExe=`gdmd`; 166 180 char[] vCompileOnlySwitch= ` -c`; 167 char[] vLinkerExe=` ld`;168 char[] vConfigFile= null;169 char[] vCompilerPath=` /opt/gdc/bin`;181 char[] vLinkerExe=`gdmd`; // using gdmd/gdc as linker 182 char[] vConfigFile=``; 183 char[] vCompilerPath=``; 170 184 char[] vLinkerPath=``; 171 185 char[] vLinkerDefSwitches=``; 172 char[] vConfigPath= null;186 char[] vConfigPath=`/etc/`; 173 187 char[] vLibPaths = ``; 174 188 char[] vConfigSep = ":"; 175 189 char[] vLibrarian = `ar`; 176 190 char[] vLibrarianOpts = `-r`; 191 192 char[] vVersionSwitch = "-version="; 193 char[] vDebugSwitch = "-debug"; 194 char[] vKeepPathSwitch = "-op"; 195 char[] vOutFileSwitch = "-of"; 196 char[] vImportPathSwitch = "-I"; 197 char[] vLinkOutputSwitch = "-of"; 198 char[] vLinkLibSwitch = "-L-l"; 199 char[] vLinkerDebugSymInfoSwitch = " -g"; 177 200 } 178 char[] vVersionSwitch = "-fversion=";179 char[] vDebugSwitch = "-fdebug";180 char[] vOutFileSwitch = "-o ";181 char[] vKeepPathSwitch = "";182 char[] vImportPathSwitch = "-I ";183 201 char[] vNoLinkSwitch = "-c"; 184 202 } 185 203 … … 1138 1156 } 1139 1157 1140 1158 // (2) Set the output file name 1141 lCommandLine ~= "-o "~ util.str.enquote(util.pathex.AbbreviateFileName(lTargetName)) ~ "\n";1159 lCommandLine ~= vLinkOutputSwitch ~ util.str.enquote(util.pathex.AbbreviateFileName(lTargetName)) ~ "\n"; 1142 1160 1143 1161 // (3) Set the map name 1144 1162 if (IsMapping == True) … … 1148 1166 // Include the default libraries first. 1149 1167 foreach( char[] lLib; vDefaultLibs ~ lLibraryFiles) 1150 1168 { 1151 lCommandLine ~= "-l"~ util.str.enquote(lLib) ~ "\n";1169 lCommandLine ~= vLinkLibSwitch ~ util.str.enquote(lLib) ~ "\n"; 1152 1170 } 1153 1171 1154 1172 if (vLibPaths.length > 1) … … 2405 2423 if (pArg == "-g") 2406 2424 { 2407 2425 // Requires symbolic debug info. 2408 vLinkerDefSwitches ~= "/co";2426 vLinkerDefSwitches ~= vLinkerDebugSymInfoSwitch; 2409 2427 AddCompilerArg(pArg); 2410 2428 break; 2411 2429 }
