summaryrefslogtreecommitdiff
path: root/guix/build/meson-build-system.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-07-26 23:44:26 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-07-28 14:54:18 +0200
commit94eb59fb4ac3dfa501e9cac42454c030506ab7f1 (patch)
tree386264a7e03f6d30707d99bb909c8d639b24d3ee /guix/build/meson-build-system.scm
parent963157f1cc421dba0623964dcdfd124e1cc64540 (diff)
downloadgnu-guix-94eb59fb4ac3dfa501e9cac42454c030506ab7f1.tar
gnu-guix-94eb59fb4ac3dfa501e9cac42454c030506ab7f1.tar.gz
build-system/meson: Remove RUNPATH workarounds.
* guix/build-system/meson.scm (default-patchelf): Remove. (lower)[build-inputs]: Remove PATCHELF. (meson-build): Don't delete 'fix-runpath' phase on armhf. * guix/build/meson-build-system.scm (configure): Add "--c_link_args" and "-cpp_link_args" instead of setting LDFLAGS. (meson-build): Don't apply 'fix-runpath' phase.
Diffstat (limited to 'guix/build/meson-build-system.scm')
-rw-r--r--guix/build/meson-build-system.scm23
1 files changed, 12 insertions, 11 deletions
diff --git a/guix/build/meson-build-system.scm b/guix/build/meson-build-system.scm
index e4aae8212f..80e54723c5 100644
--- a/guix/build/meson-build-system.scm
+++ b/guix/build/meson-build-system.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
+;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -44,18 +45,13 @@
(prefix (assoc-ref outputs "out"))
(args `(,(string-append "--prefix=" prefix)
,(string-append "--buildtype=" build-type)
+ ,(string-append "-Dc_link_args=-Wl,-rpath="
+ (assoc-ref outputs "out") "/lib")
+ ,(string-append "-Dcpp_link_args=-Wl,-rpath="
+ (assoc-ref outputs "out") "/lib")
,@configure-flags
,source-dir)))
- ;; Meson lacks good facilities for dealing with RUNPATH, so we
- ;; add the output "lib" directory here to avoid doing that in
- ;; many users. Related issues:
- ;; * <https://github.com/mesonbuild/meson/issues/314>
- ;; * <https://github.com/mesonbuild/meson/issues/3038>
- ;; * <https://github.com/NixOS/nixpkgs/issues/31222>
- (unless (getenv "LDFLAGS")
- (setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib")))
-
(mkdir build-dir)
(chdir build-dir)
(apply invoke "meson" args)))
@@ -148,8 +144,13 @@ for example libraries only needed for the tests."
(replace 'configure configure)
(replace 'build build)
(replace 'check check)
- (replace 'install install)
- (add-after 'strip 'fix-runpath fix-runpath)))
+ ;; XXX: We used to have 'fix-runpath' here, but it appears no longer
+ ;; necessary with newer Meson. However on 'core-updates' there is a
+ ;; useful 'strip-runpath' procedure to ensure no bogus directories in
+ ;; RUNPATH (remember that we tell Meson to not touch RUNPATH in
+ ;; (@ (gnu packages build-tools) meson-for-build)), so it should be
+ ;; re-added there sans the augment-rpath calls (which are not needed).
+ (replace 'install install)))
(define* (meson-build #:key inputs phases
#:allow-other-keys #:rest args)