public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luke T. Shumaker <lukeshu@lukeshu.com>
To: Joseph Myers <josmyers@redhat.com>
Cc: "Luke T. Shumaker" <lukeshu@lukeshu.com>,
	binutils@sourceware.org, gdb-patches@sourceware.org,
	"Alfred M. Szmidt" <ams@gnu.org>,
	Ralf Wildenhues <Ralf.Wildenhues@gmx.de>,
	Tom Tromey <tromey@adacore.com>
Subject: Re: [PATCH 4/4] Add a ./bootstrap script to automate bundling and generating files
Date: Fri, 07 Jun 2024 02:23:02 -0600	[thread overview]
Message-ID: <87bk4dduvt.wl-lukeshu@lukeshu.com> (raw)
In-Reply-To: <5e24a41-524a-da55-bd5e-b8a0c23d360@redhat.com>

On Thu, 06 Jun 2024 14:57:26 -0600,
Joseph Myers wrote:
> 
> On Thu, 6 Jun 2024, Luke T. Shumaker wrote:
> 
> >    * config/patches/
> >    * libdecnumber/patches/
> >    * libiberty/patches/
> 
> In my view, rather than maintaining binutils-local patches to these 
> directories, we should treat GCC and binutils as equally canonical for 
> them; any change approved and applied in one tree but not the other should 
> be treated as thereby approved for the other tree as well, and get 
> committed there (post to the relevant patches list and commit, without 
> seeking separate approval).  That way, the only differences between the 
> two trees should be in the ChangeLog files (reflecting when changes were 
> applied to the two trees).

Binutils' libdecnumber is more than 6 years behind GCC's (last synced
from GCC on 2018-02-19).  Carefully identifying how they have diverged
is, IMO, the first step in re-unifying the two.  (That said,
libdecnumber is fairly inactive so it's not too bad, and the other
directories are much more up-too-date.)

Like, I anticipate that in the near future I will be `git
send-email`ing most of the .patch files being added to the various
other repos (well, maybe not verbatim `git send-email`, I anticipate
merge conflicts).

Even after the two are in better sync, I think that having 'patches/'
as a live a record of "changes that still need to be copied over" is
probably a pretty good workflow; in many cases they can even be
applied with `git am` and sent with `git send-email`.  So, for
example: whatever.patch is approved to binutils; and is commited to
binutils.git/libiberty/patches/whatever.patch.  That patch is then
applied to GCC.  The next time someone bumps the commit hash in
binutils.git/bootstrap.d/bundle-gcc.mk ty sync with GCC, `patch` will
complain that the patch has already been applied, and then the person
can delete the patch file.

> The same applies to files at top-level present in both trees, except for 
> ChangeLogs, README, MAINTAINERS and SECURITY.txt which are genuinely meant 
> to be different: any difference between other top-level files in the two 
> trees is a bug that should be reconciled by ensuring all patches have been 
> applied to both places.  Also to files (other than ChangeLogs) in include/ 
> that are present in both trees (but some files in include/ are 
> legitimately present only in one of the two trees).
> 
> Effectively, rather than treating GCC as the upstream for any files, treat 
> it as indicating a bug if GCC and binutils-gdb differ for various files - 
> including toplevel ones that actually come from other sources such as 
> libtool - but with neither tree as upstream of the other.

So interpret each old `bundle-gcc.mk:downloads/git/gcc.commits/*`
commit hash and `*.patch` file as a "BUG"/"TODO"/"FIXME" comment.

> (Special-case exception: if one of binutils-gdb and GCC has updated 
> autoconf/automake/libtool and the other one hasn't updated yet, there may 
> temporarily be differences in such files - though if a change to work with 
> newer versions of autoconf/automake doesn't break older versions, it 
> should be applied to both trees.  This exception is because such updates 
> can be complicated, so are more likely to happen if only one tree needs 
> updating at a time.)

-- 
Happy hacking,
~ Luke T. Shumaker

  reply	other threads:[~2024-06-07  8:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 20:11 [PATCH 0/4] " Luke T. Shumaker
2024-06-06 20:11 ` [PATCH 1/4] readline: Fix examples/rlfe/configure.ac Luke T. Shumaker
2024-06-08 18:25   ` Maciej W. Rozycki
2024-06-08 18:28     ` Maciej W. Rozycki
2024-06-10  3:01       ` Luke T. Shumaker
2024-06-10 16:51         ` Simon Marchi
2024-06-06 20:11 ` [PATCH 2/4] Update COPYING files from gnu.org Luke T. Shumaker
2024-06-06 20:11 ` [PATCH 3/4] zlib: Remove files that should certainly not be checked in Luke T. Shumaker
2024-06-07  6:24   ` Jan Beulich
2024-06-07  7:53     ` Luke T. Shumaker
2024-06-10  3:04       ` Luke T. Shumaker
2024-06-08  0:35   ` Luke T. Shumaker
2024-06-06 20:11 ` [PATCH 4/4] Add a ./bootstrap script to automate bundling and generating files Luke T. Shumaker
2024-06-06 20:53   ` Luke T. Shumaker
2024-06-06 20:57   ` Joseph Myers
2024-06-07  8:23     ` Luke T. Shumaker [this message]
2024-06-10 19:27       ` Joseph Myers
2024-06-12  7:02         ` Luke T. Shumaker
2024-06-12 12:58           ` Tom Tromey
2024-06-06 20:55 ` [PATCH 0/4] " Luke T. Shumaker
2024-06-10  3:08 ` [PATCH v2 0/5] " Luke T. Shumaker
2024-06-10  3:08 ` [PATCH v2 1/5] readline: Fix examples/rlfe/configure.in Luke T. Shumaker
2024-06-10 22:49   ` Hans-Peter Nilsson
2024-06-10  3:08 ` [PATCH v2 2/5] Update COPYING files from gnu.org Luke T. Shumaker
2024-06-10  3:08 ` [PATCH v2 3/5] zlib: Remove files that should certainly not be checked in Luke T. Shumaker
2024-06-10  3:08 ` [PATCH v2 4/5] readline: Re-generate configure Luke T. Shumaker
2024-06-10  3:08 ` [PATCH v2 5/5] Add a ./bootstrap script to automate bundling and generating files Luke T. Shumaker

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=87bk4dduvt.wl-lukeshu@lukeshu.com \
    --to=lukeshu@lukeshu.com \
    --cc=Ralf.Wildenhues@gmx.de \
    --cc=ams@gnu.org \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=josmyers@redhat.com \
    --cc=tromey@adacore.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).