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 @@ (define-module (gnu packages firmware) #: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 @@ (define-public seabios ;; 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 @@ (define-public seabios (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 @@ (define-public seabios (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