summary refs log tree commit diff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-09-20 19:56:30 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-02-09 21:53:41 +0100
commit01e8263febb9634564b4b73af49b81a36567a11b (patch)
treea677ded14474ed0ba2b84a800592ac0577b56b27 /gnu/packages/commencement.scm
parentde92ab21c162e69bd15b7215ade61bc47603c8bc (diff)
downloadguix-01e8263febb9634564b4b73af49b81a36567a11b.tar.gz
gnu: Use GCC 7 as the default compiler.
* gnu/packages/cross-base.scm (%gcc-cross-include-paths): Remove
CROSS_C_INCLUDE_PATH & co in favor of CROSS_CPATH.
* gnu/build/cross-toolchain.scm (%gcc-cross-include-paths): Likewise.
(cross-gcc-build-phases): Set CROSS_C_INCLUDE_PATH and
CROSS_CPLUS_INCLUDE_PATH when building the cross GCC.
* gnu/packages/commencement.scm (libstdc++): Add
"--disable-libstdcxx-dual-abi" to #:configure-flags.
(gcc-boot0)[arguments]: Add "--disable-libmpx"
to #:configure-flags.
(gcc-final): Add phase to set C_INCLUDE_PATH and CPLUS_INCLUDE_PATH before
building GCC.
(gcc-toolchain-5): Use MAKE-GCC-TOOLCHAIN.
(gcc-toolchain-7): Change to GCC-TOOLCHAIN.
* gnu/packages/gcc.scm (gcc): Change from GCC-5 to GCC-7.
(gfortran): Change to GFORTRAN-7.
(gcc-objc): Change to GCC-OBJC-7.
(gcc-objc++): Change to GCC-OBJC++-7.
* gnu/packages/rust.scm (rust-1.19.0)[native-search-paths]: Change from
C_INCLUDE_PATH & co to CPATH.
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm22
1 files changed, 17 insertions, 5 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 79246a0c5d..92a67acede 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1578,6 +1579,7 @@ exec " gcc "/bin/" program
                             "--disable-libsanitizer"
                             "--disable-libitm"
                             "--disable-libgomp"
+                            "--disable-libmpx"
                             "--disable-libcilkrts"
                             "--disable-libvtv"
                             "--disable-libssp"
@@ -2118,6 +2120,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
          ;; except for the configure-flags.
          ,@(package-arguments lib)
          #:configure-flags `("--disable-shared"
+                             "--disable-libstdcxx-dual-abi"
                              "--disable-libstdcxx-threads"
                              "--disable-libstdcxx-pch"
                              ,(string-append "--with-gxx-include-dir="
@@ -2207,6 +2210,15 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
                                            char-set:letter)
                                          ,(package-name lib)))
                              (list gmp-6.0 mpfr mpc))
+                      #t)))
+                (add-before 'configure 'treat-glibc-as-system-header
+                  (lambda* (#:key inputs #:allow-other-keys)
+                    (let ((libc (assoc-ref inputs "libc")))
+                      ;; Make sure Glibc is treated as a "system header" so
+                      ;; #include_next does the right thing.
+                      (for-each (lambda (var)
+                                  (setenv var (string-append libc "/include")))
+                                '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"))
                       #t))))))))
 
     ;; This time we want Texinfo, so we get the manual.  Add
@@ -2455,23 +2467,23 @@ and binaries, plus debugging symbols in the 'debug' output), and Binutils.")
               ("libc-debug" ,glibc-final "debug")
               ("libc-static" ,glibc-final "static")))))
 
+(define-public gcc-toolchain
+  (make-gcc-toolchain gcc-final))
+
 (define-public gcc-toolchain-4.8
   (make-gcc-toolchain gcc-4.8))
 
 (define-public gcc-toolchain-4.9
   (make-gcc-toolchain gcc-4.9))
 
-(define-public gcc-toolchain
-  (make-gcc-toolchain gcc-final))
-
 (define-public gcc-toolchain-5
-  gcc-toolchain)
+  (make-gcc-toolchain gcc-5))
 
 (define-public gcc-toolchain-6
   (make-gcc-toolchain gcc-6))
 
 (define-public gcc-toolchain-7
-  (make-gcc-toolchain gcc-7))
+  gcc-toolchain)
 
 (define-public gcc-toolchain-8
   (make-gcc-toolchain gcc-8))