Commits

trass3r committed c02f9cd

more build instructions improvements

Comments (0)

Files changed (1)

 * patch
 
 For cross-compiling/multilib builds, you should also have installed:
-* gcc-multilib and g++-multilib
+* gcc-multilib (and maybe g++-multilib)
 * libcloog-ppl-dev
 
 
     mkdir objdir
     cd objdir 
     ../configure --enable-languages=d --disable-shared \
-        --with-pkgversion="GDC 7cb42bd4eb94 DMD 2.053" \ # insert the correct versions
+        --prefix=/opt/gdc \
+        --with-pkgversion="GDC 7cb42bd4eb94 DMD 2.053" \     # insert the correct versions
         --with-bugurl="https://bitbucket.org/goshawk/gdc/issues" \
         --enable-checking=release
-    make -j2 2>&1 | tee build.log # insert your number of cores in the -j argument
-    DESTDIR=/opt make install
-    export PATH=$PATH:/opt/usr/local/bin/
+    make -j2 2>&1 | tee build.log                            # insert your number of cores in the -j argument
+    make install
+    export PATH=/opt/gdc/bin/:$PATH                          # temporarily override system default gcc
 }}}
 
 This will configure for a GDC D1 build. If you want D2, just add **-v2** to the **./gcc/d/setup-gcc.sh** command. To speed up the build process, --disable-bootstrap can be added to configure arguments (although for release it should not!):
 
 Other configure arguments you might want to use:
 {{{
-    --disable-nls # disable Native Language Support (NLS), which lets GCC output diagnostics in languages other than American English
-    --enable-lto # link-time optimizations
+    --[enable|disable]-nls       # Native Language Support (NLS), lets GCC output diagnostics in languages other than English
+    --[enable|disable|-lto       # link-time optimizations
+    --[enable|disable|-multilib
 }}}
 
+If you get compile errors un Ubuntu (at least x64 version) configure it **with** multilib (and install gcc-multilib of course).
+
 The **make** command will perform the build.
-the **make install** command will install the compiled GDC in DESTDIR directory.
+**make install** will install the compiled GDC.
 
-With last line, **DESTDIR=/opt make install** you will install GDC in /opt so it will not mess up with the installed GCC. Go in /opt to find the GDC executable.
+Since prefix is set to /opt/gdc you will install GDC there so it will not mess up with the installed GCC. Go in /opt/gdc/bin to find the GDC executable.
 
 With this source structure it will be easy to do modifications of the sources. To do changes, just modify files in **gdc/d** directory, it will be visible by the GCC sources. The **objdir** directory is used for configuration so that the GCC sources remains unmodified.
 
-After that you follow the instructions you can do the following:
+After following the instructions you can do a quick test:
 
 {{{
 goshawk@jupiter:/$ gdc -v
 Using built-in specs.
-Target: i686-pc-linux-gnu
-Configured with: ../configure --enable-languages=d --disable-shared
+COLLECT_GCC=gdc
+COLLECT_LTO_WRAPPER=/opt/gdc/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.5.3/lto-wrapper
+Target: x86_64-unknown-linux-gnu
+Configured with: ../configure --enable-languages=d [...]
 Thread model: posix
-gcc version 4.3.4 (GCC)
+gcc version 4.5.3 20110428 (gdc hg, using dmd 2.052) (GDC 7cb42bd4eb94 DMD 2.053)
 goshawk@jupiter:/$ gcc -v
 Using built-in specs.
-Target: i686-pc-linux-gnu
-Configured with: ../configure --enable-languages=d --disable-shared
+COLLECT_GCC=gcc
+COLLECT_LTO_WRAPPER=/opt/gdc/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.5.3/lto-wrapper
+Target: x86_64-unknown-linux-gnu
+Configured with: ../configure --enable-languages=d [...]
 Thread model: posix
-gcc version 4.3.4 (GCC)
+gcc version 4.5.3 20110428 (gdc hg, using dmd 2.052) (GDC 7cb42bd4eb94 DMD 2.053)
 }}}
 
-As you can see you will start using the newly compiled GCC and GDC, overriding but not deleting the system default.
+As you can see your current shell session will start using the newly compiled GCC and GDC, overriding but not overwriting the system default.
+
+=== Building on Windows ===
 
 If you need to install GDC on Windows, [[MinGW|here]] is a guide to install GDC with MinGW.
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.