SmaliYu
V2EX  ›  GCC

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

  •  
  •   SmaliYu · 2020년 12월 1일 · 2820 조회수
    2050일 지난 토픽입니다. 언급된 정보가 변경되었을 수 있습니다.

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

    2 답글    2020-12-01 13:08:31 +08:00
    StanLin
        1
    StanLin  
       2020년 12월 1일
    If it's still an ELF file, how possibly can you get rid of the ld library itself?
    julyclyde
        2
    julyclyde  
       2020년 12월 1일
    首先 gcc 就不是“一个”可执行文件
    所以你的目标是不能简单实现的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5814 온라인   최고 기록 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 02:06 · PVG 10:06 · LAX 19:06 · JFK 22:06
    ♥ Do have faith in what you're doing.