From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodoros Foradis Subject: [PATCH v2 3/4] gnu: Add newlib-arm-none-eabi. Date: Mon, 19 Sep 2016 23:23:39 +0300 Message-ID: <20160919202340.4122-4-theodoros.for@openmailbox.org> References: <20160918063513.11027-1-rekado@elephly.net> <20160919202340.4122-1-theodoros.for@openmailbox.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm57z-0000r7-SH for guix-devel@gnu.org; Mon, 19 Sep 2016 16:25:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bm57w-0003XN-6c for guix-devel@gnu.org; Mon, 19 Sep 2016 16:25:23 -0400 Received: from smtp13.openmailbox.org ([62.4.1.47]:52215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm57v-0003Wv-T0 for guix-devel@gnu.org; Mon, 19 Sep 2016 16:25:20 -0400 In-Reply-To: <20160919202340.4122-1-theodoros.for@openmailbox.org> 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: rekado@elephly.net Cc: guix-devel@gnu.org * gnu/packages/embedded.scm (newlib-arm-none-eabi): New procedure. (newlib-nano-arm-none-eabi): New procedure. --- gnu/packages/embedded.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 56fbafb..29033b9 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -129,3 +129,62 @@ (cons (search-patch "gcc-6-cross-environment-variables.patch") (search-patches "gcc-6-arm-none-eabi-multilib.patch")))))))) + +(define (newlib-arm-none-eabi xgcc) + (package + (name "newlib") + (version "2.4.0") + (source (origin + (method url-fetch) + (uri (string-append "ftp://sourceware.org/pub/newlib/newlib-" + version ".tar.gz")) + (sha256 + (base32 + "01i7qllwicf05vsvh39qj7qp5fdifpvvky0x95hjq39mbqiksnsl")))) + (build-system gnu-build-system) + (arguments + `(#:out-of-source? #t + #:configure-flags '("--target=arm-none-eabi" + "--enable-newlib-io-long-long" + "--enable-newlib-register-fini" + "--disable-newlib-supplied-syscalls" + "--disable-nls") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-shell-shebangs + (lambda _ + (for-each patch-makefile-SHELL + (find-files "." "Makefile.in"))))))) + (native-inputs + `(("xbinutils" ,xbinutils-arm-none-eabi) + ("xgcc" ,xgcc) + ("texinfo" ,texinfo))) + (home-page "http://www.sourceware.org/newlib/") + (synopsis "C library for use on embedded systems") + (description "Newlib is a C library intended for use on embedded +systems. It is a conglomeration of several library parts that are easily +usable on embedded products.") + (license (license:non-copyleft + "https://www.sourceware.org/newlib/COPYING.NEWLIB")))) + +(define (newlib-nano-arm-none-eabi xgcc) + (package + (inherit (newlib-arm-none-eabi xgcc)) + (name "newlib-nano") + (arguments + (substitute-keyword-arguments (package-arguments (newlib-arm-none-eabi xgcc)) + ((#:configure-flags flags) + ``("--target=arm-none-eabi" + "--enable-multilib" + "--disable-newlib-supplied-syscalls" + "--enable-newlib-reent-small" + "--disable-newlib-fvwrite-in-streamio" + "--disable-newlib-fseek-optimization" + "--disable-newlib-wide-orient" + "--enable-newlib-nano-malloc" + "--disable-newlib-unbuf-stream-opt" + "--enable-lite-exit" + "--enable-newlib-global-atexit" + "--enable-newlib-nano-formatted-io" + "--disable-nls")))))) + -- 2.9.3