Reputation: 61
Well ,I sooooo flesh for the Golang . And I get a mission to recompile the Golang 's runtime via this blog.
One way is to change this default number in the GO runtime (GCC-GO or GC) and recompile the runtime. In proc.go, you can change the line sched.maxmcount = 10000 to a number that is appropriate.
I follow this Installing Go from source ,and execute this cmd:
./all.bash
Output is :
Building Go bootstrap tool.
cmd/dist
import cycle not allowed
package cmd/dist
imports bytes
imports errors
imports runtime
imports runtime/internal/atomic
imports unsafe
imports runtime
It seems everything work well, but while I check about the go
cmd,it's the same. Also ,I can't find any change to bin or pkg dir.
go install src/runtime
Also, it doesn't come out any error and I can't find any target build.
I have no any idea how to do it :(
Any suggestion well so appresiate !
Upvotes: 2
Views: 2648
Reputation: 109442
You install packages by their import path, so you don't use the src/
prefix.
To recompile the runtime package, use:
$ go install -a -v runtime
runtime/internal/sys
runtime/internal/atomic
runtime
Upvotes: 2