guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

14/15: Revert "gnu: binutils: Use gexps."


From: guix-commits
Subject: 14/15: Revert "gnu: binutils: Use gexps."
Date: Sat, 13 Jan 2024 07:15:43 -0500 (EST)

janneke pushed a commit to branch hurd-team
in repository guix.

commit aea3ed821c773cd80fcc1f12b6535524a936ff52
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Sat Jan 13 12:48:15 2024 +0100

    Revert "gnu: binutils: Use gexps."
    
    Needs to be reverted in order to revert binutils update to 2.41.
    
    This reverts commit 8e9573784f06ec2af96f9298c6dd4346688888fb.
    
    Change-Id: I9cfc96ba49a9221e5be817010b35265b4adc02e3
---
 gnu/packages/base.scm           |  84 +++++++++++-----------
 gnu/packages/commencement.scm   | 152 +++++++++++++++++++---------------------
 gnu/packages/cross-base.scm     |   4 +-
 gnu/packages/embedded.scm       |  21 +++---
 gnu/packages/make-bootstrap.scm |  52 +++++++-------
 5 files changed, 153 insertions(+), 160 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 4523d044fd..0412dc0e0e 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -595,37 +595,37 @@ change.  GNU make offers many powerful extensions over 
the standard utility.")
       (patches (search-patches "binutils-loongson-workaround.patch"))))
    (build-system gnu-build-system)
    (arguments
-    (list #:out-of-source? #t ;recommended in the README
-          #:configure-flags #~'(;; Add `-static-libgcc' to not retain a 
dependency
-                                ;; on GCC when bootstrapping.
-                                "LDFLAGS=-static-libgcc"
-
-                                ;; Turn on --enable-new-dtags by default to 
make the
-                                ;; linker set RUNPATH instead of RPATH on 
binaries.
-                                ;; This is important because RUNPATH can be 
overriden
-                                ;; using LD_LIBRARY_PATH at runtime.
-                                "--enable-new-dtags"
-
-                                ;; Don't search under /usr/lib & co.
-                                "--with-lib-path=/no-ld-lib-path"
-
-                                ;; Install BFD.  It ends up in a hidden 
directory,
-                                ;; but it's here.
-                                "--enable-install-libbfd"
-
-                                ;; Make sure 'ar' and 'ranlib' produce 
archives in a
-                                ;; deterministic fashion.
-                                "--enable-deterministic-archives"
-
-                                "--enable-64-bit-bfd"
-                                "--enable-compressed-debug-sections=all"
-                                "--enable-lto"
-                                "--enable-separate-code"
-                                "--enable-threads")
-
-          ;; For some reason, the build machinery insists on rebuilding .info
-          ;; files, even though they're already provided by the tarball.
-          #:make-flags #~'("MAKEINFO=true")))
+    `(#:out-of-source? #t   ;recommended in the README
+      #:configure-flags '(;; Add `-static-libgcc' to not retain a dependency
+                          ;; on GCC when bootstrapping.
+                          "LDFLAGS=-static-libgcc"
+
+                          ;; Turn on --enable-new-dtags by default to make the
+                          ;; linker set RUNPATH instead of RPATH on binaries.
+                          ;; This is important because RUNPATH can be overriden
+                          ;; using LD_LIBRARY_PATH at runtime.
+                          "--enable-new-dtags"
+
+                          ;; Don't search under /usr/lib & co.
+                          "--with-lib-path=/no-ld-lib-path"
+
+                          ;; Install BFD.  It ends up in a hidden directory,
+                          ;; but it's here.
+                          "--enable-install-libbfd"
+
+                          ;; Make sure 'ar' and 'ranlib' produce archives in a
+                          ;; deterministic fashion.
+                          "--enable-deterministic-archives"
+
+                          "--enable-64-bit-bfd"
+                          "--enable-compressed-debug-sections=all"
+                          "--enable-lto"
+                          "--enable-separate-code"
+                          "--enable-threads")
+
+      ;; For some reason, the build machinery insists on rebuilding .info
+      ;; files, even though they're already provided by the tarball.
+      #:make-flags '("MAKEINFO=true")))
    (native-inputs (list bison))                   ;needed to build 'gprofng'
    (synopsis "Binary utilities: bfd gas gprof ld")
    (description
@@ -655,7 +655,7 @@ included.")
              (patches '())))
    (arguments
     (substitute-keyword-arguments (package-arguments binutils)
-      ((#:make-flags _ #~'()) #~'())))
+      ((#:make-flags _ ''()) ''())))
    (native-inputs '())
    (properties '())))
 
@@ -665,22 +665,22 @@ included.")
     (arguments
      (substitute-keyword-arguments (package-arguments binutils)
        ((#:configure-flags flags)
-        #~(cons* "--enable-gold=default"
-                 (delete "LDFLAGS=-static-libgcc" #$flags)))
+        `(cons* "--enable-gold=default"
+                (delete "LDFLAGS=-static-libgcc" ,flags)))
        ((#:phases phases '%standard-phases)
-        #~(modify-phases #$phases
+        `(modify-phases ,phases
            (add-after 'patch-source-shebangs 'patch-more-shebangs
              (lambda _
                (substitute* "gold/Makefile.in"
                  (("/bin/sh") (which "sh")))))
            ;; Multiple failing tests on some architectures in the gold 
testsuite.
-           #$(if (or (target-arm?)
-                      (target-ppc32?))
-                 #~(add-after 'unpack 'skip-gold-testsuite
-                     (lambda _
-                       (substitute* "gold/Makefile.in"
-                         ((" testsuite") " "))))
-                 #t)))))
+           ,@(if (or (target-arm?)
+                     (target-ppc32?))
+               '((add-after 'unpack 'skip-gold-testsuite
+                   (lambda _
+                     (substitute* "gold/Makefile.in"
+                       ((" testsuite") " ")))))
+               '())))))
     (native-inputs (modify-inputs (package-native-inputs binutils)
                      (append bc)))))
 
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 0bedea2582..a70cf02a6f 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -937,28 +937,27 @@ MesCC-Tools), and finally M2-Planet.")
     (native-inputs (%boot-tcc-inputs))
     (supported-systems '("i686-linux" "x86_64-linux"))
     (arguments
-     (list #:implicit-inputs? #f
-           #:guile %bootstrap-guile
-           #:tests? #f ; runtest: command not found
-           #:parallel-build? #f
-           #:strip-binaries? #f ; no strip yet
-           #:configure-flags
-           #~(let ((cppflags (string-append
-                              " -D __GLIBC_MINOR__=6"
-                              " -D MES_BOOTSTRAP=1"))
-                   (bash (assoc-ref %build-inputs "bash")))
-               `(,(string-append "CONFIG_SHELL=" bash "/bin/sh")
-                 ,(string-append "CPPFLAGS=" cppflags)
-                 "AR=tcc -ar"
-                 "CXX=false"
-                 "RANLIB=true"
-                 ,(string-append "CC=tcc" cppflags)
-                 "--disable-nls"
-                 "--disable-shared"
-                 "--disable-werror"
-                 "--build=i686-unknown-linux-gnu"
-                 "--host=i686-unknown-linux-gnu"
-                 "--with-sysroot=/"))))))
+     `(#:implicit-inputs? #f
+       #:guile ,%bootstrap-guile
+       #:tests? #f                      ; runtest: command not found
+       #:parallel-build? #f
+       #:strip-binaries? #f             ; no strip yet
+       #:configure-flags
+       (let ((cppflags (string-append " -D __GLIBC_MINOR__=6"
+                                      " -D MES_BOOTSTRAP=1"))
+             (bash (assoc-ref %build-inputs "bash")))
+         `(,(string-append "CONFIG_SHELL=" bash "/bin/sh")
+           ,(string-append "CPPFLAGS=" cppflags)
+           "AR=tcc -ar"
+           "CXX=false"
+           "RANLIB=true"
+           ,(string-append "CC=tcc" cppflags)
+           "--disable-nls"
+           "--disable-shared"
+           "--disable-werror"
+           "--build=i686-unknown-linux-gnu"
+           "--host=i686-unknown-linux-gnu"
+           "--with-sysroot=/"))))))
 
 (define gcc-core-mesboot0
   ;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C
@@ -1267,13 +1266,14 @@ ac_cv_c_float_format='IEEE (little-endian)'
     (arguments
      (substitute-keyword-arguments (package-arguments binutils-mesboot0)
        ((#:configure-flags configure-flags)
-        #~(let ((out (assoc-ref %outputs "out")))
-            `("--disable-nls" "--disable-shared"
-              "--disable-werror"
-              "--build=i686-unknown-linux-gnu"
-              "--host=i686-unknown-linux-gnu"
-              "--with-sysroot=/"
-              ,(string-append "--prefix=" out))))))))
+        '(let ((out (assoc-ref %outputs "out")))
+           `("--disable-nls"
+             "--disable-shared"
+             "--disable-werror"
+             "--build=i686-unknown-linux-gnu"
+             "--host=i686-unknown-linux-gnu"
+             "--with-sysroot=/"
+             ,(string-append "--prefix=" out))))))))
 
 (define gnu-make-mesboot
   (package
@@ -2249,39 +2249,33 @@ exec " gcc "/bin/" program
     (source (bootstrap-origin (package-source binutils)))
     (name "binutils-cross-boot0")
     (arguments
-     (append (list #:guile %bootstrap-guile
-                   #:implicit-inputs? #f
-
-                   #:modules '((guix build gnu-build-system)
-                               (guix build utils)
-                               (ice-9 ftw)) ; for 'scandir'
-                   #:phases
-                   #~(modify-phases %standard-phases
-                       (add-after 'install 'add-symlinks
-                         (lambda* (#:key outputs #:allow-other-keys)
-                           ;; The cross-gcc invokes 'as', 'ld', etc, without 
the
-                           ;; triplet prefix, so add symlinks.
-                           (let ((out (assoc-ref outputs "out"))
-                                 (triplet-prefix (string-append 
#$(boot-triplet)
-                                                                "-")))
-                             (define (has-triplet-prefix? name)
-                               (string-prefix? triplet-prefix name))
-                             (define (remove-triplet-prefix name)
-                               (substring name
-                                          (string-length triplet-prefix)))
-
-                             (with-directory-excursion (string-append out 
"/bin")
-                               (for-each (lambda (name)
-                                           (symlink name
-                                                    (remove-triplet-prefix 
name)))
-                                         (scandir "."
-                                                  has-triplet-prefix?))))))))
-             (substitute-keyword-arguments (package-arguments binutils)
-               ((#:configure-flags cf)
-                #~(append (list #$(string-append "--target="
-                                                 (boot-triplet))
-                                "--disable-gprofng") ;requires Bison
-                          #$cf)))))
+     `(#:guile ,%bootstrap-guile
+       #:implicit-inputs? #f
+
+       #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 ftw))                    ; for 'scandir'
+       #:phases (modify-phases %standard-phases
+                  (add-after 'install 'add-symlinks
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      ;; The cross-gcc invokes 'as', 'ld', etc, without the
+                      ;; triplet prefix, so add symlinks.
+                      (let ((out (assoc-ref outputs "out"))
+                            (triplet-prefix (string-append ,(boot-triplet) 
"-")))
+                        (define (has-triplet-prefix? name)
+                          (string-prefix? triplet-prefix name))
+                        (define (remove-triplet-prefix name)
+                          (substring name (string-length triplet-prefix)))
+                        (with-directory-excursion (string-append out "/bin")
+                          (for-each (lambda (name)
+                                      (symlink name (remove-triplet-prefix 
name)))
+                                    (scandir "." has-triplet-prefix?)))))))
+
+       ,@(substitute-keyword-arguments (package-arguments binutils)
+           ((#:configure-flags cf)
+            `(append (list ,(string-append "--target=" (boot-triplet))
+                           "--disable-gprofng")   ;requires Bison
+                     ,cf)))))
     (native-inputs '())                           ;no Bison
     (inputs (%boot0-inputs))))
 
@@ -3188,22 +3182,24 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker 
-Wl,~a/~a \"$@\"~%"
     (inherit binutils)
     (source (bootstrap-origin (package-source binutils)))
     (arguments
-     (append (list #:guile %bootstrap-guile
-                   #:implicit-inputs? #f
-                   #:allowed-references `("out" ,glibc-final
-                                          ,(this-package-native-input
-                                            "libstdc++")
-                                          ,@(if (target-powerpc? 
(%current-system))
-                                                (list static-bash-for-glibc)
-                                                '())))
-             (substitute-keyword-arguments (package-arguments binutils)
-               ((#:configure-flags flags #~'())
-                ;; For gprofng, tell the build system where to look for 
libstdc++.
-                #~(append #$flags
-                          (list (string-append "LDFLAGS=-L"
-                                               #$(this-package-native-input
-                                                  "libstdc++")
-                                               "/lib")))))))
+     `(#:guile ,%bootstrap-guile
+       #:implicit-inputs? #f
+       #:allowed-references
+       ("out"
+        ,glibc-final
+        ,(this-package-native-input "libstdc++")
+        ,@(if (target-powerpc? (%current-system))
+              (list static-bash-for-glibc)
+              '()))
+
+       ,@(substitute-keyword-arguments (package-arguments binutils)
+           ((#:configure-flags flags #~'())
+            ;; For gprofng, tell the build system where to look for libstdc++.
+            #~(append #$flags
+                      (list (string-append
+                             "LDFLAGS=-L"
+                             #$(this-package-native-input "libstdc++")
+                             "/lib")))))))
     (native-inputs (list bison-boot0
                          libstdc++))              ;for gprofng
     (inputs
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 3a73f4f638..d3f16490bc 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2018, 2020, 2023-2024 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2018, 2020, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016, 2019, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
@@ -116,7 +116,7 @@
                         ;; to pick up native libs instead of target ones.  In
                         ;; practice the RUNPATH of target libs only refers to
                         ;; target libs, not native libs, so this is safe.
-                        #~(cons "--with-sysroot=/" #$flags)))))))
+                        `(cons "--with-sysroot=/" ,flags)))))))
 
     ;; For Xtensa, apply Qualcomm's patch.
     (cross (cond ((string-prefix? "xtensa-" target)
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index e629497d89..313675814a 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -746,17 +746,16 @@ with a layered architecture of JTAG interface and TAP 
support.")
                     "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))
                   (patches '())))
         (arguments
-         (list
-          ;; FIXME: For some reason there are many test failures.  It's not
-          ;; obvious how to fix the failures.
-          #:tests? #f
-          #:phases
-          #~(modify-phases %standard-phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "binutils") #t))
-              #$@(substitute-keyword-arguments (package-arguments xbinutils)
-                   ((#:configure-flags flags)
-                    #~(cons "--disable-werror" #$flags))))))
+         `(;; FIXME: For some reason there are many test failures.  It's not
+           ;; obvious how to fix the failures.
+           #:tests? #f
+           #:phases
+           (modify-phases %standard-phases
+             (add-after 'unpack 'chdir
+               (lambda _ (chdir "binutils") #t)))
+           ,@(substitute-keyword-arguments (package-arguments xbinutils)
+               ((#:configure-flags flags)
+                `(cons "--disable-werror" ,flags)))))
         (native-inputs
          `(("bison" ,bison)
            ("flex" ,flex)
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index f640c8bb12..1b6fdd902e 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2021, 2023, 2024 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2021, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2017, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018, 2019 Mark H Weaver <mhw@netris.org>
@@ -374,34 +374,32 @@ for `sh' in $PATH, and without nscd, and with static NSS 
modules."
 
 (define %binutils-static
   ;; Statically-linked Binutils.
-  (package
-    (inherit binutils)
+  (package (inherit binutils)
     (name "binutils-static")
     (arguments
-     (list #:configure-flags
-           #~(cons "--disable-gold"
-                   #$(match (memq #:configure-flags (package-arguments 
binutils))
-                       ((#:configure-flags flags _ ...)
-                        flags)))
-           #:make-flags
-           (match (memq #:make-flags (package-arguments binutils))
-             ((#:make-flags flags _ ...)
-              flags)
-             (_ #~'()))
-           #:strip-flags #~'("--strip-all")
-           #:phases
-           #~(modify-phases %standard-phases
-               (add-before 'configure 'all-static
-                 (lambda _
-                   ;; The `-all-static' libtool flag can only be passed after
-                   ;; `configure', since configure tests don't use libtool,
-                   ;; and only for executables built with libtool.
-                   (substitute* '("binutils/Makefile.in"
-                                  "gas/Makefile.in" "ld/Makefile.in")
-                     (("^LDFLAGS =(.*)$" line)
-                      (string-append
-                       line
-                       "\nAM_LDFLAGS = -static -all-static\n"))))))))))
+     `(#:configure-flags (cons "--disable-gold"
+                               ,(match (memq #:configure-flags
+                                             (package-arguments binutils))
+                                  ((#:configure-flags flags _ ...)
+                                   flags)))
+       #:make-flags ,(match (memq #:make-flags (package-arguments binutils))
+                       ((#:make-flags flags _ ...)
+                        flags)
+                       (_ ''()))
+       #:strip-flags '("--strip-all")
+       #:phases (modify-phases %standard-phases
+                  (add-before 'configure 'all-static
+                    (lambda _
+                      ;; The `-all-static' libtool flag can only be passed
+                      ;; after `configure', since configure tests don't use
+                      ;; libtool, and only for executables built with libtool.
+                      (substitute* '("binutils/Makefile.in"
+                                     "gas/Makefile.in"
+                                     "ld/Makefile.in")
+                        (("^LDFLAGS =(.*)$" line)
+                         (string-append line
+                                        "\nAM_LDFLAGS = -static 
-all-static\n")))
+                      #t)))))))
 
 (define %binutils-static-stripped
   ;; The subset of Binutils that we need.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]