As of DMD 2.053, patching the compiler is no longer required. The instructions below should be considered obsolete.

Applying the patch

1. If you do not have the patch utility installed:

Windows

Get it from http://gnuwin32.sourceforge.net/packages/patch.htm

Linux (Debian and derivatives)

Run

sudo apt-get install patch

2. To apply the patch, run the following commands in the console:

cd <dmd-source-dir>
patch -p0 -i <patch-dir>/dmd.<dmd-version>.patch

where <dmd-source-dir> is the path to the dmd source directory (e.g. C:/dmd/dmd2/src/dmd), <patch-dir> is the path to the directory where the patch is located and <dmd-version> is the dmd version the patch was created against (e.g. 2.046)

Compiling the patched dmd

1. In the dmd source directory, run:

Windows

make -f win32.mak release

Linux

make -f linux.mak

2. Replace the old dmd binary with the new one, which has been created in the source directory.

Attachments