[DTrace-devel] [PATCH 2/2] ctf: fix config test

Nick Alcock nick.alcock at oracle.com
Tue Oct 1 17:12:52 UTC 2024


Using ld-option was producing a dummy a.out file due to a lack of -o
/dev/null to redirect the output elsewhere.  It was also failing entirely to
work with lld, since ld-option passes -v to ld, and when you do that lld
doesn't even try to link (and ignores all -l arguments).

Easily fixed by avoiding ld-option and doing what the ld-option macro
does by hand, without the -v.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
---
 init/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/Kconfig b/init/Kconfig
index cbdd7a2d46b1..4a6614f4f453 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -121,7 +121,7 @@ config PAHOLE_VERSION
 	default $(shell,$(srctree)/scripts/pahole-version.sh $(PAHOLE))
 
 config HAVE_CTF_TOOLCHAIN
-	def_bool $(cc-option,-gctf) && $(ld-option,-lbfd -liberty -lctf -lbfd -liberty -lz -ldl -lc)
+	def_bool $(cc-option,-gctf) && $(success,$(LD) $(KBUILD_LDFLAGS) -lbfd -liberty -lctf -lbfd -liberty -lz -ldl -lc -o /dev/null)
 	depends on CC_IS_GCC
 	help
 	  GCC and binutils support CTF generation.
-- 
2.46.0.278.g36e3a12567




More information about the DTrace-devel mailing list