[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#38122] [PATCH 006/197] gnu: Fix make-gcc-libc.
From: |
Hartmut Goebel |
Subject: |
[bug#38122] [PATCH 006/197] gnu: Fix make-gcc-libc. |
Date: |
Fri, 8 Nov 2019 11:33:34 +0100 |
From: Carl Dong <address@hidden>
Until now the following wouldn't build:
--8<---------------cut here---------------start------------->8---
(use-modules (gnu packages commencement)
(gnu packages gcc)
(gnu packages base))
(make-gcc-libc gcc-9 glibc-2.27)
--8<---------------cut here---------------end--------------->8---
* gnu/packages/base.scm (make-gcc-libc)[phases]: Add environment
variables to place the target libc on the system header search path.
[make-flags]: Remove unncessary FLAGS_FOR_TARGET.
[native-inputs]: Construct in a way that doesn't require emptying
inputs.
---
gnu/packages/base.scm | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 4e80a2fadb..3a3360dc7a 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -981,18 +981,23 @@ with the Linux kernel.")
(substitute-keyword-arguments
(ensure-keyword-arguments (package-arguments base-gcc)
'(#:implicit-inputs? #f))
- ((#:make-flags flags)
- `(let ((libc (assoc-ref %build-inputs "libc")))
- ;; FLAGS_FOR_TARGET are needed for the target libraries to
receive
- ;; the -Bxxx for the startfiles.
- (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
- ,flags)))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'treat-glibc-as-system-header
+ (lambda _
+ (let ((libc (assoc-ref %build-inputs "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)))))))
(native-inputs
- `(("libc" ,libc)
- ("libc:static" ,libc "static")
- ,@(append (package-inputs base-gcc)
- (fold alist-delete (%final-inputs) '("libc"
"libc:static")))))
- (inputs '())))
+ `(,@(package-native-inputs base-gcc)
+ ,@(append (fold alist-delete (%final-inputs) '("libc"
"libc:static")))
+ ("libc" ,libc)
+ ("libc:static" ,libc "static")))))
(define-public (make-glibc-locales glibc)
(package
--
2.21.0
- [bug#38122] [PATCH 0/1] qtwebkit: Uses sqlite-with-column-metadata., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 001/197] gnu: Add emacs-eshell-prompt-extras., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 1/1] gnu: qtwebkit: Uses sqlite-with-column-metadata., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 003/197] gnu: Fix attribution., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 002/197] gnu: Add emacs-eshell-did-you-mean., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 004/197] gnu: make-nsis: Fix cross-compilation., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 005/197] gnu: Add dxvk., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 006/197] gnu: Fix make-gcc-libc.,
Hartmut Goebel <=
- [bug#38122] [PATCH 007/197] gnu: Add gitg., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 010/197] services: ntp: Ensure no double quotes are output to config file., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 012/197] gnu: pingus: Adjust for GCC 7., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 011/197] gnu: pingus: Update source URI., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 008/197] gnu: Add python-keyutils., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 013/197] gnu: Remove python2-feather-format., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 009/197] gnu: Add udiskie., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 015/197] gnu: pocl: Update to 1.4., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 017/197] gnu: Chibi-Scheme: Update to 0.8., Hartmut Goebel, 2019/11/08
- [bug#38122] [PATCH 018/197] gnu: Chibi-Scheme: Do not use unstable tarball., Hartmut Goebel, 2019/11/08