SmaliYu
V2EX  ›  GCC

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

  •  
  •   SmaliYu · Dec 1, 2020 · 3178 views
    This topic created in 2187 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
    StanLin
    Dec 1, 2020
    1
    If it's still an ELF file, how possibly can you get rid of the ld library itself?
    julyclyde
    julyclyde
    Dec 1, 2020
    2
    首先 gcc 就不是“一个”可执行文件
    所以你的目标是不能简单实现的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1104 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 18:30 · PVG 02:30 · LAX 10:30 · JFK 13:30
    ♥ Do have faith in what you're doing.