linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf: fix building error in x86_64 when dwarf unwind is on
@ 2014-12-27  1:26 Wang Nan
  2014-12-29  7:56 ` Namhyung Kim
  0 siblings, 1 reply; 16+ messages in thread
From: Wang Nan @ 2014-12-27  1:26 UTC (permalink / raw)
  To: namhyung, mingo; +Cc: linux-kernel, lizefan

When build with 'make ARCH=x86' and dwarf unwind is on, there is a
compiling error:

   CC       /home/wn/perf/arch/x86/util/unwind-libdw.o
   CC       /home/wn/perf/arch/x86/tests/regs_load.o
 arch/x86/tests/regs_load.S: Assembler messages:
 arch/x86/tests/regs_load.S:65: Error: operand type mismatch for `push'
 arch/x86/tests/regs_load.S:72: Error: operand type mismatch for `pop'
 make[1]: *** [/home/wn/perf/arch/x86/tests/regs_load.o] Error 1
 make[1]: INTERNAL: Exiting with 25 jobserver tokens available; should be 24!
 make: *** [all] Error 2
 ...

Which is caused by incorrectly undefine macro HAVE_ARCH_X86_64_SUPPORT.
'config/Makefile.arch' tests __x86_64__ only when 'ARCH=x86_64'. However,
with 'ARCH=x86', the underlying compile may also be x86_64, which causes
mismatching.

This patch fixes it by checking __x86_64__ in both case of
'ARCH=x86_64' and 'ARCH=x86'.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
---
 tools/perf/config/Makefile.arch | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/config/Makefile.arch b/tools/perf/config/Makefile.arch
index 851cd01..303a096 100644
--- a/tools/perf/config/Makefile.arch
+++ b/tools/perf/config/Makefile.arch
@@ -15,6 +15,8 @@ endif
 
 ifeq ($(ARCH),x86_64)
   override ARCH := x86
+endif
+ifeq ($(ARCH),x86)
   IS_X86_64 := 0
   ifeq (, $(findstring m32,$(CFLAGS)))
     IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -x c - | tail -n 1)
-- 
1.8.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* Re: [PATCH] perf: fix building error in x86_64 when dwarf unwind is on.
@ 2015-02-03 19:58 Christopher Covington
  0 siblings, 0 replies; 16+ messages in thread
From: Christopher Covington @ 2015-02-03 19:58 UTC (permalink / raw)
  To: Wang Nan, Namhyung Kim, Jiri Olsa, linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo
  Cc: Li Zefan, Ingo Molnar, linux-perf-users

Hi,

Commit c6e5e9fbc3ea1c1a5648a3498d085fc3978df2d4 breaks the following make
invocation (-j, -C, O=, LDFLAGS=, and build directory prefix stripped to
simplify report):

make ARCH=x86_64 CROSS_COMPILE= EXTRA_CFLAGS=
config/Makefile:128: The path 'python-config' is not executable.
config/Makefile:349: No libdw.h found or old libdw.h found or elfutils is
older than 0.138, disables dwarf support. Please install new
elfutils-devel/libdw-dev
config/Makefile:401: Disabling post unwind, no support found.
config/Makefile:439: No libaudit.h found, disables 'trace' tool, please
install audit-libs-devel or libaudit-dev
config/Makefile:453: slang not found, disables TUI support. Please install
slang-devel or libslang-dev
config/Makefile:466: GTK2 not found, disables GTK2 support. Please install
gtk2-devel or libgtk2.0-dev
config/Makefile:494: Missing perl devel files. Disabling perl scripting
support, consider installing perl-ExtUtils-Embed
config/Makefile:525: No python-config tool was found
config/Makefile:525: Python support will not be built
config/Makefile:597: No bfd.h/libbfd found, install
binutils-dev[el]/zlib-static to gain symbol demangling
config/Makefile:627: No numa.h found, disables 'perf bench numa mem'
benchmark, please install numactl-devel/libnuma-devel/libnuma-dev

Auto-detecting system features:
...                         dwarf: [ ^[[31mOFF^[[m ]
...                         glibc: [ ^[[32mon^[[m  ]
...                          gtk2: [ ^[[31mOFF^[[m ]
...                      libaudit: [ ^[[31mOFF^[[m ]
...                        libbfd: [ ^[[31mOFF^[[m ]
...                        libelf: [ ^[[32mon^[[m  ]
...                       libnuma: [ ^[[31mOFF^[[m ]
...                       libperl: [ ^[[31mOFF^[[m ]
...                     libpython: [ ^[[31mOFF^[[m ]
...                      libslang: [ ^[[31mOFF^[[m ]
...                     libunwind: [ ^[[31mOFF^[[m ]
...            libdw-dwarf-unwind: [ ^[[31mOFF^[[m ]
...                          zlib: [ ^[[32mon^[[m  ]

[...]

  AR       x86_64-linux-gnu/perf/libperf.a
  LINK     x86_64-linux-gnu/perf/perf
x86_64-linux-gnu/perf/tests/builtin-test.o:(.data+0x158): undefined reference
to `test__perf_time_to_tsc'
collect2: ld returned 1 exit status

Thanks,
Chris

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

end of thread, other threads:[~2015-02-03 19:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-27  1:26 [PATCH] perf: fix building error in x86_64 when dwarf unwind is on Wang Nan
2014-12-29  7:56 ` Namhyung Kim
2014-12-29  8:14   ` Wang Nan
2015-01-07  2:53     ` Wang Nan
2015-01-07  5:40       ` Namhyung Kim
2015-01-07  8:39         ` Jiri Olsa
2015-01-07 12:28           ` Wang Nan
2015-01-07 13:50             ` Namhyung Kim
2015-01-08  1:30               ` Wang Nan
2015-01-08  5:09                 ` Namhyung Kim
2015-01-09 14:43                   ` Jiri Olsa
2015-01-12  2:20                     ` Wang Nan
2015-01-12  3:28                       ` Namhyung Kim
2015-01-12 10:36                         ` Jiri Olsa
2015-01-17 10:10                       ` [tip:perf/urgent] perf tools: Fix " tip-bot for Namhyung Kim
  -- strict thread matches above, loose matches on Subject: below --
2015-02-03 19:58 [PATCH] perf: fix " Christopher Covington

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).