Skip to content

Makefile updates to use any valid ARM toolchain

Alex requested to merge branch/makefile-updates into branch/unified

Cherry-picked from qemu branch.

Should accept any arm-none-eabi-gcc, as long as it's in PATH, without any Makefile changes.

Optionally, you may use a different toolchain that doesn't have to be in PATH. If desired, it should be declared as PREFERRED_ARM_PATH in Makefile.user.

Linaro's arm-eabi-gcc should also work, with minimal tweaking.

Defaults to PREFERRED_ARM_PATH=~/gcc-arm-none-eabi-5_4-2016q3 if installed, otherwise it uses whatever is in PATH (and autodetects ARM_LIBGCC_PATH by running $(CC) --print-search-dirs).

Tested:

  • gcc-arm-none-eabi-5_4-2016q3 from https://launchpad.net/gcc-arm-embedded (installed to home directory) - openSUSE Tumbleweed, Ubuntu Xenial and Artful (todo: WSL)
  • Ubuntu's gcc-arm-none-eabi package on Xenial (gcc 4.9.x; no Makefile changes needed)
  • Ubuntu: gcc-arm-embedded and gcc-arm-embedded:i386 from ppa:team-gcc-arm-embedded/ppa on Xenial (gcc 6.x, both 64- and 32-bit toolchains, no Makefile changes needed)
  • Linaro's bare metal toolchain (arm-eabi-gcc), tested on openSUSE with minimal Makefile.user tweaking:
ARM_ABI=eabi
PREFERRED_ARM_PATH=~/gcc-linaro-7.1.1-2017.08-i686_arm-eabi

Finally, if no valid toolchain is installed, typing "make" to build ML should print a diagnostic message and some toolchain recommendations.

TODO: create animations like these on all major operating systems (virtual machines), to make sure ML build environment can be set up without much trouble. Time-consuming; help welcome.

The main question: does this break anyone's build environment?

Merge request reports