I guess the note for D needs an update, and it would be better if we add a note about Ada here too.


There is a language which aims to combine all the benefits of C, C++, C# and Java to one new language: D

Even there is a complete compiler at there is also a project which builds a gcc frontend for D, the GDC project. The following section shows how to setup gcc to be able to compile D sources.
First, checkout the frontend sources. This step needs to be done only once as a tarball is created which contains all the sources. This is just to make playing with the frontend sources easier as they do not need to be checked out again and again:

git clone &&
cd GDC &&
git checkout gdc-4.9 &&
rm -rf .git &&
rm .gitignore &&
cd .. &&
mv GDC gdc-4.9-<checkout-date> &&
tar -cJf gdc-4.9-<checkout-date>.tar.xz  gdc-4.9-<checkout-date>
rm -rf gdc-4.9-<checkout-date>

Replace <checkout-date> by the current date, for example gdc-4.9-20130119. Also, use whatever version of GCC you have available, instead of 4.9. Save the gdc-4.9-<checkout-date>.tar.xz for later use (if any).

Build the gcc with D frontend enabled by following commands (assuming the tarballs ar one directory level above):

tar -xf ../gdc-4.9-<checkout-date>.tar.xz &&
tar -xf ../gcc-4.9.0.tar.bz2 &&
cd gdc-4.9-<checkout-date> &&
./ ../gcc-4.9.0 &&
cd ../gcc-4.9.0

The following instructions are nearly the same as the BLFS instructions to rebuild gcc. Add d to the --enable-languages option. Then this reads for example --enable-languages=c,c++,fortran,java,objc,obj-c++,d. Also add --with-bugurl="".

# Apply patches as in the book
mkdir ../gcc-build &&
cd    ../gcc-build &&
../gcc-4.9.0/configure --prefix=/usr \
                       --with-system-zlib \
                       --libdir=/usr/lib \
                       --enable-shared \
                       --enable-threads=posix \
                       --enable-__cxa_atexit \
                       --disable-multilib \
                       --enable-clocale=gnu \
                       --enable-languages=c,c++,fortran,d \
                       --with-bugurl="" \
                       --disable-bootstrap \

I had to change the --enable-bootstrap to --disable-bootstrap, otherwise the compilation breaks.

make &&
make -k check

Please test this in a save environment as the instructions will overwrite the current (working) gcc with a new one. In case there is a bug, either in the instructions above or somewhere else, you may no longer be able to compile any other package.

Digital Mars (

D Programming Language ( by Ali Çehreli, contains a lot of sample code and a perfect tutorial in (mostly) english. Some part are still turkish but the code is quite good readable.

D Programming Language ( Main site of the DigitalMars implementation.

D Programming ( - Sample code etc.

Wiki for the D Programming Language - Tons of content, updated by the masses.

So long, Thomas


Last modified 3 months ago Last modified on 06/29/2023 04:08:38 PM
Note: See TracWiki for help on using the wiki.