mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Olof Johansson <olof@lixom.net>
Cc: Peter Zijlstra <peterz@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] objtool: Be lenient about -Wundef
Date: Thu, 27 Jun 2019 19:00:34 -0500	[thread overview]
Message-ID: <20190628000033.ipcypg4kny2whfz7@treble> (raw)
In-Reply-To: <20190619120337.78624-1-olof@lixom.net>

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

  reply	other threads:[~2019-06-28  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19 12:03 Olof Johansson
2019-06-28  0:00 ` Josh Poimboeuf [this message]
2019-06-28  3:44   ` Olof Johansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190628000033.ipcypg4kny2whfz7@treble \
    --to=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®