guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: gcc-arm-none-eabi@7-2018-q2-update: Fix conf


From: guix-commits
Subject: branch master updated: gnu: gcc-arm-none-eabi@7-2018-q2-update: Fix conflicting GCC headers.
Date: Thu, 14 May 2020 04:41:18 -0400

This is an automated email from the git hooks/post-receive script.

hoebjo pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new f6ec9f9  gnu: gcc-arm-none-eabi@7-2018-q2-update: Fix conflicting GCC 
headers.
f6ec9f9 is described below

commit f6ec9f9d39eeab1eb5432272d47f87f70e95a890
Author: Björn Höfling <address@hidden>
AuthorDate: Thu May 14 08:12:07 2020 +0200

    gnu: gcc-arm-none-eabi@7-2018-q2-update: Fix conflicting GCC headers.
    
    This is a follow-up of 7f6d3f395023ff430cf8b7a981d4780698e9d132 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.
---
 gnu/packages/embedded.scm | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index b83b67f..6ac1a2d 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <address@hidden>
 ;;; Copyright © 2018, 2019 Clément Lassieur <address@hidden>
 ;;; Copyright © 2020 Marius Bakke <address@hidden>
+;;; Copyright © 2020 Björn Höfling <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -250,7 +251,7 @@ usable on embedded products.")
            (origin-patches (package-source gcc-7))
            (search-patches "gcc-7-cross-environment-variables.patch")))))
       (native-inputs
-       `(("gcc" ,gcc-5)
+       `(("gcc@5" ,gcc-5)
          ("flex" ,flex)
          ("isl" ,isl-0.18)
          ,@(alist-delete "isl" (package-native-inputs xgcc))))
@@ -269,7 +270,22 @@ usable on embedded products.")
                (lambda _
                  (substitute* "gcc/genmultilib"
                    (("#!/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)
           ;; The configure flags are largely identical to the flags used by the
           ;; "GCC ARM embedded" project.



reply via email to

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