gnu: ovmf: Adapt to CPLUS_INCLUDE_PATH changes.

* gnu/packages/firmware.scm (ovmf)[native-inputs]: Distinguish GCC-5.
[arguments]: Add phase to hide the default GCC from CPLUS_INCLUDE_PATH.
This commit is contained in:
Marius Bakke 2020-03-27 19:01:41 +01:00
parent a3efa4f9eb
commit 5d446d6b6a
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -320,7 +320,7 @@ (define-public ovmf
(build-system gnu-build-system)
(native-inputs
`(("acpica" ,acpica)
("gcc" ,gcc-5)
("gcc@5" ,gcc-5)
("nasm" ,nasm)
("python-2" ,python-2)
("util-linux" ,util-linux "lib")))
@ -328,6 +328,18 @@ (define-public ovmf
`(#:tests? #f ; No check target.
#:phases
(modify-phases %standard-phases
;; Hide the default GCC from CPLUS_INCLUDE_PATH to prevent it from
;; shadowing the version of GCC provided in native-inputs.
(add-after 'set-paths 'hide-gcc7
(lambda* (#:key inputs #:allow-other-keys)
(let ((gcc (assoc-ref inputs "gcc")))
(setenv "CPLUS_INCLUDE_PATH"
(string-join
(delete (string-append gcc "/include/c++")
(string-split (getenv "CPLUS_INCLUDE_PATH")
#\:))
":"))
#t)))
(replace 'configure
(lambda _
(let* ((cwd (getcwd))