Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC and language D [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ZeLegolas
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 128

PostPosted: Sat Feb 07, 2009 8:22 pm    Post subject: GCC and language D [SOLVED] Reply with quote

Hi,

The D language is not supported with GCC on gentoo. (gcc 4.3.3)
It's possible to define GDC (GDC is a D language front end for the GNU Compiler Collection) ?
And how?

Any help should be appreciate.

Regards


Last edited by ZeLegolas on Mon Mar 16, 2009 5:05 am; edited 2 times in total
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Sat Feb 07, 2009 8:41 pm    Post subject: Reply with quote

Gentoo's ebuild for gcc 4.1.2 supports D:
Code:
USE="d" emerge =gcc-4.1*

There is also a D overlay:
Code:
layman -a d
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Sun Feb 08, 2009 4:12 pm    Post subject: Reply with quote

StringCheesian wrote:
Gentoo's ebuild for gcc 4.1.2 supports D:
Code:
USE="d" emerge =gcc-4.1*

There is also a D overlay:
Code:
layman -a d


if you are using gcc D you do not want the D overlay, everything in the D overalay is intended to be used with Digital Mars's interpreter thingy... if you want to compile to executables you need gcc D...

...unfortunately, last I knew you had to use gcc 4.1, its not as easy as adding a D use flag to gcc 4.3, the D compiler is a separate package that you uncompress into the source directory of gcc and then modify the makefiles to include it as part of the gcc build... i do not think there is a stable D working on 4.2 of 4.3 yet..... Also, all you are gonna be able to do is write console apps in D (or use C/C++ bindings on for C/C++ libs) there are attempts to get Qt, wxwidgets, gtk and some other widget toolkits working nativly with D but they were not working last summer when I tried this last. There is also a port of swt to D called dwt that is not yet done, or at least not work with gcc D yet.

Wish you all the best of luck and sorry if I burst your bubble.
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
MageSlayer
Apprentice
Apprentice


Joined: 26 Jul 2007
Posts: 250
Location: Ukraine

PostPosted: Sun Feb 08, 2009 5:30 pm    Post subject: Reply with quote

Try using http://subversion.assembla.com/svn/d-overlay overlay.

GDC is almost dead project, afaiu. LLVM backend implements D support with good progress.
But don't expect it working out of the box :)
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Sun Feb 08, 2009 5:38 pm    Post subject: Reply with quote

MageSlayer wrote:
Try using http://subversion.assembla.com/svn/d-overlay overlay.

GDC is almost dead project, afaiu. LLVM backend implements D support with good progress.
But don't expect it working out of the box :)


If I wanted to use LLVM or some interpreter I would use java or python... I was looking forward to D and GDC solely so I could compile to bins...
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
MageSlayer
Apprentice
Apprentice


Joined: 26 Jul 2007
Posts: 250
Location: Ukraine

PostPosted: Sun Feb 08, 2009 8:40 pm    Post subject: Reply with quote

Hm, it has native compiler also.
http://llvm.org/releases/1.4/docs/CommandGuide/html/llvm-ld.html
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Sun Feb 08, 2009 10:47 pm    Post subject: Reply with quote

rmh3093 wrote:
if you are using gcc D you do not want the D overlay, everything in the D overalay is intended to be used with Digital Mars's interpreter thingy... if you want to compile to executables you need gcc D...

Actually Digital Mars' dmd really is a native compiler, not an interpreter. It's treated as (or at least compiled like) C with modified syntax and a garbage collecting malloc - not like Python or Java. You can use Digital Mars' obj2asm to see the assembler dmd generates - no bytecode or anything like that.
Back to top
View user's profile Send private message
MageSlayer
Apprentice
Apprentice


Joined: 26 Jul 2007
Posts: 250
Location: Ukraine

PostPosted: Mon Feb 09, 2009 2:55 pm    Post subject: Reply with quote

StringCheesian

Quote:
Actually Digital Mars' dmd really is a native compiler, not an interpreter.


I know. Of course it's a compiler. My previous post was about LLVM. It _does_ have native x86 compiler as well.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Mon Feb 09, 2009 11:45 pm    Post subject: Reply with quote

StringCheesian wrote:
rmh3093 wrote:
if you are using gcc D you do not want the D overlay, everything in the D overalay is intended to be used with Digital Mars's interpreter thingy... if you want to compile to executables you need gcc D...

Actually Digital Mars' dmd really is a native compiler, not an interpreter. It's treated as (or at least compiled like) C with modified syntax and a garbage collecting malloc - not like Python or Java. You can use Digital Mars' obj2asm to see the assembler dmd generates - no bytecode or anything like that.


hmm thanks for setting me straight on that, idk where i picked up the idea is was an interpreter
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Tue Apr 13, 2010 9:36 pm    Post subject: Reply with quote

Hi,

with the exception of the dmd in the overlay, there doesn't seem to be any D-support in Gentoo any longer (neither llvm nor gcc). Is that correct? If no, how to get another D-Compiler? If yes, why and where to get another one? :-)

Thanks!
Back to top
View user's profile Send private message
albatroz
n00b
n00b


Joined: 09 Jun 2006
Posts: 13
Location: Mainz, Germany

PostPosted: Tue Apr 13, 2010 10:11 pm    Post subject: Reply with quote

Hello,

D overlay provides you also with llvm, ldc and some libs and programs.
Efforts to update gdc are underway but have not produced a working compiler for the current GCC and D1 versions.
For D2 the best compiler is still dmd.

d overlay (http://subversion.assembla.com/svn/d-overlay
Back to top
View user's profile Send private message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Tue Apr 13, 2010 10:47 pm    Post subject: Reply with quote

Ah, that's great to hear! Since I have no lagcy code I'm more interested in D 2.0 and some if it's nice features. So I'll wait patiently until you got time for gdc and use ldc for playing around first.

Thank you very much for your work integrating D into gentoo!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum