On Sun, Jun 25, 2023 at 10:54:38PM +0200, Ludovic Courtès wrote: > Efraim Flashner skribis: > > > * guix/cpu.scm (gcc-architecture->generic-architecture): New variable. > > [...] > > > +(define (gcc-architecture->generic-architecture gcc-architecture) > > + "Return a generalized micro-architecture, using an inexact matching to provide > > +'good enough' optimizations." > > + (match gcc-architecture > > Let’s call it ‘gcc-architecture->micro-architecture-level’, with a > docstring that makes it’s clear that this is about x86_64 > micro-architecture levels. Sounds good to me. We can change the docstring if we end up adding support for more architectures (ie ppc64le). > Please also add a comment stating how to figure out what goes where so > we can more easily keep it up-to-date. > > I guess this procedure is good enough for Go support, right? It would be better if we could populate x86_64-v4 and x86_64-v2, but I really didn't feel like I could comfortably draw the line anywhere and be sure I had the correct CPUs. If someone comes along and says they're sure their CPU should be in -v2 or -v4 then I/someone can check the gcc sources to make sure that's the case. I'm pretty sure there's other compilers out there that also use the psABI for tuning, my first look would be GHC. From my testing it does work for Go, and since we're using an official definition for the psABIs and not just Go's definitions I'm pretty confident it'll be useful for something else, somewhere. > Thanks, > Ludo’. Thanks for your review! -- Efraim Flashner רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted