Changes between Version 9 and Version 10 of Projects/GCCGoRTEMS


Ignore:
Timestamp:
Jul 16, 2010, 8:51:44 PM (9 years ago)
Author:
Vinutheraj
Comment:

/* Building gccgo */

Legend:

Unmodified
Added
Removed
Modified
  • Projects/GCCGoRTEMS

    v9 v10  
    8282= Building gccgo =
    8383
     84The gccgo source code is accessible via Subversion. The gcc web site has [http://gcc.gnu.org/svn.html instructions for getting the gcc source code]. The gccgo source code is a branch of the main gcc code repository: svn://gcc.gnu.org/svn/gcc/branches/gccgo.
     85
     86Basically you do a -
     87{{{
     88svn co svn://gcc.gnu.org/svn/gcc/branches/gccgo gccgo
     89}}}
     90
     91Now, we have to patch this gccgo for RTEMS. The patch can be taken from ''rtems/contrib/crossrpms/patches''. Currently (16-Jul-2010), there is no gccgo patch in that folder, but there is a gcc-core-4.5.0-XXX.patch. Apply that to gccgo. One hunk is rejected (the one related to missing file lm32.h), and one hunk related to config.gcc needs to applied manually.
     92
     93Now, after patching, we are ready to build gccgo for RTEMS. We can choose to build multilib or not. The commands shown here are to build non-multilib. You can choose to build go with c++ too.
     94
     95{{{
     96mkdir b-gccgo1-i386
     97cd b-gccgo1-i386
     98../gccgo/configure --enable-threads=rtems --with-gnu-as --enable-newlib-mb --enable-newlib-iconv \
     99  --with-gnu-ld --with-newlib --with-system-zlib --disable-nls \
     100  CFLAGS_FOR_TARGET="-BRTEMS_MAKEFILE_PATH/lib/ -march=i486" \
     101  --enable-version-specific-runtime-libs --target=i386-rtems4.11 --prefix=INSTALL_DIR \
     102  --enable-languages=c,go
     103make
     104make install
     105}}}
     106
     107The ''--march=i486'' is because If you are targeting a 32-bit x86, then you will want to build gccgo to default to supporting locked compare and exchange instructions.
    84108= References =
    85109