linux-tools/perf: Add dependency on atomic ops for ARC
PATCH 1/1 linux-tools/perf: Add dependency on atomic ops for ARC
Atomic ops are strictly required by perf utility as it uses atomic_xxx() functions.
Otherwise building fails like that:
|.../output/host/opt/ext-toolchain/bin/../lib/gcc/arc-snps-linux-uclibc/8.2.1/../../../../arc-snps-linux-uclibc/bin/ld: |.../output/build/linux-5.0.7/tools/perf/libperf.a(libperf-in.o): in function `atomic_cmpxchg': |.../output/build/linux-5.0.7/tools/include/asm-generic/atomic-gcc.h:69: undefined reference to `__sync_val_compare_and_swap_4'
--- package/linux-tools/Config.in | 4 ++++ 1 file changed, 4 insertions(+)
package/linux-tools/Config.in +4 -0
@@ -46,6 +46,7 @@ config BR2_PACKAGE_LINUX_TOOLS_PCI config BR2_PACKAGE_LINUX_TOOLS_PERF bool "perf" select BR2_PACKAGE_LINUX_TOOLS + depends on !BR2_arc || BR2_ARC_ATOMIC_EXT help perf (sometimes "Perf Events" or perf tools, originally "Performance Counters for Linux") - is a performance
@@ -64,6 +65,9 @@ config BR2_PACKAGE_LINUX_TOOLS_PERF https://perf.wiki.kernel.org/ +comment "perf needs atomic ops like LLOCK/SCOND on ARC" + depends on BR2_arc && !BR2_ARC_ATOMIC_EXT + if BR2_PACKAGE_LINUX_TOOLS_PERF config BR2_PACKAGE_LINUX_TOOLS_PERF_TUI
Signature · 1 line
2.16.2
PATCH 1/1 linux-tools/perf: Add dependency on atomic ops for ARC
Hello,
Quoted 18 lines · On Thu, 18 Apr 2019 12:30:25 +0300 Alexey Brodkin…
Atomic ops are strictly required by perf utility as it uses
atomic_xxx()functions.Otherwise building fails like that:
|.../output/host/opt/ext-toolchain/bin/../lib/gcc/arc-snps-linux-uclibc/8.2.1/../../../../arc-snps-linux-uclibc/bin/ld: |.../output/build/linux-5.0.7/tools/perf/libperf.a(libperf-in.o): in function `atomic_cmpxchg': |.../output/build/linux-5.0.7/tools/include/asm-generic/atomic-gcc.h:69: undefined reference to `__sync_val_compare_and_swap_4'Signed-off-by Alexey Brodkin <[email protected]>--- package/linux-tools/Config.in | 4 ++++ 1 file changed, 4 insertions(+)package/linux-tools/Config.in +0
-0
package/linux-tools/Config.in config BR2_PACKAGE_LINUX_TOOLS_PCI · line 49
Quoted 4 lines
package/linux-tools/Config.in +1
-0@@ -46,6 +46,7 @@ config BR2_PACKAGE_LINUX_TOOLS_PCI config BR2_PACKAGE_LINUX_TOOLS_PERF bool "perf" select BR2_PACKAGE_LINUX_TOOLS + depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
Since the actual dependency is on sync builtins, can we use BR2_TOOLCHAIN_HAS_SYNC_4 instead ?
BR2_TOOLCHAIN_HAS_SYNC_4 is already defined like this:
config BR2_TOOLCHAIN_HAS_SYNC_4
bool
default y
depends on !BR2_m68k_cf
depends on !BR2_sparc
depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)i.e, it is already false on ARC systems that don't have BR2_ARC_ATOMIC_EXT.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 linux-tools/perf: Add dependency on atomic ops for ARC
Hi Thomas,
Quoted 15 lines
-----Original Message-----
From: Thomas Petazzoni <[email protected]>
Sent: Thursday, April 18, 2019 12:41 PM
To: Alexey Brodkin <[email protected]>
Cc: buildroot at busybox.net; ARC Buildroot mailing list <[email protected]>
Subject: Re: [arc-buildroot] [Buildroot] [PATCH] linux-tools/perf: Add dependency on atomic ops for ARCHello,
Quoted 2 lines · On Thu, 18 Apr 2019 12:30:25 +0300 Alexey Brodkin…
Atomic ops are strictly required by perf utility as it uses
atomic_xxx()functions.
[snip]
Quoted 11 lines
Since the actual dependency is on sync builtins, can we use
BR2_TOOLCHAIN_HAS_SYNC_4instead ?
BR2_TOOLCHAIN_HAS_SYNC_4is already defined like this:config
BR2_TOOLCHAIN_HAS_SYNC_4bool default y depends on !BR2_m68k_cf depends on !BR2_sparc depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
That looks much better in fact, so re-spin is coming. Thanks for the hint!
-Alexey