Description
We have multiple bug reports where the latest release of ring doesn't build when using old versions of GNU binutils:
- ring-0.17.13 build failure on amazonlinux:2 amd64 #2462
- ring 0.17.13 does not "cross" compile (on illumos, other x86_64 targets) unlike ring 0.17.12 #2461
Luckily, this isn't urgent as ring 0.17.12 is available for people to use, but it could become urgent at any time if we have a security fix because we only do security releases on top of the latest version.
There are multiple workarounds available:
- Upgrade GNU binutils to a later version (2.38 seems sufficient; maybe some earlier versions work?)
- Use
CC=clang
orTARGET_CC=clang
or similar, to use clang and llvm-as instead of GNUas
.
I think somebody needs to investigate exactly why GNU as 2.29 rejects the instruction, to see if we can find an easy workaround. I don't have access to GNU as older than 2.38.
Perhaps there is an easy workaround, such as adding an .arch
directive to aes-gcm-avx2-x86_64.pl
that would make it work.
Or, there could be more tedious workarounds. In OpenSSL, in the past at least, they have sometimes used .byte
directives to directly encode instructions. For example, for mulx
in x86_64-mont.pl we have:
.byte 0xc4,0x62,0xfb,0xf6,0xa1,0x10,0x00,0x00,0x00 # mulx 2*8($nptr),%rax,%r12
The difficulty here, of course, is that the registers being accessed are encoded into the instruction, so this is kind of a last resort workaround.
I don't intend to implement such a workaround myself, but others might be interested in doing so.
Activity