gnu: glibc: Make sure the bootstrap libc is not in $CPATH.

This fixes a bug whereby the bootstrap-glibc headers could be picked up
when building libc.so, which could be noticed by the fact that the
.debug files contained references to bootstrap-glibc.

* gnu/packages/base.scm (glibc-final-with-bootstrap-bash)[arguments]:
  Add 'pre-configure' phase.
  [inputs]: Remove 'alist-delete' call.
This commit is contained in:
Ludovic Courtès 2014-06-07 17:23:53 +02:00
parent 3d78d51d8e
commit 1c93be5600
1 changed files with 22 additions and 7 deletions

View File

@ -827,22 +827,37 @@ identifier SYSTEM."
;; Build Sun/ONC RPC support. In particular,
;; install rpc/*.h.
"--enable-obsolete-rpc")
,flags)))))
,flags))
((#:phases phases)
`(alist-cons-before
'configure 'pre-configure
(lambda* (#:key inputs #:allow-other-keys)
;; Don't clobber CPATH with the bootstrap libc.
(setenv "NATIVE_CPATH" (getenv "CPATH"))
(unsetenv "CPATH")
;; 'rpcgen' needs native libc headers to be built.
(substitute* "sunrpc/Makefile"
(("sunrpc-CPPFLAGS =.*" all)
(string-append "CPATH = $(NATIVE_CPATH)\n"
"export CPATH\n"
all "\n"))))
,phases)))))
(propagated-inputs `(("linux-headers" ,(linux-libre-headers-boot0))))
(native-inputs
`(("texinfo" ,texinfo-boot0)
("perl" ,perl-boot0)))
(inputs
`( ;; A native GCC is needed to build `cross-rpcgen'.
`(;; The boot inputs. That includes the bootstrap libc. We don't want
;; it in $CPATH, hence the 'pre-configure' phase above.
,@%boot1-inputs
;; A native GCC is needed to build `cross-rpcgen'.
("native-gcc" ,@(assoc-ref %boot0-inputs "gcc"))
;; Here, we use the bootstrap Bash, which is not satisfactory
;; because we don't want to depend on bootstrap tools.
("static-bash" ,@(assoc-ref %boot0-inputs "bash"))
,@%boot1-inputs
,@(alist-delete "static-bash"
(package-inputs glibc))))))) ; patches
("static-bash" ,@(assoc-ref %boot0-inputs "bash")))))))
(define (cross-gcc-wrapper gcc binutils glibc bash)
"Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC