How to cross compile from Mac OS X to Linux x86?

后端 未结 5 961
眼角桃花
眼角桃花 2020-11-29 05:27

I\'m running Mac OS X 10.5.8 and want to compile for target CentOS 5.3 with GCC 4.1.2. How could I:

  1. Compile GCC 4.1.2 toolchain and related tools?
  2. Use
5条回答
  •  星月不相逢
    2020-11-29 05:53

    I struggled to get crosstool-ng to build on OSX 10.9 for x86_64 Linux. I used the very helpful post on how to build a gcc cross-compiler by Jeff Preshing and his script here as the basis for a script that worked for me. His script in the link doesn't work when compiling glibc on my version of OSX (which seems to be a very common complaint for those cross-compiling from OSX to Linux).

    My script is here: https://github.com/johnlondon/Cross-compile-toolchain-for-linux-on-OSX

提交回复
热议问题