From: Dominique Martinet <asmadeus@codewreck.org>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Alan Maguire <alan.maguire@oracle.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
dwarves@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
Clark Williams <williams@redhat.com>,
Kate Carcia <kcarcia@redhat.com>, Daniel Xu <dxu@dxuuu.xyz>,
Eddy Z <eddyz87@gmail.com>
Subject: Re: [PATCH dwarves v3] pahole: enable --reproducible_build when SOURCE_DATE_EPOCH is set
Date: Mon, 8 Jul 2024 07:50:55 +0900 [thread overview]
Message-ID: <Zosbz-oFqmCZELNW@codewreck.org> (raw)
In-Reply-To: <CA+JHD93-znUmWbsmiAR+Ved7U6m0JrGAq8aqQq6qRmT_osP0aQ@mail.gmail.com>
Thanks for the reply!
This can wait until you're back to work, no worry about latency.
Arnaldo Carvalho de Melo wrote on Sun, Jul 07, 2024 at 11:12:06AM -0300:
> I'm in vacation, but it occurred to me that a
>
> --set_from_env SOURCE_DATE_EPOCH=reproducible_build
>
> Meaning: if variable SOURCE_DATE_EPOCH
> Is set, set the boolean command line reproducible_build.
(I understood this as a new command line option to set any btf feature
from env, if the above option is passed to pahole)
From my position there are two faces to this:
- for new kernels, a change in Kbuild to add som flag would definitely
work.
The patch to set --btf_features=reproducible_build to pahole from Kbuild
if KBUILD_BUILD_TIMESTAMP is set got shot down by Masahiro Yamada, but
hopefully something will be worked out eventually...
- for nixos/old kernels, the current pahole version produces
reproducible output if SOURCE_DATE_EPOCH is set (because someone patched
it to default to -j1 in this case in our tree), and now the reproducible
build option exists I'd like to upstream something more appropriate
that'll "just work" without worrying about old kernel trees and adding
new explicit pahole arguments there.
So adding a new switch to set a flag from env probably won't help me
much, but a new env var like PAHOLE_BTF_FEATURES (PAHOLE_FLAGS is
used/overwritten by Kbuild...) that would just call into the
--btf-feature parsing code, e.g. exporting
PAHOLE_BTF_FEATURES=+reproducible_build would toggle the option) would
probably work for me.
(Have to be careful that this is not the same as --reproducible-build,
so perhaps something else might be better... but regardless it'll
probably work out for linux kernel builds)
It's less convenient than having SOURCE_DATE_EPOCH just "make it work",
but at least there'll be a single place to edit that'll work on all
older kernels for a given distro.
(and the "just work" side of things might come for newer kernels at some
point for distros that care less...)
What do you think?
--
Dominique Martinet | Asmadeus
prev parent reply other threads:[~2024-07-07 22:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-07 8:50 [PATCH dwarves v3] pahole: enable --reproducible_build when SOURCE_DATE_EPOCH is set Dominique Martinet
[not found] ` <CA+JHD93-znUmWbsmiAR+Ved7U6m0JrGAq8aqQq6qRmT_osP0aQ@mail.gmail.com>
2024-07-07 22:50 ` Dominique Martinet [this message]
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=Zosbz-oFqmCZELNW@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=acme@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=andrii.nakryiko@gmail.com \
--cc=arnaldo.melo@gmail.com \
--cc=dwarves@vger.kernel.org \
--cc=dxu@dxuuu.xyz \
--cc=eddyz87@gmail.com \
--cc=jolsa@kernel.org \
--cc=kcarcia@redhat.com \
--cc=williams@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.