Here's a patch for source:/trunk/Source/build.d#41
It contains changes which were needed for build to work properly on BSD/OS X 10.4 and Debian 3.1 Sarge. Changes in short:
- Added vLinkOutputSwitch, previously hard-coded to "-o" This is different depending on the linker, so I made it change if version GNU and version Posix to "-of"
- Added vLinkLibSwitch, previously hard-coded as "-l" As with -o, this depends on the linker. Set to "-l-L" for GNU/Posix.
- Added vLinkerDebugSymInfoSwitch, replacing hard-coded "/co" (line 2408)
- Switched to GDMD as default compiler and linker for GNU/Posix. GDMD is a compatibility interface provided by GDC, which uses the same switches and arguments as dmd (easier to maintain build if using a single compiler/linker interface)
- Switched linker to GDMD, as mentioned above. No need to use another linker, when the functionality is built-in into GDC and DMD. (Though leaving it configurable if someone would like LD instead)
- Changed vCompilerPath for version GNU/Posix to "" (as it's normally located in any of the dirs included in PATH. Previous value was OS-specific (FYI: /opt is used by port, a package manager availalbe on some systems. Commonly used on BSD, but not on redhat, debian or gentoo for example.))
The changes are attached as a diff (unidiff) file for easy patching as well as my complete copy.
Hoping for a more posix-friendly build in a near future ;)
/Rasmus