From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodoros Foradis Subject: [PATCH v2 0/1] Add GCC cross compiler for arm-none-eabi. Date: Tue, 20 Sep 2016 13:50:11 +0300 Message-ID: <20160920105015.1783-1-theodoros.for@openmailbox.org> References: <20160918063513.11027-1-rekado@elephly.net> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmIeI-0005eT-US for guix-devel@gnu.org; Tue, 20 Sep 2016 06:51:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmIeE-0005WR-5A for guix-devel@gnu.org; Tue, 20 Sep 2016 06:51:38 -0400 Received: from smtp9.openmailbox.org ([62.4.1.43]:33406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmIeD-0005Uh-Qt for guix-devel@gnu.org; Tue, 20 Sep 2016 06:51:34 -0400 In-Reply-To: <20160918063513.11027-1-rekado@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Hello Guix and Ricardo, The original patch series was working correctly and producing working binaries. There were some path issues, which I mention later. Some features and flags (present in 6.2.0) are missing from that version of GCC 4.9, so I added GCC 6.2.0 as an extra option. Here are the modifications to Ricardo's patches for the arm-none-eabi bare metal cross compiler: - Cross-binutils is modified to use binutils 2.5.1, that cross-base provides, as it is producing working binaries. The version of binutils from the svn commit that was used by Ricardo is compiling correct binaries as well. Thus, if it is deemed appropriate, the source for xbinutils can be swapped for the previous one, with (seemingly) no difference. - The cross-gcc of the original, was failing to find the newlib-provided headers in my system. I have set the native-cross-paths as a workaround. Not sure if there is a better alternative, or if that behavior is my mistake. - A package for cross GCC 6.2.0 is added, with appropriate patches for multilib support, taken from the arch linux version of the package. - Newlib-arm-none-eabi and newlib-nano-arm-none-eabi have been changed to procedures, taking a cross-gcc as an argument, so as to facilitate building with either version of gcc. - An arm-none-eabi-toolchain procedure is declared, to create toolchain packages for both gcc and newlib versions. The four toolchain variables follow. Not sure if it's a mistake to include "nano" in the toolchain version. This is the first patch that I send in guix-devel, so please bear with my mistakes. Regards, Theodoros Foradis * gnu: Add arm-none-eabi-toolchain. * gnu: Add newlib-arm-none-eabi. * gnu: Add arm-none-eabi-gcc-6 and patches. * gnu: Add arm-none-eabi cross compiler. gnu/local.mk | 1 + gnu/packages/bootstrap.scm | 1 + gnu/packages/embedded.scm | 226 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ gnu/packages/patches/gcc-6-cross-environment-variables.patch | 65 +++++++++++++++++++ 5 files changed, 494 insertions(+) create mode 100644 gnu/packages/embedded.scm create mode 100644 gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch create mode 100644 gnu/packages/patches/gcc-6-cross-environment-variables.patch