build-system/gnu: Always invoke `configure' with a relative path.
* guix/build/gnu-build-system.scm (configure): Change SRCDIR to always be a relative path.
This commit is contained in:
parent
a436d2018e
commit
84209975fd
|
@ -92,16 +92,24 @@
|
||||||
includedir "/include"))
|
includedir "/include"))
|
||||||
'())
|
'())
|
||||||
,@configure-flags))
|
,@configure-flags))
|
||||||
(srcdir (getcwd)))
|
(abs-srcdir (getcwd))
|
||||||
(format #t "source directory: ~s~%" srcdir)
|
(srcdir (if out-of-source?
|
||||||
|
(string-append "../" (basename abs-srcdir))
|
||||||
|
".")))
|
||||||
|
(format #t "source directory: ~s (relative from build: ~s)~%"
|
||||||
|
abs-srcdir srcdir)
|
||||||
(if out-of-source?
|
(if out-of-source?
|
||||||
(begin
|
(begin
|
||||||
(mkdir "../build")
|
(mkdir "../build")
|
||||||
(chdir "../build")))
|
(chdir "../build")))
|
||||||
(format #t "build directory: ~s~%" (getcwd))
|
(format #t "build directory: ~s~%" (getcwd))
|
||||||
(format #t "configure flags: ~s~%" flags)
|
(format #t "configure flags: ~s~%" flags)
|
||||||
|
|
||||||
|
;; Call `configure' with a relative path. Otherwise, GCC's build system
|
||||||
|
;; (for instance) records absolute source file names, which typically
|
||||||
|
;; contain the hash part of the `.drv' file, leading to a reference leak.
|
||||||
(zero? (apply system*
|
(zero? (apply system*
|
||||||
(string-append (if out-of-source? srcdir ".") "/configure")
|
(string-append srcdir "/configure")
|
||||||
flags))))
|
flags))))
|
||||||
|
|
||||||
(define* (build #:key (make-flags '()) (parallel-build? #t)
|
(define* (build #:key (make-flags '()) (parallel-build? #t)
|
||||||
|
|
Loading…
Reference in New Issue