On 9/21/23 09:35, Dmitry V. Levin wrote:
On Wed, Sep 20, 2023 at 09:59:22AM -0400, John Ericson wrote:
Of course config.sub can provide a canonicalization of
windows-cygnus into cygwin if it helps.
I was worried that would close off the possibility of adding them as
normal forms later, but maybe it's better to just do it, if otherwise
we wouldn't support it at all.
I wouldn't say that would help adding them later, but that certainly
wouldn't block them either, so I suggest adding an alias as it seems
to be the best thing we can currently do.
On 9/21/23 08:47, Zack Weinberg wrote:
+1 from me on the general principle that if LLVM accepts a name then
config.sub should know about it, and map it to an existing GNU name
that means the same thing, if any.
OK, thank you both for the encouragement, I will submit patches for that
soon.
For what it's worth, we could imagine someday something like
--std=2024 to have versioned normalizations, allowing packages to opt
into doing the opposite normalizations
If you want to work on this, I suggest that your first step should be
to try to make config.sub and config.guess as table-driven as
possible. Right now, adding *any* sort of alternative mode for output
is going to be an exercise in frustration, since both scripts are big
balls of mud (in the classic sense of that term --
http://www.laputan.org/mud/mud.html). Given the extreme limitations of
portable shell scripting, this may only be possible if you convert
them to be generated from a more flexible source. zw
Yes I absolutely agree refactors before new features. If you check the
git history, you can see that I've been reworking config.sub for quite a
while :). I do have some more things in mind for that, and would happily
do them before returning to this.
John