mini-HOWTO for using gccgo, the Google Go compiler...
Prerequisites
Space requirements: ~3GB
$ sudo apt-get -y install binutils coreutils libacl1 libattr1 libc6 libc6-dev libc6-i686 libgmp3c2 libgmp3-dev libmpfr1ldbl libmpfr-dev libncurses5 libselinux1 linux-libc-dev locales mime-support zlib1g flex texinfo
Getting source
Method 1: Checkout from svn
$ mkdir gccgo-4.5.0
$ sudo apt-get -y install subversion
$ svn checkout svn://gcc.gnu.org/svn/gcc/branches/gccgo gccgo-4.5.0
$ sudo apt-get -y install subversion
$ svn checkout svn://gcc.gnu.org/svn/gcc/branches/gccgo gccgo-4.5.0
Method 2: Extract from archive
Download the source archive... gccgo-4.5.0.tar.gz (80MB) or from sourceforge... svn revision: 154648...
$ tar xvzf gccgo-4.5.0.tar.gz
Configuring gccgo
$ cd gccgo-4.5.0
$ ./configure --enable-languages=c,c++,go --with-arch=i686
$ ./configure --enable-languages=c,c++,go --with-arch=i686
...replace with your architecture in place of i686... if Pentium 4, then use pentium4... to find out which one to use, try i386 and x86-64 Options - Using the GNU Compiler Collection (GCC)...
Building gccgo
$ make
Installing gccgo
$ sudo make install
Using gccgo
$ gccgo xyz.go
$ ./a.out
$ ./a.out
Comments please...
0 comments:
Post a Comment