guix-commits
[Top][All Lists]
Advanced

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

04/07: gnu: gcc: Use 'gcc-configure-flags-for-triplet' for native builds


From: Mark H. Weaver
Subject: 04/07: gnu: gcc: Use 'gcc-configure-flags-for-triplet' for native builds.
Date: Wed, 31 Dec 2014 22:44:04 +0000

mhw pushed a commit to branch wip-armhf
in repository guix.

commit 45cf829b86fd420ec4d80e7ba100051c8bf9eee9
Author: Mark H Weaver <address@hidden>
Date:   Wed Dec 31 03:58:58 2014 -0500

    gnu: gcc: Use 'gcc-configure-flags-for-triplet' for native builds.
    
    * gnu/packages/gcc.scm (gcc-4.7)[configure-flags]: Include result of
      'gcc-configure-flags-for-triplet'.
      (gcc-configure-flags-for-triplet): No longer export it.
    * gnu/packages/cross-base.scm (cross-gcc-arguments): No longer include
      result of 'gcc-configure-flags-for-triplet', since the base gcc packages
      now include it.
---
 gnu/packages/cross-base.scm |    1 -
 gnu/packages/gcc.scm        |   13 +++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 0f32c9f..a9ae5ee 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -88,7 +88,6 @@ may be either a libc package or #f.)"
     (substitute-keyword-arguments (package-arguments gcc-4.8)
       ((#:configure-flags flags)
        `(append (list ,(string-append "--target=" target)
-                      ,@(gcc-configure-flags-for-triplet target)
                       ,@(if libc
                             '()
                             `( ;; Disable features not needed at this stage.
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index e795f97..66d1c41 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <address@hidden>
+;;; Copyright © 2014 Mark H Weaver <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,7 +36,7 @@
   ;; Base URL for GCC's infrastructure.
   "ftp://gcc.gnu.org/pub/gcc/infrastructure/";)
 
-(define-public (gcc-configure-flags-for-triplet target)
+(define (gcc-configure-flags-for-triplet target)
   "Return a list of additional GCC `configure' flags for TARGET, a GNU triplet.
 
 The purpose of this procedure is to translate extended GNU triplets---e.g.,
@@ -101,11 +102,11 @@ where the OS part is overloaded to denote a specific 
ABI---into GCC
                                            "/include")
                             "--without-headers")))
 
-                   ;; When cross-compiling GCC, pass the right options for the
-                   ;; target triplet.
-                   (or (and=> (%current-target-system)
-                              gcc-configure-flags-for-triplet)
-                       '())
+                   ;; Pass the right options for the target triplet.
+                   (let ((triplet
+                          (or (%current-target-system)
+                              (nix-system->gnu-triplet (%current-system)))))
+                     (gcc-configure-flags-for-triplet triplet))
 
                    (maybe-target-tools))))))
     (package



reply via email to

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