Gentoo Archives: gentoo-dev

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-dev@l.g.o
Cc: Sergei Trofimovich <slyfox@g.o>, William Hubbs <williamh@g.o>, Mike Gilbert <floppym@g.o>
Subject: [gentoo-dev] [PATCH] meson.eclass: override 'nm' tool with tuple-prefixed one
Date: Fri, 12 Jun 2020 18:37:59
Message-Id: 20200612183743.2509327-1-slyfox@gentoo.org
1 x11-libs/libdrm and media-libs/libglvnd fail to find 'nm'
2 tool on sys-devel/binutils-config[-native-symlinks] system as:
3 `meson.build:40:0: ERROR: Program(s) ['nm'] not found or not executable`
4
5 It's caused by the code that locates the tool as:
6 `prog_nm = find_program('nm')`.
7
8 The change adds 'nm' tool along with other binutils tools.
9
10 CC: William Hubbs <williamh@g.o>
11 CC: Mike Gilbert <floppym@g.o>
12 Closes: https://bugs.gentoo.org/720886
13 Signed-off-by: Sergei Trofimovich <slyfox@g.o>
14 ---
15 eclass/meson.eclass | 2 ++
16 1 file changed, 2 insertions(+)
17
18 diff --git a/eclass/meson.eclass b/eclass/meson.eclass
19 index e79faa1beea..20f74a29b83 100644
20 --- a/eclass/meson.eclass
21 +++ b/eclass/meson.eclass
22 @@ -178,6 +178,7 @@ _meson_create_cross_file() {
23 cpp = $(_meson_env_array "$(tc-getCXX)")
24 fortran = $(_meson_env_array "$(tc-getFC)")
25 llvm-config = '$(tc-getPROG LLVM_CONFIG llvm-config)'
26 + nm = $(_meson_env_array "$(tc-getNM nm)")
27 objc = $(_meson_env_array "$(tc-getPROG OBJC cc)")
28 objcpp = $(_meson_env_array "$(tc-getPROG OBJCXX c++)")
29 pkgconfig = '$(tc-getPKG_CONFIG)'
30 @@ -228,6 +229,7 @@ _meson_create_native_file() {
31 cpp = $(_meson_env_array "$(tc-getBUILD_CXX)")
32 fortran = $(_meson_env_array "$(tc-getBUILD_PROG FC gfortran)")
33 llvm-config = '$(tc-getBUILD_PROG LLVM_CONFIG llvm-config)'
34 + nm = $(_meson_env_array "$(tc-getBUILD_NM nm)")
35 objc = $(_meson_env_array "$(tc-getBUILD_PROG OBJC cc)")
36 objcpp = $(_meson_env_array "$(tc-getBUILD_PROG OBJCXX c++)")
37 pkgconfig = '$(tc-getBUILD_PKG_CONFIG)'
38 --
39 2.27.0

Replies