www.digitalmars.com         C & C++   DMDScript  

D.gnu - merging latest dmd frontend to gdc

reply Michael P. <baseball.mjp gmail.com> writes:
Hey, I want to help out with GDC. I don't know a ton about D, but I've got lots
of time to learn, and I think that I would be able to help improve GDC.
Right now, I'm pretty sure that the GDC svn is at DMD 1.030, and works with GCC
4.1.x.
So, I'm trying to merge the DMD frontend source of DMD into GDC. Obviously,
it's not as easy as copying and pasting the frontend source into the dmd folder
of the GDC trunk. I tried that, and got multiple errors.
I'm aware of these two links:
http://prowiki.org/wiki4d/wiki.cgi?GdcHacking
and
http://prowiki.org/wiki4d/wiki.cgi?DMDSourceGuide
which don't seem to be that useful for merging in the DMD front end.
So, if anyone has any insight on how to do this, or what differs when compiling
GDC, tell me. I want to help.
Also, I think that it would be easier to try and do it incrementally, and not
jump from 1.030 to 1.047, and instead, doing 1.030->1.031, etc.
Sep 04 2009
next sibling parent reply Michael P. <baseball.mjp gmail.com> writes:
I found a pretty useful link about writing a GCC front-end here:
http://tldp.org/HOWTO/GCC-Frontend-HOWTO.html
It describes how to write a demo front-end language for GCC.
Since D's is already written, and all I have to work on is merging the DMD
source, it shouldn't be too hard. Just wanted to see how everything would work
together when it actually compiles.
Another guide is here; not as useful, but still decent:
http://www.linuxjournal.com/article/7884

Anyways, I got gdc working with gcc 4.3.1 using the 4.3.1 branch that is
located in the "branches" section of the gdc svn.
https://dgcc.svn.sourceforge.net/svnroot/dgcc/branches/dev-gcc-4.3.1/
It was pretty much the exact same as a 4.1.x installation.

I figured out that, when building gdc, gcc is used, not g++, like when building
dmd, which I would assume is why you can't just copy and paste the front end
source. At least part of the reason.
Anyways, any help/links/etc are appreciated. 
Sep 06 2009
next sibling parent reply Michael P. <baseball.mjp gmail.com> writes:
Yahoo!
I managed to get the front end to DMD 1.031 working with GDC.
What I did was creating patch files for the DMD 1.030 front end, and the front
end that was used with GDC. Then, going through all of the files in the DMD
1.031 front end, I made the changes that were shown in the patch files.
Hopefully, using this I will be able to gradually merge other front end sources
into GDC. :) (By comparing 1.031 source -> 1.032 for example, and apply changes
to source.)
P.S. I have a point form list of things that I found while going through the
patch files. I'll put it in to something useful for other people to see soon. :)
Sep 09 2009
next sibling parent Vincenzo Ampolo <vincenzo.ampolo gmail.com> writes:
Michael P.  wrote:

 I managed to get the front end to DMD 1.031 working with GDC.
Great news, did you publish it somewhere? If not tell me that i'll set up a repository on bitbuket.org See you ;) And thanks for your work!
Sep 09 2009
prev sibling parent reply Vincenzo Ampolo <vincenzo.ampolo gmail.com> writes:
Michael P.  wrote:

 I managed to get the front end to DMD 1.031 working with GDC.
Done! :D Have a look here http://bitbucket.org/goshawk/gdc/overview/ And if you want publish a complete version of the sources. If you just found that applying patches it works i'll help soon :D
Sep 09 2009
parent reply Michael P. <baseball.mjp gmail.com> writes:
Vincenzo Ampolo Wrote:

 Michael P.  wrote:
 
 I managed to get the front end to DMD 1.031 working with GDC.
Done! :D Have a look here http://bitbucket.org/goshawk/gdc/overview/ And if you want publish a complete version of the sources. If you just found that applying patches it works i'll help soon :D
Cool. I'll get the sources up ASAP.
Sep 10 2009
parent reply Vincenzo Ampolo <vincenzo.ampolo gmail.com> writes:
Michael P.  wrote:

 I'll get the sources up ASAP.
I got gdc compiling on 4.1.2... So since you are working in bumping the dmd version, i'll work in bumping gcc version to 4.2 and then 4.3 :D Is it ok?
Sep 10 2009
parent reply Moritz Warning <moritzwarning web.de> writes:
On Thu, 10 Sep 2009 18:20:46 +0200, Vincenzo Ampolo wrote:

 Michael P.  wrote:
 
 I'll get the sources up ASAP.
I got gdc compiling on 4.1.2... So since you are working in bumping the dmd version, i'll work in bumping gcc version to 4.2 and then 4.3 :D Is it ok?
There is a 4.3.1 branch already. http://dgcc.svn.sourceforge.net/viewvc/dgcc/branches/dev-gcc-4.3.1/
Sep 10 2009
parent reply Michael P. <baseball.mjp gmail.com> writes:
Moritz Warning Wrote:

 On Thu, 10 Sep 2009 18:20:46 +0200, Vincenzo Ampolo wrote:
 
 Michael P.  wrote:
 
 I'll get the sources up ASAP.
I got gdc compiling on 4.1.2... So since you are working in bumping the dmd version, i'll work in bumping gcc version to 4.2 and then 4.3 :D Is it ok?
There is a 4.3.1 branch already. http://dgcc.svn.sourceforge.net/viewvc/dgcc/branches/dev-gcc-4.3.1/
Yeah, I got it working with the 4.3.1 branch. There are no 4.2.x patches, and 4.4.x doesn't have any either.
Sep 10 2009
parent reply Vincenzo Ampolo <vincenzo.ampolo gmail.com> writes:
Michael P.  wrote:

 Yeah, I got it working with the 4.3.1 branch.
After some libphobos2 hacks in commenting some functions which caused compiler errors, i successfully compiled gdc D2 with phobos 2. I didn't test yet if it works with an example. If tests will be good, i'll commit the changes. See you :D
Sep 12 2009
next sibling parent Vincenzo Ampolo <vincenzo.ampolo gmail.com> writes:
Vincenzo Ampolo wrote:

 If tests will be good, i'll commit
 the changes.
 
Tests went good :) goshawk earth:/tmp/test/usr/local/gcc-4.3/bin$ ./gdc ~/test.d goshawk earth:/tmp/test/usr/local/gcc-4.3/bin$ ./a.out Hello World, Reloaded goshawk earth:/tmp/test/usr/local/gcc-4.3/bin$ ./gdc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../configure --prefix=/usr/local/gcc-4.3 --enable- languages=c,d,c++ --disable-multilib --disable-shared Thread model: posix gcc version 4.3.4 (GCC) goshawk earth:/tmp/test/usr/local/gcc-4.3/bin$ it's D2 ;)
Sep 12 2009
prev sibling parent "Dejan Lekic" <dejan.lekic gmail.com> writes:
Please do that as I am looking forward to GDC2 with newer Phobos2! :)
Thank youuuuu!
Sep 23 2009
prev sibling parent reply Vincenzo Ampolo <vincenzo.ampolo gmail.com> writes:
Michael you are doing a very good work :)

I don't have time to collaborate now but i could have it in the future. 
What i can suggest you to do is:

1) stay on irc.freenode.net #d.gdc to meet other people interested in 
gdc.
2) publish your work in a RCS. i suggest you to use http://bitbucket.org/ 
it's free and you can host code easily.

I think that the problem in gdc now is the lack of organized development.
This will not change until gdc is a one-man effort. 
This can be a start.

See you.
Sep 09 2009
next sibling parent reply Michael P. <baseball.mjp gmail.com> writes:
Vincenzo Ampolo Wrote:

 Michael you are doing a very good work :)
 
 I don't have time to collaborate now but i could have it in the future. 
 What i can suggest you to do is:
 
 1) stay on irc.freenode.net #d.gdc to meet other people interested in 
 gdc.
 2) publish your work in a RCS. i suggest you to use http://bitbucket.org/ 
 it's free and you can host code easily.
 
 I think that the problem in gdc now is the lack of organized development.
 This will not change until gdc is a one-man effort. 
 This can be a start.
 
 See you.
Hey, thanks for the reply, I appreciate it. I'll make sure to stay on the #d and #d.gdc irc channels. Also, about bitbucket: looks good, but a question about licensing: the front end code is licensed under the GPL, I think. What do I have to do when uploading code onto bitbucket to avoid breaking terms of the GPL? It looked like all I have to do was ship gpl.txt, and credit the original author. But I want to make sure.
Sep 09 2009
parent Vincenzo Ampolo <vincenzo.ampolo gmail.com> writes:
Michael P.  wrote:

 bitbucket to avoid breaking terms of the GPL? It looked like all I 
have to
 do was ship gpl.txt, and credit the original author. But I want to 
make
 sure.
 
With gpl you ahve the freedom to copy, modify and distribute the modified copy. So you can put it on bitbucket for now and just add your Copyleft to the files you modify without deleting the previous ones, so the people that worked in that file are traced. Then you can copy everywhere you want :D
Sep 10 2009
prev sibling parent Leandro Lucarella <llucax gmail.com> writes:
Vincenzo Ampolo, el 10 de septiembre a las 01:42 me escribiste:
 Michael you are doing a very good work :)
 
 I don't have time to collaborate now but i could have it in the future. 
 What i can suggest you to do is:
 
 1) stay on irc.freenode.net #d.gdc to meet other people interested in 
 gdc.
 2) publish your work in a RCS. i suggest you to use http://bitbucket.org/ 
 it's free and you can host code easily.
 
 I think that the problem in gdc now is the lack of organized development.
 This will not change until gdc is a one-man effort. 
 This can be a start.
I'm very glad to see some work on GDC too, thanks for your work! =) -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- He andáu muchos caminos, muchos caminos he andáu, Chile tiene el buen vino y Suecia, el bacalao. Esta'o Unido tiene el hot do', Cuba tiene el mojito, Guatemala, el cornalito y Brasil la feishoada.
Sep 10 2009
prev sibling parent Walter Bright <newshound1 digitalmars.com> writes:
Michael P. wrote:
 Hey, I want to help out with GDC.
I think it's great you're resurrecting GDC.
Sep 14 2009