Re: Commit 0d989ac2c90b broke my x86-64 build.

From: Masahiro Yamada
Date: Sun Oct 24 2021 - 14:14:40 EST


On Sun, Oct 24, 2021 at 3:36 PM Rob Landley <rob@xxxxxxxxxxx> wrote:
>
> The attached config built fine before the above commit, doesn't build after. The
> commit in question did nothing except remove support for building x86-64 without
> libelf.

You enable CONFIG_STACK_VALIDATION in your .config file.
At least, you observed
"warning: Cannot use CONFIG_STACK_VALIDATION=y, please install
libelf-dev, libelf-devel or elfutils-libelf-devel"
in the previous builds.


>
> It took me a while to notice because the commit ONLY broke x86-64. I can still
> build arm (32 and 64 bit), i686, m68k, mips/mipsel, powerpc, s390x, and sh4
> without libelf in my cross compiler. Heck, I can still build i686. The change
> seems to have added a unique build dependency to just x86-64.

The other architectures are not affected because you cannot enable
CONFIG_STACK_VALIDATION.

Please note only x86_64 selects HAVE_STACK_VALIDATION.


> Rob
>
> P.S. Why do you need a special library to parse elf anyway? It's a fairly simple
> file format, linux has include/linux.elf.h, the toolchain already has an objtool
> prefixed for the appropriate cross compiler...

You are asking a question about the objtool implementation.
CCed Josh Poimboeuf.


--
Best Regards
Masahiro Yamada