* [PATCH] samples: fanotify: add CC_CAN_LINK dependency
@ 2021-10-29 11:33 Arnd Bergmann
2021-10-29 12:44 ` Gabriel Krisman Bertazi
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-10-29 11:33 UTC (permalink / raw)
To: Jan Kara, Gabriel Krisman Bertazi, Amir Goldstein
Cc: Arnd Bergmann, Nathan Chancellor, Nick Desaulniers, linux-kernel, llvm
From: Arnd Bergmann <arnd@arndb.de>
When using a cross tools that only works for kernels, the
newn sample can end up with a link failure such as:
/usr/bin/ld: unrecognised emulation mode: aarch64linux
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pep i386pe
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [/git/arm-soc/scripts/Makefile.userprogs:28: samples/fanotify/fs-monitor] Error 1
Add a Kconfig dependency, similar to the one we use for
other samples.
Fixes: 5451093081db ("samples: Add fs error monitoring example")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
samples/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/Kconfig b/samples/Kconfig
index 147a16dafaf8..83f12c1e9ca6 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -122,7 +122,7 @@ config SAMPLE_CONNECTOR
config SAMPLE_FANOTIFY_ERROR
bool "Build fanotify error monitoring sample"
- depends on FANOTIFY
+ depends on CC_CAN_LINK && FANOTIFY
help
When enabled, this builds an example code that uses the
FAN_FS_ERROR fanotify mechanism to monitor filesystem
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] samples: fanotify: add CC_CAN_LINK dependency
2021-10-29 11:33 [PATCH] samples: fanotify: add CC_CAN_LINK dependency Arnd Bergmann
@ 2021-10-29 12:44 ` Gabriel Krisman Bertazi
0 siblings, 0 replies; 2+ messages in thread
From: Gabriel Krisman Bertazi @ 2021-10-29 12:44 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jan Kara, Amir Goldstein, Arnd Bergmann, Nathan Chancellor,
Nick Desaulniers, linux-kernel, llvm
Arnd Bergmann <arnd@kernel.org> writes:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When using a cross tools that only works for kernels, the
> newn sample can end up with a link failure such as:
>
> /usr/bin/ld: unrecognised emulation mode: aarch64linux
> Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pep i386pe
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make[5]: *** [/git/arm-soc/scripts/Makefile.userprogs:28: samples/fanotify/fs-monitor] Error 1
>
> Add a Kconfig dependency, similar to the one we use for
> other samples.
>
> Fixes: 5451093081db ("samples: Add fs error monitoring example")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Hi Arnd,
This was reported by Guenter Roeck yesterday, I sent a patch for it
here:
https://lore.kernel.org/linux-fsdevel/87fsslasgz.fsf@collabora.com/
> ---
> samples/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/samples/Kconfig b/samples/Kconfig
> index 147a16dafaf8..83f12c1e9ca6 100644
> --- a/samples/Kconfig
> +++ b/samples/Kconfig
> @@ -122,7 +122,7 @@ config SAMPLE_CONNECTOR
>
> config SAMPLE_FANOTIFY_ERROR
> bool "Build fanotify error monitoring sample"
> - depends on FANOTIFY
> + depends on CC_CAN_LINK && FANOTIFY
> help
> When enabled, this builds an example code that uses the
> FAN_FS_ERROR fanotify mechanism to monitor filesystem
--
Gabriel Krisman Bertazi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-29 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 11:33 [PATCH] samples: fanotify: add CC_CAN_LINK dependency Arnd Bergmann
2021-10-29 12:44 ` Gabriel Krisman Bertazi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.