Skip to contentSkip to conversation

perf tools: Fix compiling error in libunwind x86

PATCH Superseded Wang Nan 3 participants 3 messages Dec 6, 2017 – Jan 11, 2018 perf events

lore
Share & tools
lore

Wang Nan

author
#0 lore raw

PATCH 1/1 perf tools: Fix compiling error in libunwind x86

Fix a compiling error:

...
CC util/libunwind/x86_32.o
In file included from util/libunwind/x86_32.c:33:0:
util/libunwind/../../arch/x86/util/unwind-libunwind.c: In function 'libunwind__x86_reg_id':
util/libunwind/../../arch/x86/util/unwind-libunwind.c:110:11: error: 'EINVAL' undeclared (first use in this function)

    return -EINVAL;
            ^

util/libunwind/../../arch/x86/util/unwind-libunwind.c:110:11: note: each undeclared identifier is reported only once for each function it appears in
mv: cannot stat 'util/libunwind/.x86_32.o.tmp': No such file or directory
make[4]: *** [util/libunwind/x86_32.o] Error 1
make[3]: *** [util] Error 2
make[2]: *** [libperf-in.o] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

It happens when libunwind-x86 feature is detected.

---
 tools/perf/arch/x86/util/unwind-libunwind.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/arch/x86/util/unwind-libunwind.c +1 -1
index 9c917f8..05920e3 100644
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 
-#ifndef REMOTE_UNWIND_LIBUNWIND
 #include <errno.h>
+#ifndef REMOTE_UNWIND_LIBUNWIND
 #include <libunwind.h>
 #include "perf_regs.h"
 #include "../../util/unwind.h"
Signature · 1 line
2.10.1
#1 lore raw

Em Wed, Dec 06, 2017 at 01:50:40AM +0000, Wang Nan escreveu:

Quoted 17 lines

Fix a compiling error:

...
CC util/libunwind/x86_32.o
In file included from util/libunwind/x86_32.c:33:0:
util/libunwind/../../arch/x86/util/unwind-libunwind.c: In function 'libunwind__x86_reg_id':
util/libunwind/../../arch/x86/util/unwind-libunwind.c:110:11: error: 'EINVAL' undeclared (first use in this function)

    return -EINVAL;
            ^

util/libunwind/../../arch/x86/util/unwind-libunwind.c:110:11: note: each undeclared identifier is reported only once for each function it appears in
mv: cannot stat 'util/libunwind/.x86_32.o.tmp': No such file or directory
make[4]: *** [util/libunwind/x86_32.o] Error 1
make[3]: *** [util] Error 2
make[2]: *** [libperf-in.o] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

Quoted 1 line

It happens when libunwind-x86 feature is detected.

Thanks, simple enough, applied.

- Arnaldo

Quoted 20 lines
---
 tools/perf/arch/x86/util/unwind-libunwind.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/arch/x86/util/unwind-libunwind.c +1 -1
index 9c917f8..05920e3 100644
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 
-#ifndef REMOTE_UNWIND_LIBUNWIND
 #include <errno.h>
+#ifndef REMOTE_UNWIND_LIBUNWIND
 #include <libunwind.h>
 #include "perf_regs.h"
 #include "../../util/unwind.h"
Signature · 1 line
2.10.1
#2 lore raw

[tip:perf/core] perf tools: Fix compile error with libunwind x86

In reply to Wang Nan
perf tools: Fix compile error with libunwind x86
Commit-ID:  44df1afdb174fd6038e419f80efd914c0b5f2f85
Gitweb:     https://git.kernel.org/tip/44df1afdb174fd6038e419f80efd914c0b5f2f85
Author:     Wang Nan <[email protected]>
AuthorDate: Wed, 6 Dec 2017 01:50:40 +0000
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 8 Jan 2018 11:11:57 -0300

perf tools: Fix compile error with libunwind x86

Fix a compile error:

...
CC util/libunwind/x86_32.o
In file included from util/libunwind/x86_32.c:33:0:
util/libunwind/../../arch/x86/util/unwind-libunwind.c: In function 'libunwind__x86_reg_id':
util/libunwind/../../arch/x86/util/unwind-libunwind.c:110:11: error: 'EINVAL' undeclared (first use in this function)

    return -EINVAL;
            ^

util/libunwind/../../arch/x86/util/unwind-libunwind.c:110:11: note: each undeclared identifier is reported only once for each function it appears in
mv: cannot stat 'util/libunwind/.x86_32.o.tmp': No such file or directory
make[4]: *** [util/libunwind/x86_32.o] Error 1
make[3]: *** [util] Error 2
make[2]: *** [libperf-in.o] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

It happens when libunwind-x86 feature is detected.

---
 tools/perf/arch/x86/util/unwind-libunwind.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/arch/x86/util/unwind-libunwind.c +1 -1
index 9c917f8..05920e3 100644
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 
-#ifndef REMOTE_UNWIND_LIBUNWIND
 #include <errno.h>
+#ifndef REMOTE_UNWIND_LIBUNWIND
 #include <libunwind.h>
 #include "perf_regs.h"
 #include "../../util/unwind.h"