FAQ
Hi Ian,

Thanks for your reply. I didn't know $GCCGO had already been supported in
the default branch! Meanwhile I'll be using a shell script.

Best regards,
Kai


野田 開 <nodakai@gmail.com>


2014-08-13 21:13 GMT+08:00 Ian Lance Taylor <iant@golang.org>:
On Tue, Aug 12, 2014 at 11:54 PM, Kai Noda wrote:

I had a small trouble in using my built GCCGO compiler.

$ go install test01 && bin/test01
こんにちは、世界
$ which gccgo47
/home/nodakai/gcc47/bin/gccgo47
$ go install -compiler gccgo47 test01 && bin/test01
invalid value "gccgo47" for flag -compiler: unknown compiler "gccgo47"
usage: install [build flags] [packages]
(snip)

That is, the go(1) compiler driver couldn't recognize my GCCGO compiler
that I had installed with "./configure --program-suffix=47" (it was from GCC
4.7.)

Then I found out there were only two possible values for the "-compiler"
option:
http://golang.org/src/cmd/go/build.go

Do you think it's worthwhile to write a patch to allow an arbitrary name
as the value of the "-compiler" option, or to add an environment
variable to overwrite the name of the GCCGO compiler?

Of course I can use something like this for now...

$ cat ~/local/bin/gccgo
#!/bin/sh
gccgo47 "$@"
The -compiler option is probably misnamed. It should be called
-toolchain, and it only takes "gc" and "gccgo" as arguments. But
there is little benefit to changing it now.

On tip you can set the compiler to use for -compiler=gccgo by setting
the environment variable GCCGO. Or, as you suggest, you can use a
shell script.

Ian
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 13, '14 at 6:54a
activeAug 13, '14 at 3:23p
posts4
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase