All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 105163] *-symbol-checks hard-code the nm executable
@ 2018-02-19 14:34 bugzilla-daemon
  2018-02-19 16:35 ` [PATCH libdrm v2] *-symbol-check: Don't hard-code " Eric Engestrom
  2018-02-26 15:18 ` [Bug 105163] *-symbol-checks hard-code the " bugzilla-daemon
  0 siblings, 2 replies; 8+ messages in thread
From: bugzilla-daemon @ 2018-02-19 14:34 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1181 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=105163

            Bug ID: 105163
           Summary: *-symbol-checks hard-code the nm executable
           Product: DRI
           Version: XOrg git
          Hardware: All
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: libdrm
          Assignee: dri-devel@lists.freedesktop.org
          Reporter: timo.gurr@gmail.com

Created attachment 137439
  --> https://bugs.freedesktop.org/attachment.cgi?id=137439&action=edit
libdrm-symbol-check-Don-t-hard-code-nm-executable.patch

Currently the *-symbol-checks hard-code the nm executable which may result in
build failures when using a prefixed toolchain, e.g.
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-nm.

There was a patch suggested in 2016 and sent to the mailing list but it hasn't
been fixed yet:

https://lists.freedesktop.org/archives/dri-devel/2016-October/119999.html

Attached is the patch in question for the sake of completeness.

It would be nice to get this fixed upstream.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2848 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH libdrm v2] *-symbol-check: Don't hard-code nm executable
  2018-02-19 14:34 [Bug 105163] *-symbol-checks hard-code the nm executable bugzilla-daemon
@ 2018-02-19 16:35 ` Eric Engestrom
  2018-02-22 23:27   ` Eric Anholt
  2018-02-23  0:25   ` Emil Velikov
  2018-02-26 15:18 ` [Bug 105163] *-symbol-checks hard-code the " bugzilla-daemon
  1 sibling, 2 replies; 8+ messages in thread
From: Eric Engestrom @ 2018-02-19 16:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Heiko Becker, Timo Gurr

From: Heiko Becker <heirecka@exherbo.org>

Helpful if your nm executable has a prefix based on the
architecture, for example.

Signed-off-by: Heiko Becker <heirecka@exherbo.org>
Cc: Timo Gurr <timo.gurr@gmail.com>
[Eric: v2: rebase and add Meson support]
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
 amdgpu/amdgpu-symbol-check       | 2 +-
 amdgpu/meson.build               | 1 +
 configure.ac                     | 1 +
 exynos/exynos-symbol-check       | 2 +-
 exynos/meson.build               | 1 +
 freedreno/freedreno-symbol-check | 2 +-
 freedreno/meson.build            | 1 +
 intel/intel-symbol-check         | 2 +-
 intel/meson.build                | 1 +
 libkms/kms-symbol-check          | 2 +-
 libkms/meson.build               | 1 +
 meson.build                      | 3 +++
 nouveau/meson.build              | 1 +
 nouveau/nouveau-symbol-check     | 2 +-
 omap/meson.build                 | 1 +
 omap/omap-symbol-check           | 2 +-
 radeon/meson.build               | 1 +
 radeon/radeon-symbol-check       | 2 +-
 tegra/meson.build                | 1 +
 tegra/tegra-symbol-check         | 2 +-
 20 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/amdgpu/amdgpu-symbol-check b/amdgpu/amdgpu-symbol-check
index 17de0c3b48f48710cde2..90b7a1d633c0b2143f29 100755
--- a/amdgpu/amdgpu-symbol-check
+++ b/amdgpu/amdgpu-symbol-check
@@ -3,7 +3,7 @@
 # The following symbols (past the first five) are taken from the public headers.
 # A list of the latter should be available Makefile.am/libdrm_amdgpuinclude_HEADERS
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_amdgpu.so} | awk '{print $3}' | while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_amdgpu.so} | awk '{print $3}' | while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 __bss_start
 _edata
diff --git a/amdgpu/meson.build b/amdgpu/meson.build
index 7040ebab86e271022323..f39d7bf6d284534dc660 100644
--- a/amdgpu/meson.build
+++ b/amdgpu/meson.build
@@ -61,5 +61,6 @@ ext_libdrm_amdgpu = declare_dependency(
 test(
   'amdgpu-symbol-check',
   prog_bash,
+  env : env_test,
   args : [files('amdgpu-symbol-check'), libdrm_amdgpu]
 )
diff --git a/configure.ac b/configure.ac
index cea0b9dda3ccc1b86061..a695cce9d48c16fbcc8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 # Check for programs
 AC_PROG_CC
 AC_PROG_CC_C99
+AC_PROG_NM
 
 if test "x$ac_cv_prog_cc_c99" = xno; then
 	AC_MSG_ERROR([Building libdrm requires C99 enabled compiler])
diff --git a/exynos/exynos-symbol-check b/exynos/exynos-symbol-check
index 9692caa685b4cd93ec4a..e9f1b04d5b0a7a258cf1 100755
--- a/exynos/exynos-symbol-check
+++ b/exynos/exynos-symbol-check
@@ -3,7 +3,7 @@
 # The following symbols (past the first five) are taken from the public headers.
 # A list of the latter should be available Makefile.am/libdrm_exynos*_HEADERS
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_exynos.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_exynos.so} | awk '{print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 __bss_start
 _edata
diff --git a/exynos/meson.build b/exynos/meson.build
index c96ad4e0cd7194a9c902..30d36405d6ef725b7e10 100644
--- a/exynos/meson.build
+++ b/exynos/meson.build
@@ -49,5 +49,6 @@ pkg.generate(
 test(
   'exynos-symbol-check',
   prog_bash,
+  env : env_test,
   args : [files('exynos-symbol-check'), libdrm_exynos]
 )
diff --git a/freedreno/freedreno-symbol-check b/freedreno/freedreno-symbol-check
index 6b81040c797aeed11dca..56e3d3eeace6f9deb280 100755
--- a/freedreno/freedreno-symbol-check
+++ b/freedreno/freedreno-symbol-check
@@ -3,7 +3,7 @@
 # The following symbols (past the first five) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBDRM_FREEDRENO_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.so} | awk '{print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 __bss_start
 _edata
diff --git a/freedreno/meson.build b/freedreno/meson.build
index da993c10355578838f29..015b7fb1c02706916e9d 100644
--- a/freedreno/meson.build
+++ b/freedreno/meson.build
@@ -72,5 +72,6 @@ pkg.generate(
 test(
   'freedreno-symbol-check',
   prog_bash,
+  env : env_test,
   args : [files('freedreno-symbol-check'), libdrm_freedreno]
 )
diff --git a/intel/intel-symbol-check b/intel/intel-symbol-check
index 2aa2d8192cea761a7cda..4d30a4b15feb94e9523d 100755
--- a/intel/intel-symbol-check
+++ b/intel/intel-symbol-check
@@ -3,7 +3,7 @@
 # The following symbols (past the first five) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBDRM_INTEL_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_intel.so} | awk '{print $3}' | while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_intel.so} | awk '{print $3}' | while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 __bss_start
 _edata
diff --git a/intel/meson.build b/intel/meson.build
index 42402f60e38cd5e7359f..53c7fce4ef97828bd63c 100644
--- a/intel/meson.build
+++ b/intel/meson.build
@@ -101,5 +101,6 @@ test(
 test(
   'intel-symbol-check',
   prog_bash,
+  env : env_test,
   args : [files('intel-symbol-check'), libdrm_intel]
 )
diff --git a/libkms/kms-symbol-check b/libkms/kms-symbol-check
index 658b269265676de25270..a5c2120d5ce75616f489 100755
--- a/libkms/kms-symbol-check
+++ b/libkms/kms-symbol-check
@@ -3,7 +3,7 @@
 # The following symbols (past the first five) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBKMS_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 __bss_start
 _edata
diff --git a/libkms/meson.build b/libkms/meson.build
index 9eff43136397b101fa1b..86d1a4ee6c795a186d66 100644
--- a/libkms/meson.build
+++ b/libkms/meson.build
@@ -70,5 +70,6 @@ pkg.generate(
 test(
   'kms-symbol-check',
   prog_bash,
+  env : env_test,
   args : [files('kms-symbol-check'), libkms]
 )
diff --git a/meson.build b/meson.build
index 23a892a318c5628eb36e..baf43701e3ab77b08ac1 100644
--- a/meson.build
+++ b/meson.build
@@ -321,6 +321,9 @@ pkg.generate(
   description : 'Userspace interface to kernel DRM services',
 )
 
+env_test = environment()
+env_test.set('NM', find_program('nm').path())
+
 if with_libkms
   subdir('libkms')
 endif
diff --git a/nouveau/meson.build b/nouveau/meson.build
index b8affd9ef776c99ba896..51c9a7123d3b34a250ea 100644
--- a/nouveau/meson.build
+++ b/nouveau/meson.build
@@ -54,5 +54,6 @@ pkg.generate(
 test(
   'nouveau-symbol-check',
   prog_bash,
+  env : env_test,
   args : [files('nouveau-symbol-check'), libdrm_nouveau]
 )
diff --git a/nouveau/nouveau-symbol-check b/nouveau/nouveau-symbol-check
index b265cea466af600a7751..b3a24101e52d8aae1bba 100755
--- a/nouveau/nouveau-symbol-check
+++ b/nouveau/nouveau-symbol-check
@@ -3,7 +3,7 @@
 # The following symbols (past the first five) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBDRM_NOUVEAU_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_nouveau.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_nouveau.so} | awk '{print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 __bss_start
 _edata
diff --git a/omap/meson.build b/omap/meson.build
index f89436f0e99970b381aa..e57b8f5da03618d94720 100644
--- a/omap/meson.build
+++ b/omap/meson.build
@@ -49,5 +49,6 @@ pkg.generate(
 test(
   'omap-symbol-check',
   prog_bash,
+  env : env_test,
   args : [files('omap-symbol-check'), libdrm_omap]
 )
diff --git a/omap/omap-symbol-check b/omap/omap-symbol-check
index 759c84bd3d98d19c2d33..0fb4a0f2664cf9edbc27 100755
--- a/omap/omap-symbol-check
+++ b/omap/omap-symbol-check
@@ -3,7 +3,7 @@
 # The following symbols (past the first five) are taken from the public headers.
 # A list of the latter should be available Makefile.am/libdrm_omap*HEADERS
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_omap.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_omap.so} | awk '{print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 __bss_start
 _edata
diff --git a/radeon/meson.build b/radeon/meson.build
index 557a878042bb78df4096..b08c744219c0c36c5d93 100644
--- a/radeon/meson.build
+++ b/radeon/meson.build
@@ -59,5 +59,6 @@ pkg.generate(
 test(
   'radeon-symbol-check',
   prog_bash,
+  env : env_test,
   args : [files('radeon-symbol-check'), libdrm_radeon]
 )
diff --git a/radeon/radeon-symbol-check b/radeon/radeon-symbol-check
index 0bf2ffcbeebce4f0c230..7d79d90127bd6d27d050 100755
--- a/radeon/radeon-symbol-check
+++ b/radeon/radeon-symbol-check
@@ -3,7 +3,7 @@
 # The following symbols (past the first five) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBDRM_RADEON_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 __bss_start
 _edata
diff --git a/tegra/meson.build b/tegra/meson.build
index 7ac815177718d301b76c..1f5c74b38d0506d1816d 100644
--- a/tegra/meson.build
+++ b/tegra/meson.build
@@ -48,5 +48,6 @@ pkg.generate(
 test(
   'tegra-symbol-check',
   prog_bash,
+  env : env_test,
   args : [files('tegra-symbol-check'), libdrm_tegra]
 )
diff --git a/tegra/tegra-symbol-check b/tegra/tegra-symbol-check
index 420469f4130119188161..509b678c37b899a25f0a 100755
--- a/tegra/tegra-symbol-check
+++ b/tegra/tegra-symbol-check
@@ -2,7 +2,7 @@
 
 # The following symbols (past the first nine) are taken from tegra.h.
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 __bss_end__
 __bss_start__
-- 
Cheers,
  Eric

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH libdrm v2] *-symbol-check: Don't hard-code nm executable
  2018-02-19 16:35 ` [PATCH libdrm v2] *-symbol-check: Don't hard-code " Eric Engestrom
@ 2018-02-22 23:27   ` Eric Anholt
  2018-02-23  0:25   ` Emil Velikov
  1 sibling, 0 replies; 8+ messages in thread
From: Eric Anholt @ 2018-02-22 23:27 UTC (permalink / raw)
  To: Eric Engestrom, dri-devel; +Cc: Heiko Becker, Timo Gurr


[-- Attachment #1.1: Type: text/plain, Size: 425 bytes --]

Eric Engestrom <eric.engestrom@imgtec.com> writes:

> From: Heiko Becker <heirecka@exherbo.org>
>
> Helpful if your nm executable has a prefix based on the
> architecture, for example.
>
> Signed-off-by: Heiko Becker <heirecka@exherbo.org>
> Cc: Timo Gurr <timo.gurr@gmail.com>
> [Eric: v2: rebase and add Meson support]
> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>

Reviewed-by: Eric Anholt <eric@anholt.net>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH libdrm v2] *-symbol-check: Don't hard-code nm executable
  2018-02-19 16:35 ` [PATCH libdrm v2] *-symbol-check: Don't hard-code " Eric Engestrom
  2018-02-22 23:27   ` Eric Anholt
@ 2018-02-23  0:25   ` Emil Velikov
  2018-02-23 15:02     ` Eric Engestrom
  1 sibling, 1 reply; 8+ messages in thread
From: Emil Velikov @ 2018-02-23  0:25 UTC (permalink / raw)
  To: Eric Engestrom; +Cc: Heiko Becker, ML dri-devel, Timo Gurr

On 19 February 2018 at 16:35, Eric Engestrom <eric.engestrom@imgtec.com> wrote:
> From: Heiko Becker <heirecka@exherbo.org>
>
> Helpful if your nm executable has a prefix based on the
> architecture, for example.
>

> +env_test = environment()
> +env_test.set('NM', find_program('nm').path())
> +
Everything else is great, just not too sure about this hunk.
Are you sure it does what the commit message says?

I know meson needs special configuration file for cross compilation -
one example where nm has prefix.
Yet the manual [1] does not say anything about nm. I cannot find any
instances of nm in the docs all together :-\

If Meson does not handle it currently, please open a bug and add a
comment with the bug number/link.

Thanks
Emil
[1] http://mesonbuild.com/Cross-compilation.html
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH libdrm v2] *-symbol-check: Don't hard-code nm executable
  2018-02-23  0:25   ` Emil Velikov
@ 2018-02-23 15:02     ` Eric Engestrom
  2018-02-23 15:04       ` Eric Engestrom
  2018-02-23 16:56       ` Emil Velikov
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Engestrom @ 2018-02-23 15:02 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Heiko Becker, ML dri-devel, Timo Gurr

On Friday, 2018-02-23 00:25:27 +0000, Emil Velikov wrote:
> On 19 February 2018 at 16:35, Eric Engestrom <eric.engestrom@imgtec.com> wrote:
> > From: Heiko Becker <heirecka@exherbo.org>
> >
> > Helpful if your nm executable has a prefix based on the
> > architecture, for example.
> >
> 
> > +env_test = environment()
> > +env_test.set('NM', find_program('nm').path())
> > +
> Everything else is great, just not too sure about this hunk.
> Are you sure it does what the commit message says?

It does, I even asked the meson devs to be sure. find_program()
respects the crossfile, unless `native: true` is added [2].

> 
> I know meson needs special configuration file for cross compilation -
> one example where nm has prefix.
> Yet the manual [1] does not say anything about nm. I cannot find any
> instances of nm in the docs all together :-\

There's nothing special about `nm` here, it's just a program that can be
set via the crossfile, like `cc` or `ar`.
I guess the documentation on the cross-compilation page [1] could be
improved to make the behaviour of find_program() more explicit; care to
send a patch? :)

> 
> If Meson does not handle it currently, please open a bug and add a
> comment with the bug number/link.
> 
> Thanks
> Emil
> [1] http://mesonbuild.com/Cross-compilation.html

[2] http://mesonbuild.com/Reference-manual.html#find_program
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH libdrm v2] *-symbol-check: Don't hard-code nm executable
  2018-02-23 15:02     ` Eric Engestrom
@ 2018-02-23 15:04       ` Eric Engestrom
  2018-02-23 16:56       ` Emil Velikov
  1 sibling, 0 replies; 8+ messages in thread
From: Eric Engestrom @ 2018-02-23 15:04 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Heiko Becker, ML dri-devel, Timo Gurr

On Friday, 2018-02-23 15:02:44 +0000, Eric Engestrom wrote:
> On Friday, 2018-02-23 00:25:27 +0000, Emil Velikov wrote:
> > On 19 February 2018 at 16:35, Eric Engestrom <eric.engestrom@imgtec.com> wrote:
> > > From: Heiko Becker <heirecka@exherbo.org>
> > >
> > > Helpful if your nm executable has a prefix based on the
> > > architecture, for example.
> > >
> > 
> > > +env_test = environment()
> > > +env_test.set('NM', find_program('nm').path())
> > > +
> > Everything else is great, just not too sure about this hunk.
> > Are you sure it does what the commit message says?
> 
> It does, I even asked the meson devs to be sure. find_program()
> respects the crossfile, unless `native: true` is added [2].
> 
> > 
> > I know meson needs special configuration file for cross compilation -
> > one example where nm has prefix.
> > Yet the manual [1] does not say anything about nm. I cannot find any
> > instances of nm in the docs all together :-\
> 
> There's nothing special about `nm` here, it's just a program that can be
> set via the crossfile, like `cc` or `ar`.
> I guess the documentation on the cross-compilation page [1] could be
> improved to make the behaviour of find_program() more explicit; care to
> send a patch? :)
> 
> > 
> > If Meson does not handle it currently, please open a bug and add a
> > comment with the bug number/link.
> > 
> > Thanks
> > Emil
> > [1] http://mesonbuild.com/Cross-compilation.html
> 
> [2] http://mesonbuild.com/Reference-manual.html#find_program

Oh btw, I'm making the same change on Mesa right now, I'll send it out
in a bit, or next week if I don't have enough spare time today.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH libdrm v2] *-symbol-check: Don't hard-code nm executable
  2018-02-23 15:02     ` Eric Engestrom
  2018-02-23 15:04       ` Eric Engestrom
@ 2018-02-23 16:56       ` Emil Velikov
  1 sibling, 0 replies; 8+ messages in thread
From: Emil Velikov @ 2018-02-23 16:56 UTC (permalink / raw)
  To: Eric Engestrom; +Cc: Heiko Becker, ML dri-devel, Timo Gurr

On 23 February 2018 at 15:02, Eric Engestrom <eric.engestrom@imgtec.com> wrote:
> On Friday, 2018-02-23 00:25:27 +0000, Emil Velikov wrote:
>> On 19 February 2018 at 16:35, Eric Engestrom <eric.engestrom@imgtec.com> wrote:
>> > From: Heiko Becker <heirecka@exherbo.org>
>> >
>> > Helpful if your nm executable has a prefix based on the
>> > architecture, for example.
>> >
>>
>> > +env_test = environment()
>> > +env_test.set('NM', find_program('nm').path())
>> > +
>> Everything else is great, just not too sure about this hunk.
>> Are you sure it does what the commit message says?
>
> It does, I even asked the meson devs to be sure. find_program()
> respects the crossfile, unless `native: true` is added [2].
>
I was thinking of cases where a) you're doing a native build and b)
the program name has a prefix.
In reality that shouldn't happen, often, so let's worry if we get
multiple bug reports.

>>
>> I know meson needs special configuration file for cross compilation -
>> one example where nm has prefix.
>> Yet the manual [1] does not say anything about nm. I cannot find any
>> instances of nm in the docs all together :-\
>
> There's nothing special about `nm` here, it's just a program that can be
> set via the crossfile, like `cc` or `ar`.
> I guess the documentation on the cross-compilation page [1] could be
> improved to make the behaviour of find_program() more explicit; care to
> send a patch? :)
>
Great, I'll let you do the honours of tweaking Meson/its documentation.

Thank you very much for the clarification.

The patch is
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 105163] *-symbol-checks hard-code the nm executable
  2018-02-19 14:34 [Bug 105163] *-symbol-checks hard-code the nm executable bugzilla-daemon
  2018-02-19 16:35 ` [PATCH libdrm v2] *-symbol-check: Don't hard-code " Eric Engestrom
@ 2018-02-26 15:18 ` bugzilla-daemon
  1 sibling, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2018-02-26 15:18 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1113 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=105163

Eric Engestrom <fdo-bugs@engestrom.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Eric Engestrom <fdo-bugs@engestrom.ch> ---
Fixed as of:

commit 4f08bfe96da1542f336589edf310d06ebce3cf20
Author: Heiko Becker <heirecka@exherbo.org>
Date:   Mon Feb 19 15:13:15 2018 +0000

    *-symbol-check: Don't hard-code nm executable

    Helpful if your nm executable has a prefix based on the
    architecture, for example.

    Signed-off-by: Heiko Becker <heirecka@exherbo.org>
    Cc: Timo Gurr <timo.gurr@gmail.com>
    [Eric: v2: rebase and add Meson support]
    Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2944 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-02-26 15:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-19 14:34 [Bug 105163] *-symbol-checks hard-code the nm executable bugzilla-daemon
2018-02-19 16:35 ` [PATCH libdrm v2] *-symbol-check: Don't hard-code " Eric Engestrom
2018-02-22 23:27   ` Eric Anholt
2018-02-23  0:25   ` Emil Velikov
2018-02-23 15:02     ` Eric Engestrom
2018-02-23 15:04       ` Eric Engestrom
2018-02-23 16:56       ` Emil Velikov
2018-02-26 15:18 ` [Bug 105163] *-symbol-checks hard-code the " bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.