build: get objtool from $kernelbuild

On systems where `$kernelsrc` is different than `$kernelbuild`, the
objtool binary will be located in `$kernelbuild` as it's the result of
running `make prepare` during kernel build.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Attila Fülöp <attila@fueloep.org>
Signed-off-by: Louis Leseur <louis.leseur@gmail.com>
Closes #18248
Closes #18249
This commit is contained in:
Louis Leseur 2026-02-23 18:39:51 +01:00 committed by GitHub
parent 4975430cf5
commit bbf0106c6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -226,7 +226,7 @@ AC_DEFUN([ZFS_AC_OBJTOOL_WERROR], [
],[
AC_MSG_NOTICE([enable-objtool-werror undefined, disabling -Werror ])
OBJTOOL_DISABLE_WERROR=y
abs_objtool_binary=$kernelsrc/tools/objtool/objtool
abs_objtool_binary=$kernelbuild/tools/objtool/objtool
AS_IF([test -x $abs_objtool_binary],[],[
AC_MSG_ERROR([*** objtool binary $abs_objtool_binary not found])
])