guix-commits
[Top][All Lists]
Advanced

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

04/05: gnu: make-bootstrap: Adjust for GCC7.


From: guix-commits
Subject: 04/05: gnu: make-bootstrap: Adjust for GCC7.
Date: Thu, 28 Feb 2019 14:22:59 -0500 (EST)

mbakke pushed a commit to branch core-updates
in repository guix.

commit e050aa1990ca846ccbf27327bc9009ffcfa0d578
Author: Marius Bakke <address@hidden>
Date:   Wed Feb 27 20:39:13 2019 +0100

    gnu: make-bootstrap: Adjust for GCC7.
    
    This is a follow-up to commit 01e8263febb9634564b4b73af49b81a36567a11b.
    
    * gnu/packages/make-bootstrap.scm (package-with-relocatable-glibc): Add the
    GCC7 'treat-glibc-as-system-header' build phase.
---
 gnu/packages/make-bootstrap.scm | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 86e331b..ec477da 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <address@hidden>
 ;;; Copyright © 2018 Mark H Weaver <address@hidden>
 ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <address@hidden>
+;;; Copyright © 2019 Marius Bakke <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -114,11 +115,26 @@ for `sh' in $PATH, and without nscd, and with static NSS 
modules."
         `(("libc" ,(glibc-for-bootstrap))
           ("libc:static" ,(glibc-for-bootstrap) "static")
           ("gcc" ,(package (inherit gcc)
-                    (outputs '("out")) ; all in one so libgcc_s is easily found
+                    (outputs '("out"))  ;all in one so libgcc_s is easily found
                     (inputs
-                     `(("libc" ,(glibc-for-bootstrap))
+                     `(;; Distinguish the name so we can refer to it below.
+                       ("bootstrap-libc" ,(glibc-for-bootstrap))
                        ("libc:static" ,(glibc-for-bootstrap) "static")
-                       ,@(package-inputs gcc)))))
+                       ,@(package-inputs gcc)))
+                    (arguments
+                     (substitute-keyword-arguments (package-arguments gcc)
+                       ((#:phases phases)
+                        `(modify-phases ,phases
+                           (add-before 'configure 'treat-glibc-as-system-header
+                             (lambda* (#:key inputs #:allow-other-keys)
+                               (let ((libc (assoc-ref inputs 
"bootstrap-libc")))
+                                 ;; GCCs build processes requires that the libc
+                                 ;; we're building against is on the system 
header
+                                 ;; search path.
+                                 (for-each (lambda (var)
+                                             (setenv var (string-append libc 
"/include")))
+                                           '("C_INCLUDE_PATH" 
"CPLUS_INCLUDE_PATH"))
+                                 #t)))))))))
           ,@(fold alist-delete (%final-inputs) '("libc" "gcc")))))
 
   (package-with-explicit-inputs p inputs



reply via email to

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