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 calledI 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 "$@"
-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.