Cross-compilation for Raspberry Pi in GCC. Where to start?

后端 未结 8 1600
轮回少年
轮回少年 2020-12-12 14:09

TL/DR: Where can I find more information about building a GCC 4.7.0 cross-compiling toolchain for ARM (gnueabi) platform (intended to run on

相关标签:
8条回答
  • 2020-12-12 14:32

    You can try my open-sourced pre-built/pre-compiled GCC Cross & Native Compiler Binaries for Raspberry Pi from this up-to-date GitHub repository:

    This project contains the UpToDate set of Precompiled/Pre-Built Raspberry pi GCC Cross & Native Compilers Binaries, saving your tons of time(No compiling or Error Handling needed whatsoever). Just Extract, Link & Enjoy complete GCC(Raspberry Pi) functionality in your Machine. You can use its native compilers for Raspberry Pi(Can be used along with old & slow 6.3.0 GCC), Or use the Cross-Compiler in any Linux Machine(Tested on Latest Ubuntu/bionic x64) to compile programs for your Raspberry Pi. All these compilers binaries are Raspberry Pi hardware optimized for enhanced overall performance.

    Supported GCC Versions:

    • GCC 6.3.0
    • GCC 7.4.0
    • GCC 8.2.0
    • GCC 8.3.0

    Supported Raspberry Pis:

    • All Raspberry Pi versions/models are currently supported.
    • Any other ARM Devices with similar Hardware configurations may also work.

    Supported Environments:

    • Cross-Compiler: All Linux Distros (x32/x64) are currently supported.
    • Native-Compiler: All Raspberry Pi version/model with Raspbian OS is supported. Other OS may/may-not work.

    Supported Languages:

    • C++
    • C
    • Fortran
    0 讨论(0)
  • 2020-12-12 14:34

    I couldn't find a 4.7 gcc, only a 4.6. For information, I compiled the Pi's kernel on a fairly old Ubuntu machine (1Ghz, 768MB RAM) following the guidelines on this page: Kernel compilation

    The build took about 90 minutes, compared to the 6 hours it is suggested that it would take on the Pi. The kernel runs fine on the Pi. Perhaps you can adapt these guidelines for cross-compiling other projects on your x86 Linux machine.

    0 讨论(0)
提交回复
热议问题