From 2073b55e6b964cb8ca15e8c74cb32dac00f05f0d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 6 Feb 2020 15:32:00 +0100 Subject: gnu: gcc: Switch back to using 'C_INCLUDE_PATH' instead of 'CPATH'. Fixes . Initially reported by Julien Lepiller . * gnu/packages/base.scm (make-gcc-libc): Remove 'treat-glibc-as-system-header' phase from 'arguments'. * gnu/packages/commencement.scm (gcc-final): Likewise. * gnu/packages/gcc.scm (gcc-4.7)[arguments]: Add "include/c++" to 'CPLUS_INCLUDE_PATH'. (gcc-6)[native-search-paths]: Remove. * gnu/packages/make-bootstrap.scm (gcc-for-bootstrap): Remove 'native-search-paths' and 'arguments'. * gnu/packages/patches/python-2.7-search-paths.patch, gnu/packages/patches/python-3-search-paths.patch: Replace "CPATH" with "C_INCLUDE_PATH". * guix/build-system/cmake.scm (lower): When not cross-compiling, move INPUTS from the 'host-inputs' field to the 'build-inputs' field of the bag, right after NATIVE-INPUTS. * guix/build-system/glib-or-gtk.scm (lower): Likewise. * guix/build-system/gnu.scm (lower): Likewise. * guix/build-system/meson.scm (lower): Likewise. --- guix/build-system/cmake.scm | 5 +++-- guix/build-system/glib-or-gtk.scm | 16 ++++++++-------- guix/build-system/gnu.scm | 10 ++++++++-- guix/build-system/meson.scm | 14 +++++++------- 4 files changed, 26 insertions(+), 19 deletions(-) (limited to 'guix/build-system') diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index 1fc0931a27..29259c5785 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2020 Ludovic Courtès ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2017 Ricardo Wurmus ;;; @@ -72,6 +72,7 @@ (define private-keywords '()) ,@`(("cmake" ,cmake)) ,@native-inputs + ,@(if target '() inputs) ,@(if target ;; Use the standard cross inputs of ;; 'gnu-build-system'. @@ -79,7 +80,7 @@ (define private-keywords '()) ;; Keep the standard inputs of 'gnu-build-system'. ,@(standard-packages))) - (host-inputs inputs) + (host-inputs (if target inputs '())) ;; The cross-libc is really a target package, but for bootstrapping ;; reasons, we can't put it in 'host-inputs'. Namely, 'cross-gcc' is a diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm index 8de7dfbfc2..fb1f8fb930 100644 --- a/guix/build-system/glib-or-gtk.scm +++ b/guix/build-system/glib-or-gtk.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2019 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2019, 2020 Ludovic Courtès ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2014 Federico Beffa ;;; @@ -92,15 +92,15 @@ (define private-keywords (bag (name name) (system system) - (host-inputs `(,@(if source - `(("source" ,source)) - '()) - ,@inputs)) - (build-inputs `(("glib:bin" ,glib "bin") ; to compile schemas + (host-inputs (if source + `(("source" ,source)) + '())) + (build-inputs `(,@native-inputs + ,@inputs + ("glib:bin" ,glib "bin") ; to compile schemas ,@(if implicit-inputs? (standard-packages) - '()) - ,@native-inputs)) + '()))) (outputs outputs) (build glib-or-gtk-build) (arguments (strip-keyword-arguments private-keywords arguments))))) diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 3cc89f8852..6e66f5ffce 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2019, 2020 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -296,13 +296,19 @@ (define private-keywords `(("source" ,source)) '()) ,@native-inputs + + ;; When not cross-compiling, ensure implicit inputs come + ;; last. That way, libc headers come last, which allows + ;; #include_next to work correctly; see + ;; . + ,@(if target '() inputs) ,@(if (and target implicit-cross-inputs?) (standard-cross-packages target 'host) '()) ,@(if implicit-inputs? (standard-packages) '()))) - (host-inputs inputs) + (host-inputs (if target inputs '())) ;; The cross-libc is really a target package, but for bootstrapping ;; reasons, we can't put it in 'host-inputs'. Namely, 'cross-gcc' is a diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index b29f2f4ecf..b68bcb80de 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -74,13 +74,13 @@ (define private-keywords (system system) (build-inputs `(("meson" ,meson) ("ninja" ,ninja) - ,@native-inputs)) - (host-inputs `(,@(if source - `(("source" ,source)) - '()) - ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) + ,@native-inputs + ,@inputs + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(standard-packages))) + (host-inputs (if source + `(("source" ,source)) + '())) (outputs outputs) (build meson-build) (arguments (strip-keyword-arguments private-keywords arguments))))) -- cgit v1.2.3