V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
SmaliYu
V2EX  ›  GCC

请问如何将 GCC 编译成一个独立的可执行文件?

  •  
  •   SmaliYu · 2020-12-01 10:39:43 +08:00 · 1573 次点击
    这是一个创建于 1236 天前的主题,其中的信息可能已经有所发展或是发生改变。

    目前的 GCC 自己是一个可执行文件,编译过程会调用 cc1,as,ld,想问下,有没有用过配置 configure 编译成单独的一个 GCC 可执行文件,不依赖其他的 lib 库和可执行文件?

    2 条回复    2020-12-01 13:08:31 +08:00
    StanLin
        1
    StanLin  
       2020-12-01 10:57:05 +08:00
    If it's still an ELF file, how possibly can you get rid of the ld library itself?
    julyclyde
        2
    julyclyde  
       2020-12-01 13:08:31 +08:00
    首先 gcc 就不是“一个”可执行文件
    所以你的目标是不能简单实现的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2622 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 11:06 · PVG 19:06 · LAX 04:06 · JFK 07:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.