dtr32221 2016-10-21 09:10
浏览 397
已采纳

Golang运行时重新编译

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.

First: recompile the whole golang.

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.

Then ,try to build pkg

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 !

  • 写回答

1条回答 默认 最新

  • dsk49208 2016-10-21 17:20
    关注

    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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容