From: Josh Poimboeuf <jpoimboe@redhat.com>
To: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
Cc: Peter Zijlstra <peterz@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: next-20190826 - objtool fails to build.
Date: Wed, 28 Aug 2019 14:51:00 -0500 [thread overview]
Message-ID: <20190828195100.tbkvphzhjtflrp66@treble> (raw)
In-Reply-To: <23345.1567020600@turing-police>
On Wed, Aug 28, 2019 at 03:30:00PM -0400, Valdis Klētnieks wrote:
> On Wed, 28 Aug 2019 10:10:04 -0500, Josh Poimboeuf said:
>
> > But I don't see how those warnings could get enabled: -Wsign-compare
> > -Wunused-parameter.
> >
> > Can you "make clean" and do "make V=1 tools/objtool" to show the actual
> > flags?
>
> And that tells me those warnings in fact don't get specifically enabled.
> (I've added some line breaks for sanity)
>
> gcc -Wp,-MD,/usr/src/linux-next/tools/objtool/.special.o.d -Wp,-MT,/usr/src/linux-next/tools/objtool/special.o -O2 -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wbad-function-cast
>
> Found the cause of the mystery - I changed something in a bash profile, and
> as a result...
>
> export CFLAGS="-O2 -D_FORTIFY_SOURCE=2 -Wall -Wextra"
>
> And -Wextra pulls in the things that cause problems. So this is mostly
> self-inflicted.
>
> The real question then becomes - should the Makefile sanitize CFLAGS or just
> append to whatever the user supplied as it does currently? The rest of the tree
> sanitizes CFLAG, because I don't get deluged in -Wsign-compare warnings all
> over the place...
Agreed. I assume this fixes it?
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 88158239622b..20f67fcf378d 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -35,7 +35,7 @@ INCLUDES := -I$(srctree)/tools/include \
-I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
-I$(srctree)/tools/objtool/arch/$(ARCH)/include
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
-CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
+CFLAGS := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
LDFLAGS += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
# Allow old libelf to be used:
next prev parent reply other threads:[~2019-08-28 19:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 4:15 Valdis Klētnieks
2019-08-28 15:10 ` Josh Poimboeuf
2019-08-28 19:30 ` Valdis Klētnieks
2019-08-28 19:51 ` Josh Poimboeuf [this message]
2019-08-28 19:58 ` Valdis Klētnieks
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=20190828195100.tbkvphzhjtflrp66@treble \
--to=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=valdis.kletnieks@vt.edu \
/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®