lkml.org 
[lkml]   [2019]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] objtool: Be lenient about -Wundef
On Wed, Jun 19, 2019 at 05:03:37AM -0700, Olof Johansson wrote:
> Some libelf versions use undefined macros, which combined with newer GCC
> makes for errors from system headers. This isn't overly useful to fail
> compiling objtool for.
>
> Error as seen:
>
> cc1: all warnings being treated as errors
> In file included from arch/x86/../../elf.h:10,
> from arch/x86/decode.c:14:
> /usr/include/libelf/gelf.h:25:5: error: "__LIBELF_INTERNAL__" is not defined, evaluates to 0 [-Werror=undef]
> #if __LIBELF_INTERNAL__
> ^~~~~~~~~~~~~~~~~~~
>
> For this reason, skip -Wundef on objtool.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>

Sorry for the delay, I was out last week and I'm still getting caught
up.

Which libelf was this? I'm guessing it's the old non-elfutils version
which has been unmaintained for 10 years (and which doesn't work with
objtool anyway).

It would be nice if we could figure out a way to detect that libelf and
report a more useful error for it.

--
Josh

\
 
 \ /
  Last update: 2019-06-28 02:01    [W:0.054 / U:13.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site