On Wed, Mar 06, 2024 at 07:05:03PM +0100, Ludovic Courtès wrote: > Efraim Flashner skribis: > > > * gnu/packages/gcc.scm (gcc-7, gcc-10, gcc-11, gcc-12, gcc-13) > > [properties]: In compiler-cpu-architectures use the > > x86_64-micro-architectures list for i686. > > * guix/cpu.scm (cpu->gcc-architecture): Expand the x86_64 case to also > > support i686. > > [...] > > > +++ b/gnu/packages/gcc.scm > > @@ -673,6 +673,7 @@ (define-public gcc-7 > > `((compiler-cpu-architectures > > ("aarch64" ,@%gcc-7.5-aarch64-micro-architectures) > > ("armhf" ,@%gcc-7.5-armhf-micro-architectures) > > + ("i686" ,@%gcc-7.5-x86_64-micro-architectures) > > ("x86_64" ,@%gcc-7.5-x86_64-micro-architectures)) > > Wait, that wouldn’t work on an actual i686 CPU, right? > > I was surprised to see that GCC built for i686 accepts those flags: > > guix shell -s i686-linux gcc-toolchain -- gcc -march=skylake /tmp/t.c > guix shell -s i686-linux gcc-toolchain -- gcc -march=x86-64-v4 /tmp/t.c > > If GCC agrees, so be it. LGTM! I checked with `guix build foo --system=i686-linux --tune=znver2` and everything just worked. That's definitely a Guix special, since we don't have multilib support. -- Efraim Flashner רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted