gnu: gcc-arm-none-eabi@7-2018-q2-update: Fix conflicting GCC headers.
This is a follow-up of 7f6d3f3950
and merely
a copy-and-paste of Marius Bakke's fix.
* gnu/packages/embedded.scm (gcc-arm-none-eabi-7-2018-q2-update)[arguments]:
Add phase to remove the default compiler from CPLUS_INCLUDE_PATH.
[native-inputs]: Distinguish GCC-5.
This commit is contained in:
parent
99f2c93470
commit
f6ec9f9d39
1 changed files with 18 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
||||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
|
;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
|
||||||
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
|
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
|
||||||
|
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -250,7 +251,7 @@ usable on embedded products.")
|
||||||
(origin-patches (package-source gcc-7))
|
(origin-patches (package-source gcc-7))
|
||||||
(search-patches "gcc-7-cross-environment-variables.patch")))))
|
(search-patches "gcc-7-cross-environment-variables.patch")))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("gcc" ,gcc-5)
|
`(("gcc@5" ,gcc-5)
|
||||||
("flex" ,flex)
|
("flex" ,flex)
|
||||||
("isl" ,isl-0.18)
|
("isl" ,isl-0.18)
|
||||||
,@(alist-delete "isl" (package-native-inputs xgcc))))
|
,@(alist-delete "isl" (package-native-inputs xgcc))))
|
||||||
|
@ -269,7 +270,22 @@ usable on embedded products.")
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "gcc/genmultilib"
|
(substitute* "gcc/genmultilib"
|
||||||
(("#!/bin/sh") (string-append "#!" (which "sh"))))
|
(("#!/bin/sh") (string-append "#!" (which "sh"))))
|
||||||
#t))))
|
#t))
|
||||||
|
(add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((gcc (assoc-ref inputs "gcc")))
|
||||||
|
;; Remove the default compiler from CPLUS_INCLUDE_PATH to
|
||||||
|
;; prevent header conflict with the GCC from native-inputs.
|
||||||
|
(setenv "CPLUS_INCLUDE_PATH"
|
||||||
|
(string-join
|
||||||
|
(delete (string-append gcc "/include/c++")
|
||||||
|
(string-split (getenv "CPLUS_INCLUDE_PATH")
|
||||||
|
#\:))
|
||||||
|
":"))
|
||||||
|
(format #t
|
||||||
|
"environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
|
||||||
|
(getenv "CPLUS_INCLUDE_PATH"))
|
||||||
|
#t)))))
|
||||||
((#:configure-flags flags)
|
((#:configure-flags flags)
|
||||||
;; The configure flags are largely identical to the flags used by the
|
;; The configure flags are largely identical to the flags used by the
|
||||||
;; "GCC ARM embedded" project.
|
;; "GCC ARM embedded" project.
|
||||||
|
|
Reference in a new issue