[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: seabios: Enable for all architectures.
From: |
guix-commits |
Subject: |
01/02: gnu: seabios: Enable for all architectures. |
Date: |
Wed, 21 Dec 2022 10:34:37 -0500 (EST) |
efraim pushed a commit to branch master
in repository guix.
commit 228db28165dcde2a11d3f98c96935b65098eecc6
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Wed Dec 21 17:20:41 2022 +0200
gnu: seabios: Enable for all architectures.
* gnu/packages/firmware.scm (seabios)[native-inputs]: When not building
from an i686-linux or x86_64-linux machine add cross-gcc and
cross-binutils for i686-linux-gnu.
[arguments]: When not building from an i686-linux or x86_64-linux
machine adjust the Makefile to find the cross build tools needed.
[supported-architectures]: Remove field.
---
gnu/packages/firmware.scm | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 2e2b48162f..66e4b63d40 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -72,7 +72,8 @@
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
#:use-module (gnu packages web)
- #:use-module (gnu packages xml))
+ #:use-module (gnu packages xml)
+ #:use-module (ice-9 match))
(define-public ath9k-htc-firmware
(package
@@ -418,7 +419,13 @@ executing in M-mode.")
;; Delete IASL-generated files.
(for-each delete-file (find-files "." "\\.hex$"))))))
(build-system gnu-build-system)
- (native-inputs (list acpica python-wrapper))
+ (native-inputs
+ (append
+ (list acpica python-wrapper)
+ (if (member (%current-system) '("i686-linux" "x86_64-linux"))
+ '()
+ (list (cross-gcc "i686-linux-gnu")
+ (cross-binutils "i686-linux-gnu")))))
(arguments
(list
#:tests? #f ;no tests
@@ -440,7 +447,16 @@ executing in M-mode.")
(call-with-output-file ".version"
(lambda (port)
(format port #$(package-version this-package))))
- (setenv "CC" "gcc")))
+ ;; If we use (cc-for-target) then we have the system prefix
+ ;; twice or we might have the wrong prefix.
+ (setenv "CC" "gcc")
+ #$@(match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ #~())
+ (_
+ #~((substitute* "Makefile"
+ (("CROSS_PREFIX=")
+ "CROSS_PREFIX=i686-linux-gnu-")))))))
(add-before 'build 'build-description-tables
(lambda _
;; Regenerate the ACPI description tables.
@@ -522,7 +538,6 @@ executing in M-mode.")
(description "SeaBIOS is an implementation of a 16bit x86 BIOS. SeaBIOS
can run in an emulator or it can run natively on X86 hardware with the use of
coreboot.")
- (supported-systems '("i686-linux" "x86_64-linux"))
;; Dual licensed.
(license (list license:gpl3+ license:lgpl3+
;; src/fw/acpi-dsdt.dsl is lgpl2