aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-08-30 23:30:42 +0200
committerLudovic Courtès <ludo@gnu.org>2012-08-30 23:30:42 +0200
commit84209975fd6a475321e96a5243157a4b4a098a33 (patch)
treefcf39d26a9b88568becb5b23aec9b6e3adc43444 /guix
parenta436d2018ec6a46fcb6e5c74fa7575789e23dd98 (diff)
downloadgnu-guix-84209975fd6a475321e96a5243157a4b4a098a33.tar
gnu-guix-84209975fd6a475321e96a5243157a4b4a098a33.tar.gz
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.
Diffstat (limited to 'guix')
-rw-r--r--guix/build/gnu-build-system.scm14
1 files changed, 11 insertions, 3 deletions
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 5cc3629e27..a1a0f03467 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -92,16 +92,24 @@
includedir "/include"))
'())
,@configure-flags))
- (srcdir (getcwd)))
- (format #t "source directory: ~s~%" srcdir)
+ (abs-srcdir (getcwd))
+ (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?
(begin
(mkdir "../build")
(chdir "../build")))
(format #t "build directory: ~s~%" (getcwd))
(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*
- (string-append (if out-of-source? srcdir ".") "/configure")
+ (string-append srcdir "/configure")
flags))))
(define* (build #:key (make-flags '()) (parallel-build? #t)