From 1c93be5600fb90a64cbbdf7a55061902d2ff150a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 7 Jun 2014 17:23:53 +0200 Subject: 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. --- gnu/packages/base.scm | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 937579b7d7..1755ba17e6 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -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 -- cgit v1.2.3