Skip to content

Script collection to build ready to use GCC 13.1.0 cross and/or native toolchains: C and C++ for all, (Fortran, ADA, D and GO for native compiler only). Cross targets: LM32, AVR, Motorola 68000 (m68k), (ARM in develop yet)

License

Notifications You must be signed in to change notification settings

UlrichBecker/gcc-toolchain-builder

Repository files navigation

Linux GCC 13.1.0 cross- and/or native- tool-chain for C and C++ (ADA, Fortran D and GO in native version only)

Scripts to build a linux-toolchain for:

  • the latticeMicro32 (LM32 soft-core processor), languages: C, C++
  • the Atmel Atmega Micro-controller series (AVR) e.g. for Arduino, languages: C, C++
  • the Motorola 68000 family (m68k), languages: C, C++
  • the native GCC compiler collection, languages: C, C++, ADA, Fortran, D, GO

Obtaining a ready to use cross or native tool chain in only 3 respectively 4 steps:

  1. Cloning this repository.
    git clone https://github.com/UlrichBecker/gcc-toolchain-builder.github

  2. Change in the following directory:
    cd gcc-toolchain-builder

  3. By default the toolchain will installed in the hidden directory
    ${HOME}/.local
    If you desire the toolchain in a other directory, so you have to initialize the shell variable PREFIX.
    E.g.:
    export PREFIX=/path/to/my/toolchain
    Otherwise you can omit this step.

  4. Invoke the shell-script for your desired tool-chain:
    ./build-lm32-toolchain.sh for building a LM32 tool-chain
    ./build-avr-toolchain.sh for building a AVR tool-chain
    ./build-m68k-toolchain.sh for building a Motorola 68000 tool-chain
    ./build-native-toolchain.sh for building a native tool-chain
    This will take about 45 minutes to more than three hours depending of your computer, internet connection, chosen tool chain and chosen languages.

After this three respectively four steps the new toolchain is ready to use.

Building a linux-toolchain for Linux-ARM devices is in develop yet.

Requirements

  • Commandline downloader "wget". (Type which wget to check whether it's installed.)
  • Tape archiver "tar". (Type which tar to check whether it's installed.)
  • Native GCC toolchain, respectively naive C/C++ compiler. (Type which gcc to check whether it's installed.)

NOTE

If you desire a other version of GCC or of its components, so you can change this in the file gcc_versions.conf. But in this case it could become to compatibility problems, so you have to spend time to try the best combination of versions.
Following link could help you finding the combination of correct versions: https://wiki.osdev.org/Building_GCC
If you have got trouble may be the following link could help you: https://wiki.osdev.org/GCC_Cross-Compiler

If you have installed the tool chain not in the standard directory e.g. /usr/bin/, and when you test the new tool chain so just actualize the environment variable PATH:
export PATH=/path/to/my/toolchain/bin:$PATH
If you'll test a native tool chain, so you also complete the environment variable LD_LIBRARY_PATH
lib64/path/to/my/toolchain/lib64:/path/to/my/toolchain/lib:$LD_LIBRARY_PATH
before you run a application compiled by these tool chain.

To reduce the likely of trouble building a cross tool chain I recommend to build a native tool chain at first
(with build-native-toolchain.sh) and build your desired cross tool chain by these native tool chain.

About

Script collection to build ready to use GCC 13.1.0 cross and/or native toolchains: C and C++ for all, (Fortran, ADA, D and GO for native compiler only). Cross targets: LM32, AVR, Motorola 68000 (m68k), (ARM in develop yet)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published