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

报告相同问题?

悬赏问题

  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services