From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH] gnu: avr: Use the correct gcc version as native-input. This makes crtatmega32u4.o etc appear in the output. Date: Mon, 15 Aug 2016 12:45:28 +0200 Message-ID: <20160815104528.31090-1-dannym@scratchpost.org> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.9.1" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZFOp-0006kA-VG for guix-devel@gnu.org; Mon, 15 Aug 2016 06:45:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZFOm-0005rN-Mn for guix-devel@gnu.org; Mon, 15 Aug 2016 06:45:43 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:41052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZFOm-0005qN-Bv for guix-devel@gnu.org; Mon, 15 Aug 2016 06:45:40 -0400 In-Reply-To: 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 This is a multi-part message in MIME format. --------------2.9.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: quoted-printable See also , . The easy fix would have been to pass "--enable-device-lib" to libc's conf= igure. The right fix: use the right gcc as native input. * gnu/packages/avr.scm (avr-libc): Replace package by function. * gnu/packages/avr.scm (avr-toolchain): Use new avr-libc function. --- gnu/packages/avr.scm | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) --------------2.9.1 Content-Type: text/x-patch; name="0001-gnu-avr-Use-the-correct-gcc-version-as-native-input..patch" Content-Disposition: attachment; filename="0001-gnu-avr-Use-the-correct-gcc-version-as-native-input..patch" Content-Transfer-Encoding: quoted-printable diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm index 9873477..fd18ff6 100644 --- a/gnu/packages/avr.scm +++ b/gnu/packages/avr.scm @@ -73,7 +73,7 @@ (version (package-version gcc-5)) (source (package-source gcc-5)))) =20 -(define-public avr-libc +(define (avr-libc avr-gcc) (package (name "avr-libc") (version "2.0.0") @@ -99,7 +99,7 @@ (unsetenv "C_INCLUDE_PATH") #t))))) (native-inputs `(("avr-binutils" ,avr-binutils) - ("avr-gcc" ,avr-gcc-4.9))) + ("avr-gcc" ,avr-gcc))) (home-page "http://www.nongnu.org/avr-libc/") (synopsis "The AVR C Library") (description @@ -109,24 +109,27 @@ for use with GCC on Atmel AVR microcontrollers.") (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt")= ))) =20 (define (avr-toolchain avr-gcc) - (package - (name "avr-toolchain") - (version (package-version avr-gcc)) - (source #f) - (build-system trivial-build-system) - (arguments '(#:builder (mkdir %output))) - (propagated-inputs - `(("avrdude" ,avrdude) - ("binutils" ,avr-binutils) - ("gcc" ,avr-gcc) - ("libc" ,avr-libc))) - (synopsis "Complete GCC tool chain for AVR microcontroller developme= nt") - (description "This package provides a complete GCC tool chain for AV= R + ;; avr-libc checks the compiler version and passes "--enable-device-li= b" for avr-gcc > 5.1.0. + ;; It wouldn't install the library for atmega32u4 etc if we didn't use= the corret avr-gcc. + (let ((avr-libc (avr-libc avr-gcc))) + (package + (name "avr-toolchain") + (version (package-version avr-gcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (mkdir %output))) + (propagated-inputs + `(("avrdude" ,avrdude) + ("binutils" ,avr-binutils) + ("gcc" ,avr-gcc) + ("libc" ,avr-libc))) + (synopsis "Complete GCC tool chain for AVR microcontroller develop= ment") + (description "This package provides a complete GCC tool chain for = AVR microcontroller development. This includes the GCC AVR cross compiler a= nd avrdude for firmware flashing. The supported programming languages are = C and C++.") - (home-page (package-home-page avr-libc)) - (license (package-license avr-gcc)))) + (home-page (package-home-page avr-libc)) + (license (package-license avr-gcc))))) =20 (define-public avr-toolchain-4.9 (avr-toolchain avr-gcc-4.9)) (define-public avr-toolchain-5 (avr-toolchain avr-gcc-5)) --------------2.9.1--