Commits

michaelp  committed 47b4070

Documentation wiki overhaul

  • Participants
  • Parent commits 63f01de

Comments (0)

Files changed (4)

File DeveloperDocumentation.wiki

+== Developer Documentation ==
+
+At the moment, documentation for GDC, especially the internals, is sparse.
+The DMD frontend and the GCC internals aren't very well documented either.
+This page will hopefully help provide insight on GDC's internals.
+
+**Table of Contents:**
+
+<<toc>>
+
+GDC is essentially divided into 3 parts.
+
+== The DMD frontend ==
+
+* dmd and dmd2 subfolders contain D1 and D2 frontend source code respectively
+
+== GCC internals ==
+
+* http://gcc.gnu.org/wiki/GettingStarted
+
+== GDC's glue code ==
+
+* this is the bridge between the dmd frontend and gcc
+* read the [[http://prowiki.org/wiki4d/wiki.cgi?DMDSourceGuide | DMD Source Guide]], especially section Intermediate representation as a start
+
+* d-glue.cc:
+** implements all the methods described there in post 2, including all Statement::toIR and Expression::toElem methods thus replacing dmd's toelem.c etc.
+
+
+== External Links ==
+
+For what may not have been explained here well enough, here are some other links:
+
+[[http://prowiki.org/wiki4d/wiki.cgi?GdcHacking | GDC Hacking ]]
+
+[[http://prowiki.org/wiki4d/wiki.cgi?DMDSourceGuide | DMD Source Guide]]
+
+[[http://gcc.gnu.org/wiki | GCC Wiki ]]
+
+[[http://blog.lxgcc.net/?page_id=116 | GCC front-end guide]]

File Documentation.wiki

-== GDC internals ==
-
-At the moment, documentation for GDC, especially the internals, is sparse.
-The DMD frontend and the GCC internals aren't very well documented either.
-This page will hopefully help provide insight on GDC's internals.
-
-<<toc>>
-
-GDC is essentially divided into 3 parts.
-
-== The DMD frontend ==
-
-* dmd and dmd2 subfolders contain D1 and D2 frontend source code respectively
-
-== GCC internals ==
-
-* http://gcc.gnu.org/wiki/GettingStarted
-
-== GDC's glue code ==
-
-* this is the bridge between the dmd frontend and gcc
-* read the [[http://prowiki.org/wiki4d/wiki.cgi?DMDSourceGuide | DMD Source Guide]], especially section Intermediate representation as a start
-
-* d-glue.cc:
-** implements all the methods described there in post 2, including all Statement::toIR and Expression::toElem methods thus replacing dmd's toelem.c etc.
-
-
-== External Links ==
-
-For what may not have been explained here well enough, here are some links:
-
-[[http://prowiki.org/wiki4d/wiki.cgi?GdcHacking | GDC Hacking ]]
-
-[[http://prowiki.org/wiki4d/wiki.cgi?DMDSourceGuide | DMD Source Guide]]
-
-[[http://gcc.gnu.org/wiki | GCC Wiki ]]
-
-[[http://blog.lxgcc.net/?page_id=116 | GCC front-end guide]]
 
 === Status ===
 
-D1: 1.061
+D1: 1.062
 
 D2: 2.020 Front end, 2.019 Phobos
 
 If you would like to get involved with the merging of the DMD frontend, Phobos, helping fix bugs, or adding support for GCC versions, here
 are some instructions from David Friedman to help get you started:
 
-=== Merging a DMD frontend and Phobos version: ===
+==== Merging a DMD frontend and Phobos version ====
 {{{
 1. Extract the new dmd-xxx.zip package.
 
 David
 }}}
 
-=== Adding support for GCC versions: ===
+==== Adding support for GCC versions ====
 {{{
 The first thing to do is modify d/setup-gcc.sh to allow building with 
 the new version.
 
 === Documentation ===
 
-The documentation page includes information about the internals of GDC, and will most likely only be of use
+This documentation page includes information about the internals of GDC, and will most likely only be of use
 to you if you want to help with the development of GDC. Installation can be found on the Home wiki page
  (this page!).
 
-[[Documentation|Documentation page]]
+[[DeveloperDocumentation|Developer Documentation]]
+
+This documentation page aims to explain a couple of aspects of GDC to user, such as its usage,
+differences from DMD, and known issues. If can't figure out how to use GDC, take a look here.
+
+[[UserDocumentation|User Documentation]]

File UserDocumentation.wiki

+== User Manual ==
+
+Usage of GDC.
+
+**Table of Contents:**
+
+<<toc>>
+
+== Usage ==
+
+=== Simple Compilation ===
+
+Many of GDC's command line options are the same as what you would use in GCC. Creating an executable is quite easy.
+
+{{{
+gdc main.d -o main
+}}}
+
+This will attempt to compile and link the file 'main.d' and place the output into the file 'main'.
+If you do not use the -o switch, then your executable will be called 'a.out'.
+
+To help make a transition from DMD to GDC easier, there is a script called 'gdmd' which maps
+DMD's command line options to GDC. To see the available options for gdmd, type 'gdmd' or
+'gdmd -help' on the command line.
+
+----
+
+== Known Issues ==
+
+See our [[http://bitbucket.org/goshawk/gdc/issues?status=new&status=open|issue tracker]] to see
+bugs that have been reported to GDC.
+
+More bugs may be found [[http://d.puremagic.com/issues/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=DGCC+aka+GDC&content=|here]],
+but some of them may no longer be relevant, and may possibly be fixed.
+
+Some more known issues, taken from [[http://dgcc.sourceforge.net/gdc/manual.html|here]]:
+
+* See the [[http://svn.kuehne.cn/dstress/www/dstress.html|DStress page]] for known failing cases.
+(Again, may be irrelevant)
+* Debugging information may have a few problems. To enable D name mangling in gdb, apply [[http://dsource.org/projects/gdb-patches/|this patch]].
+* Some targets do not support once-only linking. A workaround is to manually control template emission. 
+See the -femit-templates option below. For Darwin, Apple's GCC 3.x compiler supports one-only linking, 
+but GDC does not build with those sources. There are no problems with the stock GCC 4.x on Darwin.
+* Complex floating point operations may not work the same as DMD.
+* Some math functions behave differently due to different implementations of the extended floating-point type.
+* Volatile statements may not always do the right thing.
+* Because of [[http://groups-beta.google.com/groups?hl=en&q=%22large+executables+on+AIX%22&qt_s=Search|a problem on AIX]],
+the linker will pull in more modules than needed.
+* Some C libraries (Cygwin, MinGW, AIX) don't handle floating-point formatting and parsing in a standard way.
+
+----
+
+== Command line switches ==
+
+A list of the available command line switches in GDC:
+
+|=Switch|=Description|
+|-I<dir>|Add <dir> to the end of the main include path.|
+|-J<dir>|Add <dir> to the end of the string import path.|
+|-fdeprecated|Allow use of deprecated features.|
+|-fassert|Generate runtime code for assert()'s|
+|-frelease|Compile release version|
+|-funittest|Compile in unittest code|
+|-fversion=<level|ident>|Compile in version code >= <level> or identified by <ident>|
+|-fdebug,-fdebug=<level>,-fdebug=<ident>|Compile in debug code, code <= level, or code identified by ident|
+|fdebug|Compile in debug code|
+|-fdebug-c|With -g, generate C debug information for debugger compatibility|
+|-fdeps=<filename>|Write module dependencies to filename|
+|-fd-verbose|Print information about D language processing to stdout|
+|-fd-version=1|Compile as D language version 1|
+|-femit-templates=[normal|private|all|none|auto]|Control template emission|
+|-femit-templates|Emit templates code and data even if the linker cannot merge multiple copies|
+|-nostdinc|Do not search standard system include directories|
+|-fonly=|Process all modules specified on the command line, but only generate code for the module specified by the argument.|
+|-fod=<directory>|Specify the object output directory. Note: this is actually a driver option; the backend ignores it.|
+|-fop|Specify that the source file's parent directories should be appended to the object output directory. Note: this is actually a driver option; the backend ignores it.|
+|-fignore-unknown-pragmas|Ignore unsupported pragmas|
+|-fintfc|Generate D interface files|
+|-fintfc-dir=<dir>|Write D interface files to directory <dir>|
+|-fintfc-file=<filename>|Write D interface file to <filename>|
+|-fdoc|Generate documentation|
+|-fdoc-dir=<docdir>|Write documentation file to docdir directory|
+|-fdoc-file=<filename>|Write documentation file to filename|
+|-fdoc-inc=<filename>|Include a Ddoc macro file|
+|-fmultilib-dir=<dir>|Select header multilib subdirectory|
+|-Wsign-compare|Warn about signed-unsigned comparisons|
+|-fdump-source|Dump decoded UTF-8 text and source from HTML|
+|-fbuiltin|Recognize built-in functions|
+|-funsigned-char|Make \"char\" unsigned by default (silently ignored in D)|
+|-fsigned-char|Make \"char\" signed by default (silently ignored in D)|
+|-iprefix <path>|Specify <path> as a prefix for next two options|
+|-isysroot <dir>|Set <dir> to be the system root directory|
+|-isystem <dir>|Add <dir> to the start of the system include path|
+|-Wall|Enable most warning messages|
+|-Werror|Error out the compiler on warnings|