Poster of Linux kernelThe best gift for a Linux geek
GCCGO

GCCGO

Section: GNU (1) Updated: 2011-05-06
Local index Up
 

NAME

gccgo - A GCC-based compiler for the Go language  

SYNOPSIS

gccgo [-c|-S]
      [-g] [-pg] [-Olevel]
      [-Idir...] [-Ldir...]
      [-o outfileinfile...

Only the most useful options are listed here; see below for the remainder.  

DESCRIPTION

The gccgo command is a frontend to gcc and supports many of the same options. This manual only documents the options specific to gccgo.

The gccgo command may be used to compile Go source code into an object file, link a collection of object files together, or do both in sequence.

Go source code is compiled as packages. A package consists of one or more Go source files. All the files in a single package must be compiled together, by passing all the files as arguments to gccgo. A single invocation of gccgo may only compile a single package.

One Go package may "import" a different Go package. The imported package must have already been compiled; gccgo will read the import data directly from the compiled package. When this package is later linked, the compiled form of the package must be included in the link command.  

OPTIONS

-Idir
Specify a directory to use when searching for an import package at compile time.
-Ldir
When linking, specify a library search directory, as with gcc.
-fgo-prefix=string
Go permits a single program to include more than one package with the same name. This option is required to make this work with gccgo. The argument to this option may be any string. Each package with the same name must use a distinct -fgo-prefix option. The argument is typically the full path under which the package will be installed, as that must obviously be unique.
-frequire-return-statement
-fno-require-return-statement
By default gccgo will warn about functions which have one or more return parameters but lack an explicit "return" statement. This warning may be disabled using -fno-require-return-statement.
 

SEE ALSO

gpl(7), gfdl(7), fsf-funding(7), gcc(1) and the Info entries for gccgo and gcc.  

COPYRIGHT

Copyright (c) 2010 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, the Front-Cover Texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page gfdl(7).

(a) The FSF's Front-Cover Text is:

     A GNU Manual

(b) The FSF's Back-Cover Text is:

     You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
SEE ALSO
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 07:51:44 GMT, June 15, 2011