Liliana Marie Prikler schreef op vr 05-11-2021 om 23:19 [+0100]:
> > > [...]
> > > +         (add-after 'unpack 'disable-sse2
> > > +           (lambda* (#:key system #:allow-other-keys)
> > > +             (unless (string-prefix? "x86_64" system)
> > 
> > IIUC, when cross-compiling, you need to look at 'target', not
> > 'system'.  At least, that's the case if %current-system/%current-
> > target-system is used. Not sure about 'system' and 'target'.
> Do target and system follow the same rules?  If so, I could write (or
> target system), no?  Packages on master sadly follow wildly different
> conventions and I picked one at random.

Looking at (guix build system gnu), there are three system/target-like
arguments:

a. system, which is set to (%current-system)
b. build, which is set to the GNU triplet equivalent (%current-system) 
c. target, which is set to (%current-target-system) (#f when compiling
natively)

So it appears system and target correspond to (%current-system) and
(%current-target-system), so (or target system) should work, I think.

I prefer ,(target-x86-64?) myself though, because it avoids having
to remember that 'target' is not set when compiling natively. I think
'target' should always be set, because compiling natively is ‘merely’
a special case of cross-compiling, and (or target system)/(or
(%current-target-system) (%current-system)) seems a bit repetitive
to me). That would probably break some package definitions though,
and not really related to webkitgtk.

Also, that the arch comes first in GNU triplets and nix system strings,
seems a bit an implementation detail to me. Not terribly important /
YMMV though.

Greetings,
Maxime.




Reply via email to