From: Damian Tometzki <dtometzki@fedoraproject.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org, jpoimboe@redhat.com, linux@weissschuh.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/10] objtool: Honey, I shrunk the instruction
Date: Thu, 9 Feb 2023 11:56:03 +0100 [thread overview]
Message-ID: <Y+TRQ862hrEokeqh@fedora.fritz.box> (raw)
In-Reply-To: <Y+TJbNHT3jDF8wov@hirez.programming.kicks-ass.net>
On Thu, 09. Feb 11:22, Peter Zijlstra wrote:
> On Wed, Feb 08, 2023 at 09:22:02PM +0100, Damian Tometzki wrote:
> > On Wed, 08. Feb 18:17, Peter Zijlstra wrote:
> > > Hi,
> > >
> > > Boris complained he could no longer build allyesconfig on his 32G desktop
> > > machine without having OOM terminate either objtool or chrome.
> > >
> > > After talking about these patches on IRC, Nathan mentioned the linux-clang CI
> > > was also having trouble of recent, and these patches appear to make it happy
> > > again.
> > >
> > > In total these patches shrink an allyesconfig run by about 6G:
> > >
> > > pre: 5:58.22 real, 226.69 user, 131.22 sys, 26221520 mem
> > > post: 5:03.34 real, 210.75 user, 88.80 sys, 20241232 mem
> > >
> > > Also at:
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=objtool/core
> > >
> > Hello Peter,
> >
> > with clang-17 the build failed:
> > In file included from weak.c:10:
> > In file included from /home/damian/kernel/linux/tools/objtool/include/objtool/objtool.h:13:
> > /home/damian/kernel/linux/tools/objtool/include/objtool/elf.h:88:86: error: '_Static_assert' with no message is a C2x extension [-Werror,-Wc2x-extensions]
> > static_assert(offsetof(struct reloc, rela.r_offset) == offsetof(struct reloc, offset));
>
> Oh urgh. Apparently the kernel wrapper went missing in this userspace
> project :-)
>
> include/linux/build_bug.h:#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
>
> Anyway, it's that last patch and I meant to do that in a slightly less
> horrid way :-)
Hello Peter,
here a shortipossible fix:
Then the build with clang works.
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 83b100c1e7f6..b7c8b476db95 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -31,7 +31,7 @@ INCLUDES := -I$(srctree)/tools/include \
-I$(LIBSUBCMD_OUTPUT)/include
# Note, EXTRA_WARNINGS here was determined for CC and not HOSTCC, it
# is passed here to match a legacy behavior.
-WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed -Wno-nested-externs
+WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed -Wno-nested-externs -Wno-c2x-extensions
OBJTOOL_CFLAGS := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
next prev parent reply other threads:[~2023-02-09 10:56 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 17:17 [PATCH 00/10] objtool: Honey, I shrunk the instruction Peter Zijlstra
2023-02-08 17:17 ` [PATCH 01/10] objtool: Change arch_decode_instruction() signature Peter Zijlstra
2023-02-13 11:10 ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2023-02-23 8:32 ` tip-bot2 for Peter Zijlstra
2023-02-08 17:17 ` [PATCH 02/10] objtool: Make instruction::stack_ops a single-linked list Peter Zijlstra
2023-02-13 11:10 ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2023-02-23 8:32 ` tip-bot2 for Peter Zijlstra
2023-02-08 17:17 ` [PATCH 03/10] objtool: Make instruction::alts " Peter Zijlstra
2023-02-13 11:10 ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2023-02-23 8:32 ` tip-bot2 for Peter Zijlstra
2023-02-08 17:18 ` [PATCH 04/10] objtool: Shrink instruction::{type,visited} Peter Zijlstra
2023-02-13 11:10 ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2023-02-23 8:32 ` tip-bot2 for Peter Zijlstra
2023-02-08 17:18 ` [PATCH 05/10] objtool: Remove instruction::reloc Peter Zijlstra
2023-02-13 11:10 ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2023-02-23 8:32 ` tip-bot2 for Peter Zijlstra
2023-02-08 17:18 ` [PATCH 06/10] objtool: Union instruction::{call_dest,jump_table} Peter Zijlstra
2023-02-13 11:10 ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2023-02-23 8:32 ` tip-bot2 for Peter Zijlstra
2023-02-08 17:18 ` [PATCH 07/10] objtool: Fix overlapping alternatives Peter Zijlstra
2023-02-13 11:10 ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2023-02-23 8:32 ` tip-bot2 for Peter Zijlstra
2023-02-08 17:18 ` [PATCH 08/10] x86: Fix FILL_RETURN_BUFFER Peter Zijlstra
2023-02-13 11:10 ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2023-02-23 8:32 ` tip-bot2 for Peter Zijlstra
2023-02-08 17:18 ` [PATCH 09/10] objtool: Remove instruction::list Peter Zijlstra
2023-02-13 11:10 ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2023-02-23 8:32 ` tip-bot2 for Peter Zijlstra
2023-02-08 17:18 ` [PATCH 10/10][HACK] objtool: Shrink reloc Peter Zijlstra
2023-02-08 18:35 ` [PATCH 00/10] objtool: Honey, I shrunk the instruction Nathan Chancellor
2023-02-08 20:22 ` Damian Tometzki
2023-02-09 10:22 ` Peter Zijlstra
2023-02-09 10:56 ` Damian Tometzki [this message]
2023-02-09 19:57 ` Josh Poimboeuf
2023-02-10 8:59 ` Peter Zijlstra
2023-02-10 13:47 ` [PATCH 00/10] objtool: Honey, I shrunk the instruction^Wreloc Peter Zijlstra
2023-02-10 1:50 ` [PATCH 00/10] objtool: Honey, I shrunk the instruction Thomas Weißschuh
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=Y+TRQ862hrEokeqh@fedora.fritz.box \
--to=dtometzki@fedoraproject.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=peterz@infradead.org \
--cc=x86@kernel.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