- Кросскомпиляция под ARM
- Вводная
- Инструменты
- Элементарная технология кросскомпиляции
- Linaro Releases
- The Linaro Binary Toolchain
- Host Requirements
- Package Versions
- NEWS for GCC 7 (as of Linaro GCC 7.5-2019.12)
- GNU-A Downloads
- Downloads
- GNU Toolchain for the A-profile Architecture
- Version 10.3-2021.07
- What’s new in 10.3-2021.07
- In this release
- Windows (mingw-w64-i686) hosted cross compilers
- x86_64 Linux hosted cross compilers
- AArch64 Linux hosted cross compilers
- Sources
- Release Note for GNU Toolchain for the A-profile Architecture 10.3-2021.07
- Description
- Features
- Changes since Arm release GCC 10.2-2020.11
- Content
- Known dependencies
- The GNU Toolchains
- Released files
- Installation instructions
- Known issues
- Ask questions
- Report bugs
- What’s new in 10.2-2020.11
- In this release
- Windows (mingw-w64-i686) hosted cross compilers
- x86_64 Linux hosted cross compilers
- AArch64 Linux hosted cross compilers
- Sources
- Linaro ABE example manifest files for x86_64 hosted cross compilers
- Release Note for GNU Toolchain for the A-profile Architecture 10.2-2020.11
- Description
- Features
- Changes since Arm release GCC 9.2-2019.12
- Content
- Known dependencies
- The GNU Toolchains
- Host requirements
- Released files
- Installation instructions
- How to build the toolchain from sources
- Instructions
- Known issues
- Ask questions
- Report bugs
Кросскомпиляция под ARM
Достаточно давно хотел освоить сабж, но всё были другие более приоритетные дела. И вот настала очередь кросскомпиляции.
В данном посте будут описаны:
- Инструменты
- Элементарная технология кросскомпиляции
- И, собственно, HOW2
Кому это интересно, прошу под кат.
Вводная
Одно из развивающихся направлений в современном IT это IoT. Развивается это направление достаточно быстро, всё время выходят всякие крутые штуки (типа кроссовок со встроенным трекером или кроссовки, которые могут указывать направление, куда идти (специально для слепых людей)). Основная масса этих устройств представляют собой что-то типа «блютуз лампочки», но оставшаяся часть являет собой сложные процессорные системы, которые собирают данные и управляют этим огромным разнообразием всяких умных штучек. Эти сложные системы, как правило, представляют собой одноплатные компьютеры, такие как Raspberry Pi, Odroid, Orange Pi и т.п. На них запускается Linux и пишется прикладной софт. В основном, используют скриптовые языки и Java. Но бывают приложения, когда необходима высокая производительность, и здесь, естественно, требуются C и C++. К примеру, может потребоваться добавить что-то специфичное в ядро или, как можно быстрее, высчитать БПФ. Вот тут-то и нужна кросскомпиляция.
Если проект не очень большой, то его можно собирать и отлаживать прямо на целевой платформе. А если проект достаточно велик, то компиляция на целевой платформе будет затруднительна из-за временных издержек. К примеру, попробуйте собрать Boost на Raspberry Pi. Думаю, ожидание сборки будет продолжительным, а если ещё и ошибки какие всплывут, то это может занять ох как много времени.
Поэтому лучше собирать на хосте. В моём случае, это i5 с 4ГБ ОЗУ, Fedora 24.
Инструменты
Для кросскомпиляции под ARM требуются toolchain и эмулятор платформы либо реальная целевая платформа.
Т.к. меня интересует компиляция для ARM, то использоваться будет и соответствующий toolchain.
Toolchain’ы делятся на несколько типов или триплетов. Триплет обычно состоит из трёх частей: целевой процессор, vendor и OS, vendor зачастую опускается.
- *-none-eabi — это toolchain для компиляции проекта работающего в bare metal.
- *eabi — это toolchain для компиляции проекта работающего в какой-либо ОС. В моём случае, это Linux.
- *eabihf — это почти то же самое, что и eabi, с разницей в реализации ABI вызова функций с плавающей точкой. hf — расшифровывается как hard float.
Описанное выше справедливо для gcc и сделанных на его базе toolchain’ах.
Сперва я пытался использовать toolchain’ы, которые лежат в репах Fedora 24. Но был неприятно удивлён этим:
Поискав, наткнулся на toolchain от компании Linaro. И он меня вполне устроил.
Второй инструмент- это QEMU. Я буду использовать его, т.к. мой Odroid-C1+ пал смертью храбрых (нагнулся контроллер SD карты). Но я таки успел с ним чуток поработать, что не может не радовать.
Элементарная технология кросскомпиляции
Собственно, ничего необычного в этом нет. Просто используется toolchain в роли компилятора. А стандартные библиотеки поставляются вместе с toolchain’ом.
Выглядит это так:
Какие ключи у toolchain’а можно посмотреть на сайте gnu, в соответствующем разделе.
Для начала нужно запустить эмуляцию с интересующей платформой. Я решил съэмулировать Cortex-A9.
После нескольких неудачных попыток наткнулся на этот how2, который оказался вполне вменяемым, на мой взгляд.
Ну сперва, само собою, нужно заиметь QEMU. Установил я его из стандартных репов Fedor’ы.
Далее создаём образ жёсткого диска, на который будет установлен Debian.
По этой ссылке скачал vmlinuz и initrd и запустил их в эмуляции.
Далее просто устанавливаем Debian на наш образ жёсткого диска (у меня ушло
После установки нужно вынуть из образа жёсткого диска vmlinuz и initrd. Делал я это по описанию отсюда.
Сперва узнаём смещение, где расположен раздел с нужными нам файлами:
Теперь по этому смещению примонтируем нужный нам раздел.
Копируем файлы vmlinuz и initrd и размонтируем жёсткий диск.
Теперь можно запустить эмуляцию.
И вот заветное приглашение:
Теперь с хоста по SSH можно подцепиться к симуляции.
Теперь можно и собрать программку. По Makefile’у ясно, что будет калькулятор. Простенький.
Собираем на хосте исполняемый файл.
Отмечу, что проще собрать с ключом -static, если нет особого желания предаваться плотским утехам с библиотеками на целевой платформе.
Копируем исполняемый файл на таргет и проверяем.
Собственно, вот такая она, эта кросскомпиляция.
UPD: Подправил информацию по toolchain’ам по комментарию grossws.
Источник
Linaro Releases
Name | Last modified | Size | License |
---|---|---|---|
| Parent Directory | ||
| aarch64-elf | — | |
| aarch64-linux-gnu | — | |
| aarch64_be-elf | — | |
| aarch64_be-linux-gnu | — | |
| arm-eabi | — | |
| arm-linux-gnueabi | — | |
| arm-linux-gnueabihf | — | |
| armeb-eabi | — | |
| armeb-linux-gnueabi | — | |
| armeb-linux-gnueabihf | — | |
| armv8l-linux-gnueabihf | — |
The Linaro Binary Toolchain
The Linaro GCC 7.5-2019.12 Release is now available.
Notice: GCC 7.1 ABI change for arm*-*-* targets, and note for aarch64*-*-* targets
From GCC 7.1 release notes:
On ARM targets (arm*-*-*), a bug introduced in GCC 5 that affects conformance to the procedure call standard ( AAPCS ) has been fixed. The bug affects some C++ code where class objects are passed by value to functions and could result in incorrect or inconsistent code being generated. This is an ABI change. If the option -Wpsabi is enabled (on by default) the compiler will emit a diagnostic note for code that might be affected.
GCC 5 and GCC 6 releases will continue to be affected by the ABI bug, since changing ABI in these releases is not practical. A warning enabled by -Wpsabi option was added to GCC 5 and GCC 6 toolchains to diagnose codebases that might be affected by the ABI bug.
Additionally, this same bug was present in AArch64 backend in development versions of GCC 7. There was no releases of GCC with this bug present in AArch64 backend, therefore the release notes does not mention this. However, be advised that any code bases built with development versions of GCC 7 need to be recompiled with released version of GCC 7 to conform to ABI .
For an explanation of GCC 7 series changes please see the following website:
For help in porting to GCC 7 please see the following explanation:
Download release packages from:
Previous snapshots and release-candidates are at:
Previous releases are at:
A description of the arm and AArch64 target triples can be found at:
Host Requirements
Linaro officially supports the current and previous Ubuntu LTS releases (as of the time of this release). This does not mean that the toolchain will not work on other/older Linux distributions. See the following for the life-time of Ubuntu LTS releases.
The host system upon which the cross-compiler will run requires a minimum of glibc 2.14, because of API changes to glibc’s memcpy API .
Package Versions
Linaro GCC 7.5-2019.12
FSF glibc 2.25 (release/2.25)
Newlib 2.5 (newlib-2_5_0 tag)
GNU Binutils 2.28 (users/linaro/binutils-2_28-branch)
FSF GDB 8.3 (gdb-8.3-branch)
Linaro toolchain package git branches are hosted at:
NEWS for GCC 7 (as of Linaro GCC 7.5-2019.12)
- Runtest and gdbserver are no longer installed in the toolchain bin/ directory. Binary releases no longer include runtest at all, and gdbserver is a target tool; it is now shipped in the sysroot under usr/bin/.
LDTS case #2211: gdbserver and runtest in GCC binary release are in the wrong place or have the wrong name
- Gdbserver is no longer linked statically, because this is currently unsupported.
Linaro bugzilla #3344: gdbserver broken in Linaro 2017.02
- The Linaro GCC 7.4-2019.01 snapshot added a fix for Linaro bug 4007: “Internal compiler error with -mcpu=thunderx2t99”.
- The Linaro GCC 7.2-2017.09 snapshot added float and integer moves improvement for AArch64 targets.
- The Linaro GCC 7.1-2017.07 snapshot added prefetching configuration improvement for AArch64 targets and laid groundwork to enabling prefetching in more cases.
- Previous MinGW hosted version of Linaro GCC C preprocessor failed to convert character set used for string, character constants, etc. This is fixed in this release.
Linaro bugzilla #3040 : CC1 and cc1plus cannot convert UTF -8.
- Performance related backports from the following snapshots have been included: Linaro GCC 7.1-2017.05, Linaro GCC 7.1-2017.06, Linaro GCC 7.1-2017.07, Linaro GCC 7.2-2017.08, Linaro GCC 7.2-2017.09, Linaro GCC 7.2-2017.10, Linaro GCC 7.2-2018.04, Linaro GCC 7.4-2019.01 and Linaro GCC 7.5-2019.11.
Источник
GNU-A Downloads
October 19-21, 2021
Learn to write fast and run fast on Arm
Downloads
The GNU Toolchain for the Cortex-A Family is a ready-to-use, open source suite of tools for C, C++ and Assembly programming. This toolchain targets processors from the Arm Cortex-A family and implements the Arm A-profile architecture.
The toolchain includes the GNU Compiler (GCC) and is available free of charge directly for Windows and Linux operating systems. Follow the links on this page to download the correct version for your development environment.
See the downloaded package Release Notes, which are linked from this page, for full installation instructions.
GNU Toolchain for the A-profile Architecture
Version 10.3-2021.07
Released: July 29, 2021
What’s new in 10.3-2021.07
We are pleased to announce the Arm release of the pre-built GNU cross-toolchain for the A-profile cores: GCC 10.3-2021.07.
This is the same toolchain that was previously distributed by Linaro.
For more information about the GNU Arm toolchain and download the release packages, please go to the Arm Developer website.
In this release
Windows (mingw-w64-i686) hosted cross compilers
AArch32 bare-metal target (arm-none-eabi)
AArch32 target with hard float (arm-none-linux-gnueabihf)
AArch64 bare-metal target (aarch64-none-elf)
AArch64 GNU/Linux target (aarch64-none-linux-gnu)
x86_64 Linux hosted cross compilers
AArch32 bare-metal target (arm-none-eabi)
AArch32 target with hard float (arm-linux-none-gnueabihf)
AArch64 ELF bare-metal target (aarch64-none-elf)
AArch64 GNU/Linux target (aarch64-none-linux-gnu)
AArch64 GNU/Linux target (aarch64_be-none-linux-gnu)
AArch64 Linux hosted cross compilers
AArch32 bare-metal target (arm-none-eabi)
AArch32 target with hard float (arm-none-linux-gnueabihf)
AArch64 ELF bare-metal target (aarch64-none-elf)
Sources
Release Note for GNU Toolchain for the A-profile Architecture 10.3-2021.07
Description
GNU 10.3 cross-toolchain for the A-profile processors
Features
- Based on GCC 10.3 (See https://gcc.gnu.org/gcc-10/changes.html for details).
- Supported targets on Windows(x86_64): AArch64 (bare-metal and Linux), AArch32 (bare-metal, Linux hard-float)
- Supported targets on Linux(x86_64): AArch64 (bare-metal, Linux, Linux big-endian), AArch32 (bare-metal, Linux hard-float)
- Supported targets on Linux(AArch64): AArch64 (bare-metal), AArch32 (bare-metal, Linux hard-float)
Changes since Arm release GCC 10.2-2020.11
- Bumped binutils to version 2.36.1.
- Bumped glibc to version 2.33.
- Bumped newlib to a version from May 2021.
The toolchain executables for Windows host are signed with SHA2.
Fixed issue https://sourceware.org/bugzilla/show_bug.cgi?id=25235 where forward-referencing ADR instructions were generating wrong offsets in Thumb code.
Fixed issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95253 where the toolchain on Windows host generated incorrect paths in the output dependency file.
Fixed issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97236 where wrong code might be generated for Aarch64 targets when using -O3 optimization.
Fixed an issue where files opened in binary mode on AArch64 might be incorrectly handled.
Content
This release includes the following items:
Sources provided in release source tar ball.
GDB-with-python support for Python 2.7.6 (x86_64 builds).
GDB-with-python support for Python 2.7.13 (mingw-w64-i686 builds).
libgmp 4.3.2
libisl 0.15
libmpfr 3.1.6
libmpc 1.0.3
libiconv 1.15
Sources provided in release source tar ball.
Known dependencies
GDB’s Python support requires Python compiled with UCS-4 support (built with —enable-unicode=ucs4) for Linux (x86_64) and Windows hosts
GDB’s Python support requires Python DLL dependencies for Windows host.
Toolchains dedicated for Windows host require mingw-w64 library, a complete runtime environment for GCC.
The following executables in the Windows hosted toolchains:
have additional dependencies on the following dlls:
- libwinpthread-1.dll
- libgcc_s_sjlj-1.dll
- libstdc++-6.dll
- libgcc_s_dw2-1.dll
You can obtain the required dlls from the MinGW-W64 GCC-8.1.0 packages from SourceForge:
The GNU Toolchains
The package names of the released GNU toolchain binaries have the following naming convention:
Toolchain Package Name | Host OS | Target Description |
---|---|---|
gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf.tar.xz | AArch64 Linux | AArch64 ELF bare-metal target. |
gcc-arm-10.3-2021.07-aarch64 -arm-none-eabi.tar.xz | AArch64 Linux | AArch32 bare-metal target. |
gcc-arm-10.3-2021.07-aarch64 -arm-none-linux-gnueabihf.tar.xz | AArch64 Linux | AArch32 GNU/Linux target with hard float. |
gcc-arm-10.3-2021.07- mingw-w64-i686-arm-none-eabi.tar.xz | Windows | AArch32 bare-metal target. |
gcc-arm-10.3-2021.07- mingw-w64-i686-aarch64-none-elf.tar.xz | Windows | AArch64 ELF bare-metal target. |
gcc-arm-10.3-2021.07- mingw-w64-i686- arm-none-linux-gnueabihf.tar.xz | Windows | AArch32 GNU/Linux target with hard float. |
gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-linux-gnu.tar.xz | Windows | AArch64 GNU/Linux target. |
gcc-arm-10.3-2021.07- x86_64-aarch64-none-elf.tar.xz | x86_64 Linux | AArch64 ELF bare-metal target. |
gcc-arm-10.3-2021.07- x86_64-aarch64-none-linux-gnu.tar.xz | x86_64 Linux | AArch64 GNU/Linux target. |
gcc-arm-10.3-2021.07- x86_64-aarch64_be-none-linux-gnu.tar.xz | x86_64 Linux | AArch64 GNU/Linux big-endian target. |
gcc-arm-10.3-2021.07- x86_64-arm-none-eabi.tar.xz | x86_64 Linux | AArch32 bare-metal target. |
gcc-arm-10.3-2021.07- x86_64-arm-none-linux-gnueabihf.tar.xz | x86_64 Linux | AArch32 GNU/Linux target with hard float. |
Description | Requirement | Host OS identifier in the toolchain package name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Linux on 64-bit Arm (AArch64) | aarch64 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Windows on 64-bit x86 (x86_64) | Windows 10 | mingw-w64-i686 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
gcc-arm-*.tar.xz | Toolchain binaries |
gcc-arm-src-snapshot-*.tar.xz | Toolchain sources |
gcc-arm-src-snapshot-*-manifest.txt | Text manifest file with list of remote repositories for toolchain |
gcc-arm-*-abe-manifest.txt | Input files for Linaro ABE build system. |
*.asc | MD5 checksum files for sources and binaries |
Installation instructions
Extract XZ compressed release archive using TAR archiving utility:
Compute and check MD5 checksum of XZ compressed release archives using md5sum utility:
The prebuilt binary bundles can be un-tarred and executed in place. Unpack the Linux cross toolchain:
Known issues
When you decompress the windows packages, the decompression requests permission to overwrite certain files. This is because the files have similar names with different case, which are treated as identical names on a Windows host. You can choose to overwrite the files with identical names.
When using the toolchains dedicated for the Windows host, if you invoke the compiler from the installed toolchain’s bin directory and you use the -flto option without using the -c option, then the linker generates this error message:
error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
To avoid this error message, you must invoke the compiler from any directory other than the installed toolchain’s bin directory.
Ask questions
Report bugs
What’s new in 10.2-2020.11
We are pleased to announce the Arm release of the pre-built GNU cross-toolchain for the A-profile cores: GCC 10.2-2020.11.
This is the same toolchain that was previously distributed by Linaro.
For more information about the GNU Arm toolchain and download the release packages, please go to the Arm Developer website.
In this release
Windows (mingw-w64-i686) hosted cross compilers
AArch32 bare-metal target (arm-none-eabi)
AArch32 target with hard float (arm-none-linux-gnueabihf)
AArch64 bare-metal target (aarch64-none-elf)
AArch64 GNU/Linux target (aarch64-none-linux-gnu)
x86_64 Linux hosted cross compilers
AArch32 bare-metal target (arm-none-eabi)
AArch32 target with hard float (arm-linux-none-gnueabihf)
AArch64 ELF bare-metal target (aarch64-none-elf)
AArch64 GNU/Linux target (aarch64-none-linux-gnu)
AArch64 GNU/Linux target (aarch64_be-none-linux-gnu)
AArch64 Linux hosted cross compilers
AArch32 bare-metal target (arm-none-eabi)
AArch32 target with hard float (arm-none-linux-gnueabihf)
AArch64 ELF bare-metal target (aarch64-none-elf)
Sources
Linaro ABE example manifest files for x86_64 hosted cross compilers
Release Note for GNU Toolchain for the A-profile Architecture 10.2-2020.11
Description
GNU 10.2 cross-toolchain for the A-profile processors
Features
- Based on GCC 10.2 (See https://gcc.gnu.org/gcc-10/changes.html for details).
- Supported targets on Windows(x86_64): AArch64 (bare-metal and Linux), AArch32 (bare-metal, Linux hard-float).
- Supported targets on Linux(x86_64): AArch64 (bare-metal, Linux, Linux big-endian), AArch32 (bare-metal, Linux hard-float).
- Supported targets on Linux(AArch64): AArch64 (bare-metal), AArch32 (bare-metal, Linux hard-float).
Changes since Arm release GCC 9.2-2019.12
- Added support for Arm Neoverse V1.
- Fixed issue where the compiler was generating a conditional branch in Thumb2, which was too far for b
to handle. - Fixed issue where assembling code containing the UDF instruction results in «unknown mnemonic error» when targeting the AArch64 platform.
- Fixed issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96191, where the -fstack-protector option was leaving the canary value in a temporary register on return from the function.
Content
This release includes the following items:
GCC 10.2.1 | Repository: git://gcc.gnu.org/git/gcc.git Revision: 3b91aab15443ee150b2ba314a4b26645ce8d713b Release note Sources provided in release source tar ball. |
glibc 2.31 | Repository: git://sourceware.org/git/glibc.git Revision: 8dc76056654f8013a54678461fb023e988a17256 Release note |
binutils 2.35.1 | Repository: git://sourceware.org/git/binutils-gdb.git Revision: d9a444bca66bf4b0d328acb547ca114081f3fd87 Release note |
GDB 10.1 | Repository: git://sourceware.org/git/binutils-gdb.git Revision: f3fb4a77f29a99ffa2e1460dfa652081cdbd38be GDB-with-python support for Python 2.7.6 (x86_64 builds). GDB-with-python support for Python 2.7.13 (mingw-w64-i686 builds). Release note |
libexpat 2.2.5 | Repository: https://github.com/libexpat/libexpat.git Revision: Release note |
Linux Kernel | Repository: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Revision: v4.20.13 Release Note |
libgmp 4.3.2 libisl 0.15 libmpfr 3.1.6 libmpc 1.0.3 libiconv 1.15 | Sources provided in release source tar ball. |
Known dependencies
- GDB’s Python support requires Python compiled with UCS-4 support (built with —enable-unicode=ucs4) for Linux (x86_64) and Windows hosts.
- GDB’s Python support requires Python DLL dependencies for Windows host.
- Toolchains dedicated for Windows host require mingw-w64 library, a complete runtime environment for GCC.
- The following executables in the Windows hosted toolchains:
— aarch64-none-linux-gnu-dwp.exe
— aarch64-none-linux-gnu-ld.gold.exe
— arm-none-linux-gnueabihf-dwp
— arm-none-linux-gnueabihf-ld.gold.exe
have additional dependencies on the following dlls:
— libwinpthread-1.dll
— libgcc_s_sjlj-1.dll
— libstdc++-6.dll
— libgcc_s_dw2-1.dll
You can obtain the required dlls from the MinGW-W64 GCC-8.1.0 packages from SourceForge:
— i686-posix-sjlj
— i686-posix-dwarf
The GNU Toolchains
The package names of the released GNU toolchain binaries have the following naming convention:
Toolchain Package Name | Host OS | Target Description |
gcc-arm-10.2-2020.11-aarch64-aarch64-none-elf.tar.xz | AArch64 Linux | AArch64 ELF bare-metal target. |
gcc-arm-10.2-2020.11-aarch64-arm-none-eabi.tar.xz | AArch64 Linux | AArch32 bare-metal target. |
gcc-arm-10.2-2020.11-aarch64-arm-none-linux-gnueabihf.tar.xz | AArch64 Linux | AArch32 target with hard float. |
gcc-arm-10.2-2020.11-mingw-w64-i686-arm-none-eabi.tar.xz | Windows | AArch32 bare-metal target. |
gcc-arm-10.2-2020.11-mingw-w64-i686-aarch64-none-elf.tar.xz | Windows | AArch64 ELF bare-metal target. |
gcc-arm-10.2-2020.11-mingw-w64-i686-arm-none-linux-gnueabihf.tar.xz | Windows | AArch32 target with hard float. |
gcc-arm-10.2-2020.11-mingw-w64-i686-aarch64-none-linux-gnu.tar.xz | Windows | AArch64 GNU/Linux target. |
gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz | x86_64 Linux | AArch64 ELF bare-metal target. |
gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz | x86_64 Linux | AArch64 GNU/Linux target. |
gcc-arm-10.2-2020.11-x86_64-aarch64_be-none-linux-gnu.tar.xz | x86_64 Linux | AArch64 GNU/Linux big-endian target. |
gcc-arm-10.2-2020.11-x86_64-arm-none-eabi.tar.xz | x86_64 Linux | AArch32 bare-metal target. |
gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz | x86_64 Linux | AArch32 target with hard float. |
Host requirements
Description | Requirement | Host OS identifier in the toolchain package name |
Linux on 64-bit Arm (AArch64) | Ubuntu 18.04 LTS or later RHEL 8 or later |
Released files
gcc-arm-*.tar.xz | Toolchain binaries |
gcc-arm-src-snapshot-*.tar.xz | Toolchain sources |
gcc-arm-src-snapshot-*-manifest.txt | Text manifest file with list of remote repositories for toolchain |
gcc-arm-*-abe-manifest.txt | Input files for Linaro ABE build system. |
*.asc | MD5 checksum files for sources and binaries |
Installation instructions
Extract XZ compressed release archive using TAR archiving utility:
Example for Linux(x86_64) hosted for AArch64 Linux target
Compute and check MD5 checksum of XZ compressed release archives using md5sum utility:
The prebuilt binary bundles can be un-tarred and executed in place. Unpack the Linux cross toolchain:
How to build the toolchain from sources
You can build GNU cross-toolchain for the A-profile from sources using Linaro ABE (Advanced Build Environment) and provided ABE manifest files.
Below example shows how to build gcc-arm-aarch64-linux-gnu toolchain from sources using Linaro ABE build system.
Instructions
ABE has a dependency on git-new-workdir and needs this tool to be installed in /usr/local/bin directory:
Clone ABE from the URL below and checkout the stable branch (see Getting ABE):
Create the build directory and change to it. Any name for the directory will work:
Configure ABE (from the build directory):
Download the toolchain manifest file from the GNU Arm toolchain page on developer.arm.com, for example: gcc-arm-aarch64-none-elf-abe-manifest.txt.
Build toolchain (from the build directory):
The built toolchain will be installed and available for use in the builds/destdir/x86_64-unknown-linux-gnu/bin/ directory.
Known issues
- When you decompress the windows packages, the decompression requests permission to overwrite certain files. This is because the files have similar names with different case, which are treated as identical names on a Windows host. You can choose to overwrite the files with identical names.
- When using the toolchains dedicated for the Windows host, if you invoke the compiler from the installed toolchain’s bin directory and you use the -flto option without using the -c option, then the linker generates this error message: To avoid this error message, you must invoke the compiler from any directory other than the installed toolchain’s bin directory.
Ask questions
For any questions, please use the Arm Communities forums.
Report bugs
Please report any bugs via the Linaro Bugzilla.
Источник