unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39918] [PATCH 0/2] Update avr-gcc
@ 2020-03-04 20:02 Arun Isaac
  2020-03-04 20:09 ` [bug#39918] [PATCH 1/2] gnu: avr-gcc: Update to 7.4.0 Arun Isaac
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Arun Isaac @ 2020-03-04 20:02 UTC (permalink / raw)
  To: 39918; +Cc: dannym, Arun Isaac, ekaitz

Hi,

This patchset updates our avr-gcc to version 7, same as the version of gcc in
Guix. I have tentatively deleted other older versions of the avr-toolchain and
replaced our avr-libc and avr-toolchain functions with package variables. Do
we need to keep all older versions of the avr-toolchain? WDYT?

Regards,
Arun.

Arun Isaac (2):
  gnu: avr-gcc: Update to 7.4.0.
  gnu: avr-toolchain: Replace functions with package variables.

 gnu/packages/avr.scm | 67 +++++++++++++++-----------------------------
 1 file changed, 22 insertions(+), 45 deletions(-)

-- 
2.25.1

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#39918] [PATCH 1/2] gnu: avr-gcc: Update to 7.4.0.
  2020-03-04 20:02 [bug#39918] [PATCH 0/2] Update avr-gcc Arun Isaac
@ 2020-03-04 20:09 ` Arun Isaac
  2020-03-04 20:09   ` [bug#39918] [PATCH 2/2] gnu: avr-toolchain: Replace functions with package variables Arun Isaac
  2020-10-27 19:15 ` [bug#39918] [PATCH v2 1/2] * gnu/packages/avr.scm (avr-gcc-7, avr-toolchain-7): New variables Malte Frank Gerdes
  2020-10-27 19:30 ` [bug#39918] [PATCH v3 1/2] gnu: avr-gcc: Update to 7.5.0 Malte Frank Gerdes
  2 siblings, 1 reply; 10+ messages in thread
From: Arun Isaac @ 2020-03-04 20:09 UTC (permalink / raw)
  To: 39918; +Cc: dannym, Arun Isaac, ekaitz

* gnu/packages/avr.scm (avr-gcc-7, avr-toolchain-7): New variables.
(avr-gcc-4.9, avr-gcc-5, avr-toolchain-4.9, avr-toolchain-5): Delete
variables.
(avr-libc)[arguments]: Remove custom fix-cpath phase.
---
 gnu/packages/avr.scm | 32 ++++++--------------------------
 1 file changed, 6 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index 608e487b93..8a964b9b17 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,8 +41,8 @@
     (inherit (cross-binutils "avr"))
     (name "avr-binutils")))
 
-(define-public avr-gcc-4.9
-  (let ((xgcc (cross-gcc "avr" #:xgcc gcc-4.9 #:xbinutils avr-binutils)))
+(define-public avr-gcc-7
+  (let ((xgcc (cross-gcc "avr" #:xgcc gcc-7 #:xbinutils avr-binutils)))
     (package
       (inherit xgcc)
       (name "avr-gcc")
@@ -78,18 +79,9 @@
               (variable "CROSS_LIBRARY_PATH")
               (files '("avr/lib")))))
       (native-inputs
-       `(("gcc" ,gcc-5)
+       `(("gcc" ,gcc-7)
          ,@(package-native-inputs xgcc))))))
 
-(define-public avr-gcc-5
-  (package
-    (inherit avr-gcc-4.9)
-    (version (package-version gcc-5))
-    (source (origin
-              (inherit (package-source gcc-5))
-              (patches (append (origin-patches (package-source gcc-5))
-                               (search-patches "gcc-cross-environment-variables.patch")))))))
-
 (define (avr-libc avr-gcc)
   (package
     (name "avr-libc")
@@ -104,18 +96,7 @@
     (build-system gnu-build-system)
     (arguments
      '(#:out-of-source? #t
-       #:configure-flags '("--host=avr")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'unpack 'fix-cpath
-           (lambda _
-             ;; C_INCLUDE_PATH and CPATH pose issues for cross-building,
-             ;; leading to failures when building avr-libc on 64-bit systems.
-             ;; Simply unsetting them allows the build to succeed because it
-             ;; doesn't try to use any of the native system's headers.
-             (unsetenv "C_INCLUDE_PATH")
-             (unsetenv "CPATH")
-             #t)))))
+       #:configure-flags '("--host=avr")))
     (native-inputs `(("avr-binutils" ,avr-binutils)
                      ("avr-gcc" ,avr-gcc)))
     (home-page "https://www.nongnu.org/avr-libc/")
@@ -149,8 +130,7 @@ C++.")
       (home-page (package-home-page avr-libc))
       (license (package-license avr-gcc)))))
 
-(define-public avr-toolchain-4.9 (avr-toolchain avr-gcc-4.9))
-(define-public avr-toolchain-5 (avr-toolchain avr-gcc-5))
+(define-public avr-toolchain-7 (avr-toolchain avr-gcc-7))
 
 (define-public microscheme
   (package
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#39918] [PATCH 2/2] gnu: avr-toolchain: Replace functions with package variables.
  2020-03-04 20:09 ` [bug#39918] [PATCH 1/2] gnu: avr-gcc: Update to 7.4.0 Arun Isaac
@ 2020-03-04 20:09   ` Arun Isaac
  2020-10-27 19:14     ` [bug#39918] [PATCH v2 0/2] " Malte Frank Gerdes
  0 siblings, 1 reply; 10+ messages in thread
From: Arun Isaac @ 2020-03-04 20:09 UTC (permalink / raw)
  To: 39918; +Cc: dannym, Arun Isaac, ekaitz

* gnu/packages/avr.scm (avr-gcc-7): Rename to avr-gcc.
(avr-libc): Replace function with variable.
(avr-toolchain): Replace function with variable.
---
 gnu/packages/avr.scm | 43 ++++++++++++++++++++-----------------------
 1 file changed, 20 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index 8a964b9b17..e6f8c36bd1 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -41,8 +41,8 @@
     (inherit (cross-binutils "avr"))
     (name "avr-binutils")))
 
-(define-public avr-gcc-7
-  (let ((xgcc (cross-gcc "avr" #:xgcc gcc-7 #:xbinutils avr-binutils)))
+(define avr-gcc
+  (let ((xgcc (cross-gcc "avr" #:xgcc gcc #:xbinutils avr-binutils)))
     (package
       (inherit xgcc)
       (name "avr-gcc")
@@ -79,10 +79,10 @@
               (variable "CROSS_LIBRARY_PATH")
               (files '("avr/lib")))))
       (native-inputs
-       `(("gcc" ,gcc-7)
+       `(("gcc" ,gcc)
          ,@(package-native-inputs xgcc))))))
 
-(define (avr-libc avr-gcc)
+(define avr-libc
   (package
     (name "avr-libc")
     (version "2.0.0")
@@ -107,30 +107,27 @@ for use with GCC on Atmel AVR microcontrollers.")
     (license
      (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt"))))
 
-(define (avr-toolchain avr-gcc)
+(define-public avr-toolchain
   ;; avr-libc checks the compiler version and passes "--enable-device-lib" 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 (begin (mkdir %output) #t)))
-      (propagated-inputs
-       `(("avrdude" ,avrdude)
-         ("binutils" ,avr-binutils)
-         ("gcc" ,avr-gcc)
-         ("libc" ,avr-libc)))
-      (synopsis "Complete GCC tool chain for AVR microcontroller development")
-      (description "This package provides a complete GCC tool chain for AVR
+  (package
+    (name "avr-toolchain")
+    (version (package-version avr-gcc))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments '(#:builder (begin (mkdir %output) #t)))
+    (propagated-inputs
+     `(("avrdude" ,avrdude)
+       ("binutils" ,avr-binutils)
+       ("gcc" ,avr-gcc)
+       ("libc" ,avr-libc)))
+    (synopsis "Complete GCC tool chain for AVR microcontroller development")
+    (description "This package provides a complete GCC tool chain for AVR
 microcontroller development.  This includes the GCC AVR cross compiler and
 avrdude for firmware flashing.  The supported programming languages are C and
 C++.")
-      (home-page (package-home-page avr-libc))
-      (license (package-license avr-gcc)))))
-
-(define-public avr-toolchain-7 (avr-toolchain avr-gcc-7))
+    (home-page (package-home-page avr-libc))
+    (license (package-license avr-gcc))))
 
 (define-public microscheme
   (package
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#39918] [PATCH v2 0/2] gnu: avr-toolchain: Replace functions with package variables.
  2020-03-04 20:09   ` [bug#39918] [PATCH 2/2] gnu: avr-toolchain: Replace functions with package variables Arun Isaac
@ 2020-10-27 19:14     ` Malte Frank Gerdes
  2020-10-30  7:03       ` Arun Isaac
  0 siblings, 1 reply; 10+ messages in thread
From: Malte Frank Gerdes @ 2020-10-27 19:14 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 39918

Hi Arun,

i just wanted to try your patches, they don't apply anymore. I
recreated them on top of current master. It builds fine.


Malte




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#39918] [PATCH v2 1/2] * gnu/packages/avr.scm (avr-gcc-7, avr-toolchain-7): New variables.
  2020-03-04 20:02 [bug#39918] [PATCH 0/2] Update avr-gcc Arun Isaac
  2020-03-04 20:09 ` [bug#39918] [PATCH 1/2] gnu: avr-gcc: Update to 7.4.0 Arun Isaac
@ 2020-10-27 19:15 ` Malte Frank Gerdes
  2020-10-27 19:15   ` [bug#39918] [PATCH v2 2/2] * gnu/packages/avr.scm (avr-gcc-7): Rename to avr-gcc Malte Frank Gerdes
  2020-10-27 19:30 ` [bug#39918] [PATCH v3 1/2] gnu: avr-gcc: Update to 7.5.0 Malte Frank Gerdes
  2 siblings, 1 reply; 10+ messages in thread
From: Malte Frank Gerdes @ 2020-10-27 19:15 UTC (permalink / raw)
  To: 39918; +Cc: Malte Frank Gerdes

(avr-gcc-4.9, avr-gcc-5, avr-toolchain-4.9, avr-toolchain-5): Delete variables.
(avr-libc)[arguments]: Remove custom fix-cpath phase.
---
 gnu/packages/avr.scm | 32 ++++++--------------------------
 1 file changed, 6 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index 76af6fdef1..3925297253 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,8 +42,8 @@
     (inherit (cross-binutils "avr"))
     (name "avr-binutils")))
 
-(define-public avr-gcc-4.9
-  (let ((xgcc (cross-gcc "avr" #:xgcc gcc-4.9 #:xbinutils avr-binutils)))
+(define-public avr-gcc-7
+  (let ((xgcc (cross-gcc "avr" #:xgcc gcc-7 #:xbinutils avr-binutils)))
     (package
       (inherit xgcc)
       (name "avr-gcc")
@@ -94,18 +95,9 @@
               (variable "CROSS_LIBRARY_PATH")
               (files '("avr/lib")))))
       (native-inputs
-       `(("gcc@5" ,gcc-5)
+       `(("gcc@5" ,gcc-7)
          ,@(package-native-inputs xgcc))))))
 
-(define-public avr-gcc-5
-  (package
-    (inherit avr-gcc-4.9)
-    (version (package-version gcc-5))
-    (source (origin
-              (inherit (package-source gcc-5))
-              (patches (append (origin-patches (package-source gcc-5))
-                               (search-patches "gcc-cross-environment-variables.patch")))))))
-
 (define (avr-libc avr-gcc)
   (package
     (name "avr-libc")
@@ -120,18 +112,7 @@
     (build-system gnu-build-system)
     (arguments
      '(#:out-of-source? #t
-       #:configure-flags '("--host=avr")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'unpack 'fix-cpath
-           (lambda _
-             ;; C_INCLUDE_PATH and CPATH pose issues for cross-building,
-             ;; leading to failures when building avr-libc on 64-bit systems.
-             ;; Simply unsetting them allows the build to succeed because it
-             ;; doesn't try to use any of the native system's headers.
-             (unsetenv "C_INCLUDE_PATH")
-             (unsetenv "CPATH")
-             #t)))))
+       #:configure-flags '("--host=avr")))
     (native-inputs `(("avr-binutils" ,avr-binutils)
                      ("avr-gcc" ,avr-gcc)))
     (home-page "https://www.nongnu.org/avr-libc/")
@@ -165,8 +146,7 @@ C++.")
       (home-page (package-home-page avr-libc))
       (license (package-license avr-gcc)))))
 
-(define-public avr-toolchain-4.9 (avr-toolchain avr-gcc-4.9))
-(define-public avr-toolchain-5 (avr-toolchain avr-gcc-5))
+(define-public avr-toolchain-7 (avr-toolchain avr-gcc-7))
 
 (define-public microscheme
   (package
-- 
2.29.1





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#39918] [PATCH v2 2/2] * gnu/packages/avr.scm (avr-gcc-7): Rename to avr-gcc.
  2020-10-27 19:15 ` [bug#39918] [PATCH v2 1/2] * gnu/packages/avr.scm (avr-gcc-7, avr-toolchain-7): New variables Malte Frank Gerdes
@ 2020-10-27 19:15   ` Malte Frank Gerdes
  0 siblings, 0 replies; 10+ messages in thread
From: Malte Frank Gerdes @ 2020-10-27 19:15 UTC (permalink / raw)
  To: 39918; +Cc: Malte Frank Gerdes

(avr-libc): Replace function with variable.
(avr-toolchain): Replace function with variable.
---
 gnu/packages/avr.scm | 43 ++++++++++++++++++++-----------------------
 1 file changed, 20 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index 3925297253..c113707283 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -42,8 +42,8 @@
     (inherit (cross-binutils "avr"))
     (name "avr-binutils")))
 
-(define-public avr-gcc-7
-  (let ((xgcc (cross-gcc "avr" #:xgcc gcc-7 #:xbinutils avr-binutils)))
+(define avr-gcc
+  (let ((xgcc (cross-gcc "avr" #:xgcc gcc #:xbinutils avr-binutils)))
     (package
       (inherit xgcc)
       (name "avr-gcc")
@@ -95,10 +95,10 @@
               (variable "CROSS_LIBRARY_PATH")
               (files '("avr/lib")))))
       (native-inputs
-       `(("gcc@5" ,gcc-7)
+       `(("gcc" ,gcc)
          ,@(package-native-inputs xgcc))))))
 
-(define (avr-libc avr-gcc)
+(define avr-libc
   (package
     (name "avr-libc")
     (version "2.0.0")
@@ -123,30 +123,27 @@ for use with GCC on Atmel AVR microcontrollers.")
     (license
      (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt"))))
 
-(define (avr-toolchain avr-gcc)
+(define-public avr-toolchain
   ;; avr-libc checks the compiler version and passes "--enable-device-lib" 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 (begin (mkdir %output) #t)))
-      (propagated-inputs
-       `(("avrdude" ,avrdude)
-         ("binutils" ,avr-binutils)
-         ("gcc" ,avr-gcc)
-         ("libc" ,avr-libc)))
-      (synopsis "Complete GCC tool chain for AVR microcontroller development")
-      (description "This package provides a complete GCC tool chain for AVR
+  (package
+    (name "avr-toolchain")
+    (version (package-version avr-gcc))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments '(#:builder (begin (mkdir %output) #t)))
+    (propagated-inputs
+     `(("avrdude" ,avrdude)
+       ("binutils" ,avr-binutils)
+       ("gcc" ,avr-gcc)
+       ("libc" ,avr-libc)))
+    (synopsis "Complete GCC tool chain for AVR microcontroller development")
+    (description "This package provides a complete GCC tool chain for AVR
 microcontroller development.  This includes the GCC AVR cross compiler and
 avrdude for firmware flashing.  The supported programming languages are C and
 C++.")
-      (home-page (package-home-page avr-libc))
-      (license (package-license avr-gcc)))))
-
-(define-public avr-toolchain-7 (avr-toolchain avr-gcc-7))
+    (home-page (package-home-page avr-libc))
+    (license (package-license avr-gcc))))
 
 (define-public microscheme
   (package
-- 
2.29.1





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#39918] [PATCH v3 1/2] gnu: avr-gcc: Update to 7.5.0.
  2020-03-04 20:02 [bug#39918] [PATCH 0/2] Update avr-gcc Arun Isaac
  2020-03-04 20:09 ` [bug#39918] [PATCH 1/2] gnu: avr-gcc: Update to 7.4.0 Arun Isaac
  2020-10-27 19:15 ` [bug#39918] [PATCH v2 1/2] * gnu/packages/avr.scm (avr-gcc-7, avr-toolchain-7): New variables Malte Frank Gerdes
@ 2020-10-27 19:30 ` Malte Frank Gerdes
  2020-10-27 19:30   ` [bug#39918] [PATCH v3 2/2] gnu: avr-toolchain: Replace functions with package variables Malte Frank Gerdes
  2 siblings, 1 reply; 10+ messages in thread
From: Malte Frank Gerdes @ 2020-10-27 19:30 UTC (permalink / raw)
  To: 39918; +Cc: Malte Frank Gerdes

* gnu/packages/avr.scm (avr-gcc-7, avr-toolchain-7): New variables.
(avr-gcc-4.9, avr-gcc-5, avr-toolchain-4.9, avr-toolchain-5): Delete variables.
(avr-libc)[arguments]: Remove custom fix-cpath phase.
---
 gnu/packages/avr.scm | 32 ++++++--------------------------
 1 file changed, 6 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index 76af6fdef1..573a5e089c 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>;
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,8 +42,8 @@
     (inherit (cross-binutils "avr"))
     (name "avr-binutils")))
 
-(define-public avr-gcc-4.9
-  (let ((xgcc (cross-gcc "avr" #:xgcc gcc-4.9 #:xbinutils avr-binutils)))
+(define-public avr-gcc-7
+  (let ((xgcc (cross-gcc "avr" #:xgcc gcc-7 #:xbinutils avr-binutils)))
     (package
       (inherit xgcc)
       (name "avr-gcc")
@@ -94,18 +95,9 @@
               (variable "CROSS_LIBRARY_PATH")
               (files '("avr/lib")))))
       (native-inputs
-       `(("gcc@5" ,gcc-5)
+       `(("gcc" ,gcc-7)
          ,@(package-native-inputs xgcc))))))
 
-(define-public avr-gcc-5
-  (package
-    (inherit avr-gcc-4.9)
-    (version (package-version gcc-5))
-    (source (origin
-              (inherit (package-source gcc-5))
-              (patches (append (origin-patches (package-source gcc-5))
-                               (search-patches "gcc-cross-environment-variables.patch")))))))
-
 (define (avr-libc avr-gcc)
   (package
     (name "avr-libc")
@@ -120,18 +112,7 @@
     (build-system gnu-build-system)
     (arguments
      '(#:out-of-source? #t
-       #:configure-flags '("--host=avr")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'unpack 'fix-cpath
-           (lambda _
-             ;; C_INCLUDE_PATH and CPATH pose issues for cross-building,
-             ;; leading to failures when building avr-libc on 64-bit systems.
-             ;; Simply unsetting them allows the build to succeed because it
-             ;; doesn't try to use any of the native system's headers.
-             (unsetenv "C_INCLUDE_PATH")
-             (unsetenv "CPATH")
-             #t)))))
+       #:configure-flags '("--host=avr")))
     (native-inputs `(("avr-binutils" ,avr-binutils)
                      ("avr-gcc" ,avr-gcc)))
     (home-page "https://www.nongnu.org/avr-libc/")
@@ -165,8 +146,7 @@ C++.")
       (home-page (package-home-page avr-libc))
       (license (package-license avr-gcc)))))
 
-(define-public avr-toolchain-4.9 (avr-toolchain avr-gcc-4.9))
-(define-public avr-toolchain-5 (avr-toolchain avr-gcc-5))
+(define-public avr-toolchain-7 (avr-toolchain avr-gcc-7))
 
 (define-public microscheme
   (package
-- 
2.29.1





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#39918] [PATCH v3 2/2] gnu: avr-toolchain: Replace functions with package variables.
  2020-10-27 19:30 ` [bug#39918] [PATCH v3 1/2] gnu: avr-gcc: Update to 7.5.0 Malte Frank Gerdes
@ 2020-10-27 19:30   ` Malte Frank Gerdes
  0 siblings, 0 replies; 10+ messages in thread
From: Malte Frank Gerdes @ 2020-10-27 19:30 UTC (permalink / raw)
  To: 39918; +Cc: Malte Frank Gerdes

* gnu/packages/avr.scm (avr-gcc-7): Rename to avr-gcc.
(avr-libc): Replace function with variable.
(avr-toolchain): Replace function with variable.
---
 gnu/packages/avr.scm | 43 ++++++++++++++++++++-----------------------
 1 file changed, 20 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index 573a5e089c..4ad4bb03ba 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -42,8 +42,8 @@
     (inherit (cross-binutils "avr"))
     (name "avr-binutils")))
 
-(define-public avr-gcc-7
-  (let ((xgcc (cross-gcc "avr" #:xgcc gcc-7 #:xbinutils avr-binutils)))
+(define avr-gcc
+  (let ((xgcc (cross-gcc "avr" #:xgcc gcc #:xbinutils avr-binutils)))
     (package
       (inherit xgcc)
       (name "avr-gcc")
@@ -95,10 +95,10 @@
               (variable "CROSS_LIBRARY_PATH")
               (files '("avr/lib")))))
       (native-inputs
-       `(("gcc" ,gcc-7)
+       `(("gcc" ,gcc)
          ,@(package-native-inputs xgcc))))))
 
-(define (avr-libc avr-gcc)
+(define avr-libc
   (package
     (name "avr-libc")
     (version "2.0.0")
@@ -123,30 +123,27 @@ for use with GCC on Atmel AVR microcontrollers.")
     (license
      (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt"))))
 
-(define (avr-toolchain avr-gcc)
+(define-public avr-toolchain
   ;; avr-libc checks the compiler version and passes "--enable-device-lib" 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 (begin (mkdir %output) #t)))
-      (propagated-inputs
-       `(("avrdude" ,avrdude)
-         ("binutils" ,avr-binutils)
-         ("gcc" ,avr-gcc)
-         ("libc" ,avr-libc)))
-      (synopsis "Complete GCC tool chain for AVR microcontroller development")
-      (description "This package provides a complete GCC tool chain for AVR
+  (package
+    (name "avr-toolchain")
+    (version (package-version avr-gcc))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments '(#:builder (begin (mkdir %output) #t)))
+    (propagated-inputs
+     `(("avrdude" ,avrdude)
+       ("binutils" ,avr-binutils)
+       ("gcc" ,avr-gcc)
+       ("libc" ,avr-libc)))
+    (synopsis "Complete GCC tool chain for AVR microcontroller development")
+    (description "This package provides a complete GCC tool chain for AVR
 microcontroller development.  This includes the GCC AVR cross compiler and
 avrdude for firmware flashing.  The supported programming languages are C and
 C++.")
-      (home-page (package-home-page avr-libc))
-      (license (package-license avr-gcc)))))
-
-(define-public avr-toolchain-7 (avr-toolchain avr-gcc-7))
+    (home-page (package-home-page avr-libc))
+    (license (package-license avr-gcc))))
 
 (define-public microscheme
   (package
-- 
2.29.1





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#39918] [PATCH v2 0/2] gnu: avr-toolchain: Replace functions with package variables.
  2020-10-27 19:14     ` [bug#39918] [PATCH v2 0/2] " Malte Frank Gerdes
@ 2020-10-30  7:03       ` Arun Isaac
  2020-11-01 19:19         ` bug#39918: " Arun Isaac
  0 siblings, 1 reply; 10+ messages in thread
From: Arun Isaac @ 2020-10-30  7:03 UTC (permalink / raw)
  To: Malte Frank Gerdes; +Cc: 39918

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]


Hi Malte,

Thank you for your feedback! This patchset has been stuck so long
because I didn't know if it was ok to collapse the package functions
into package variables, and whether we really needed all the old
versions. I'll try raising this on guix-devel.

Regards,
Arun

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 524 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#39918: [PATCH v2 0/2] gnu: avr-toolchain: Replace functions with package variables.
  2020-10-30  7:03       ` Arun Isaac
@ 2020-11-01 19:19         ` Arun Isaac
  0 siblings, 0 replies; 10+ messages in thread
From: Arun Isaac @ 2020-11-01 19:19 UTC (permalink / raw)
  To: Malte Frank Gerdes; +Cc: 39918-done

[-- Attachment #1: Type: text/plain, Size: 91 bytes --]


Hi Malte,

I've pushed this patchset to master after consulting with guix-devel.

Cheers!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 524 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-11-01 19:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 20:02 [bug#39918] [PATCH 0/2] Update avr-gcc Arun Isaac
2020-03-04 20:09 ` [bug#39918] [PATCH 1/2] gnu: avr-gcc: Update to 7.4.0 Arun Isaac
2020-03-04 20:09   ` [bug#39918] [PATCH 2/2] gnu: avr-toolchain: Replace functions with package variables Arun Isaac
2020-10-27 19:14     ` [bug#39918] [PATCH v2 0/2] " Malte Frank Gerdes
2020-10-30  7:03       ` Arun Isaac
2020-11-01 19:19         ` bug#39918: " Arun Isaac
2020-10-27 19:15 ` [bug#39918] [PATCH v2 1/2] * gnu/packages/avr.scm (avr-gcc-7, avr-toolchain-7): New variables Malte Frank Gerdes
2020-10-27 19:15   ` [bug#39918] [PATCH v2 2/2] * gnu/packages/avr.scm (avr-gcc-7): Rename to avr-gcc Malte Frank Gerdes
2020-10-27 19:30 ` [bug#39918] [PATCH v3 1/2] gnu: avr-gcc: Update to 7.5.0 Malte Frank Gerdes
2020-10-27 19:30   ` [bug#39918] [PATCH v3 2/2] gnu: avr-toolchain: Replace functions with package variables Malte Frank Gerdes

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).