[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230201173637.cyu6yzudwsuzl2vj@treble>
Date: Wed, 1 Feb 2023 09:36:37 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Mark Rutland <mark.rutland@....com>
Cc: linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
Ian Rogers <irogers@...gle.com>, x86@...nel.org
Subject: Re: [tip: objtool/core] objtool: Fix HOSTCC flag usage
On Wed, Feb 01, 2023 at 05:02:16PM +0000, Mark Rutland wrote:
> Hi,
>
> I just spotted this breaks cross-compiling; details below.
Thanks, we'll fix it up with
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 29a8cd7449bf..83b100c1e7f6 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -36,7 +36,7 @@ OBJTOOL_CFLAGS := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBE
OBJTOOL_LDFLAGS := $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
# Allow old libelf to be used:
-elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)
+elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(HOSTCC) $(OBJTOOL_CFLAGS) -x c -E - | grep elf_getshdr)
OBJTOOL_CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
# Always want host compilation.
Powered by blists - more mailing lists