SmaliYu
V2EX  ›  GCC

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

  •  
  •   SmaliYu · Dec 1, 2020 · 2708 views
    This topic created in 2013 days ago, the information mentioned may be changed or developed.

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

    2 replies    2020-12-01 13:08:31 +08:00
    StanLin
        1
    StanLin  
       Dec 1, 2020
    If it's still an ELF file, how possibly can you get rid of the ld library itself?
    julyclyde
        2
    julyclyde  
       Dec 1, 2020
    首先 gcc 就不是“一个”可执行文件
    所以你的目标是不能简单实现的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2597 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 10:47 · PVG 18:47 · LAX 03:47 · JFK 06:47
    ♥ Do have faith in what you're doing.