forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Modifies export-check.pl to use look for $ENV{'NM'} before
defaulting to using 'nm'
 
Upstream-Status: Pending
 
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
 
 export-check.pl |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
 
Index: src/util/export-check.pl
===================================================================
--- src.orig/util/export-check.pl
+++ src/util/export-check.pl
@@ -38,7 +38,12 @@
 my($exfile, $libfile) = @ARGV;
 
 @missing = ();
-open NM, "nm -Dg --defined-only $libfile |" || die "can't run nm on $libfile: $!";
+if (defined($ENV{'NM'})) {
+    $nm = $ENV{'NM'};
+} else {
+    $nm = "nm";
+}
+open NM, "$nm -Dg --defined-only $libfile |" || die "can't run nm on $libfile: $!";
 open EXPORT, "< $exfile" || die "can't read $exfile: $!";
 
 @export = <EXPORT>;