Comments

The go tool, used by many people to build Go programs, handles relative
import paths by passing a special option to the compiler. The option is
a prefix to use for any relative import. The go tool does this so that
programs can be built in a temporary directory and can still find
packages imported on a relative path. The gc compiler calls this option
-D. This patch adds the same option to gccgo, using the name
-fgo-relative-import-path. Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu. Committed to mainline and 4.7 branch.
Ian
2012-10-30 Ian Lance Taylor <iant@google.com>
* lang.opt (-fgo-relative-import-path): New option.
* go-lang.c (go_relative_import_path): New static variable.
(go_langhook_init): Pass go_relative_import_path to
go_create_gogo.
(go_langhook_handle_option): Handle -fgo-relative-import-path.
* go-c.h (go_create_gogo): Update declaration.
* gccgo.texi (Invoking gccgo): Document
-fgo-relative-import-path.