* [Buildroot] [PATCH v2] linux-tools/perf: Add dependency on 32-bit atomics
@ 2019-04-18 17:38 Alexey Brodkin
2019-04-20 13:50 ` Thomas Petazzoni
2019-04-24 15:30 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Alexey Brodkin @ 2019-04-18 17:38 UTC (permalink / raw)
To: buildroot
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 <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
Changes v1 -> v2:
* Depend on generic BR2_TOOLCHAIN_HAS_SYNC_4
package/linux-tools/Config.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index 4916faa349..104065b22d 100644
--- a/package/linux-tools/Config.in
+++ b/package/linux-tools/Config.in
@@ -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_TOOLCHAIN_HAS_SYNC_4
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 32-bit atomic ops"
+ depends on !BR2_TOOLCHAIN_HAS_SYNC_4
+
if BR2_PACKAGE_LINUX_TOOLS_PERF
config BR2_PACKAGE_LINUX_TOOLS_PERF_TUI
--
2.16.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] linux-tools/perf: Add dependency on 32-bit atomics
2019-04-18 17:38 [Buildroot] [PATCH v2] linux-tools/perf: Add dependency on 32-bit atomics Alexey Brodkin
@ 2019-04-20 13:50 ` Thomas Petazzoni
2019-04-24 15:30 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2019-04-20 13:50 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 18 Apr 2019 20:38:45 +0300
Alexey Brodkin <Alexey.Brodkin@synopsys.com> wrote:
> 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 <abrodkin@synopsys.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
I have applied to master, after doing one change, see below.
> +comment "perf needs 32-bit atomic ops"
> + depends on !BR2_TOOLCHAIN_HAS_SYNC_4
> +
We typically don't add such comments, because it's an architecture
dependency. There is nothing the user can do about it, so there's no
point in having a comment.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] linux-tools/perf: Add dependency on 32-bit atomics
2019-04-18 17:38 [Buildroot] [PATCH v2] linux-tools/perf: Add dependency on 32-bit atomics Alexey Brodkin
2019-04-20 13:50 ` Thomas Petazzoni
@ 2019-04-24 15:30 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2019-04-24 15:30 UTC (permalink / raw)
To: buildroot
>>>>> "Alexey" == Alexey Brodkin <Alexey.Brodkin@synopsys.com> writes:
> 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 <abrodkin@synopsys.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> Changes v1 -> v2:
> * Depend on generic BR2_TOOLCHAIN_HAS_SYNC_4
Committed to 2019.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-24 15:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-18 17:38 [Buildroot] [PATCH v2] linux-tools/perf: Add dependency on 32-bit atomics Alexey Brodkin
2019-04-20 13:50 ` Thomas Petazzoni
2019-04-24 15:30 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox