Code::Blocks Forums

User forums => Help => Topic started by: philippe.quesnel on November 11, 2006, 08:41:25 pm

Title: gdc/dmd compiler support on Linux?
Post by: philippe.quesnel on November 11, 2006, 08:41:25 pm
hi,

i386 Fedora Core6,
C::B nightly nov 10. (same prob w. original FC installed CB)

I only get 3 available compilers  (gnu, intel, sdcc),
how do I use the gdc D compiler ?

hehe, the main reason for installing FC6 was to use gdc w. CB (on a 'more native' gcc platform ;-)
I 'assumed' that gdc being GNU, the CB support for gdc would've been developped for Unix/Linux,
so I was realy surprized to see no gdc on the Linux CB, yet it's avail on Windows !

thx
Philippe
Title: Re: gdc/dmd compiler support on Linux?
Post by: artoj on November 11, 2006, 09:09:18 pm
There's a patch (https://developer.berlios.de/patch/?func=detailpatch&patch_id=956&group_id=5358) in Berlios (the patch manager) that enables GDC on Linux but I don't think it's applied to the core yet (it has been in the queue for long time though).
Title: Re: gdc/dmd compiler support on Linux?
Post by: mandrav on November 11, 2006, 09:38:55 pm
There's a patch (https://developer.berlios.de/patch/?func=detailpatch&patch_id=956&group_id=5358) in Berlios (the patch manager) that enables GDC on Linux but I don't think it's applied to the core yet (it has been in the queue for long time though).

afb will look into it. He will be involved with everything D (and also Mac) ;).
Title: Re: gdc/dmd compiler support on Linux?
Post by: philippe.quesnel on November 11, 2006, 11:28:52 pm
ok, thank you
Title: Re: gdc/dmd compiler support on Linux?
Post by: Game_Ender on November 12, 2006, 01:42:57 am
You should be able to use gdmd, its a script front end for gdc that accepts the same command line arguments as dmd.  So if CB supports DMD on windows you should be able to use it on linux gdc through gdmd on linux.
Title: Re: gdc/dmd compiler support on Linux?
Post by: afb on November 12, 2006, 10:29:38 am
I will enable the GDC "compiler" (and DMD) on Linux too while we look for a solution. As GDC was available on Mac, I kinda assumed it was on Linux too... :-)

The solution I mean is that currently D support is treated as an alternative C/C++ compiler, and that implementation limps a little so it might need to be revised.
Title: Re: gdc/dmd compiler support on Linux?
Post by: afb on November 12, 2006, 10:47:37 am
You should be able to use gdmd, its a script front end for gdc that accepts the same command line arguments as dmd.  So if CB supports DMD on windows you should be able to use it on linux gdc through gdmd on linux.

Since CB supports both GCC and DMC, I think it should support both GDC and DMD.
Title: Re: gdc/dmd compiler support on Linux?
Post by: philippe.quesnel on November 12, 2006, 04:21:37 pm
You should be able to use gdmd, its a script front end for gdc that accepts the same command line arguments as dmd.  So if CB supports DMD on windows you should be able to use it on linux gdc through gdmd on linux.
yeah,
but both gdc & dmd are already supported on Windows !
(I currently use gdc & CB on Windows)
I was thinking that support for gdc on Linux would only require some config for the Linux build
Title: Re: gdc/dmd compiler support on Linux?
Post by: philippe.quesnel on November 12, 2006, 04:31:45 pm
I will enable the GDC "compiler" (and DMD) on Linux too while we look for a solution. As GDC was available on Mac, I kinda assumed it was on Linux too... :-)

coool.

The solution I mean is that currently D support is treated as an alternative C/C++ compiler, and that implementation limps a little so it might need to be revised.

would it be a good idea to call one instance of gdc/dmd to build all 'modified' files (that need to be compiled)
vs the traditional one call per file ?

not sure if it's worth it, but from a test I did on Windows w. gdc,
when all the files needed to be compiled (eg building a new lib),
I saved something like 40% of total compile time.

probably something to do w. having to reparse all required imported files on each seperate call ?
...
hehe, then again, what about 'DI' 'precompiled' files support ?

just suggestions anyways.

thank you,
Philippe
Title: Re: gdc/dmd compiler support on Linux?
Post by: afb on November 12, 2006, 11:56:06 pm
would it be a good idea to call one instance of gdc/dmd to build all 'modified' files (that need to be compiled)
vs the traditional one call per file ?

It might be but it will be handled the same way that C/C++ is, at least for now.