You are not logged in.

#1 2021-02-07 05:42:20

Registered: 2017-09-30
Posts: 72

Toolchain support for new x86-64 ABI's

There's been some interesting new developments in the "supported hardware" space.

Recently, 3 new microarchitecture levels were defined in the x86-64 psABI [1]. This allows software to take better advantage of modern CPU instruction sets.

Arch is currently compiled with -march=x86-64 which is equivalent to approx' circa 2003? [2].

Red Hat / Fedora have already started the ball rolling and are forging full steam ahead with x86-64-v2 [3][4]. The interesting thing for them is, they are leaving 2003 in the dust. Arch doesn't have to do same, but could easily support the new ABI's via the newly enhanced hwcaps mechanism freshly minted in glibc-2.33.

Try this for example:

$ /lib/ --help

On my AMD Ryzen system it shows:

Subdirectories of glibc-hwcaps directories, in priority order:
  x86-64-v3 (supported, searched)
  x86-64-v2 (supported, searched)

You can easily see the new hwcaps in action with strace:

$ echo 'int main(){}' | gcc -x c -
$ LD_LIBRARY_PATH=/foo strace ./a.out

What this means is we can *today* place an optimised library into:


and instantly reap benefits via CPU instructions available in our modern hardware.

We are still waiting on release of GCC-11 before you can compile directly with the new -march flags eg: -march=x86-64-v2

Anyway, food for thought. Hopefully the Arch developers are looking into this stuff for the future.


[2]: … 43633.html
[3]: … ure-level/
[4]: … ch=rawhide


#2 2021-02-12 21:56:41

From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,439

Re: Toolchain support for new x86-64 ABI's

There has been discussions about providing higher optimization levels in Arch packages.  However, our package signing process currently requires the individual packager to sign, whereas we want the more optimized packages to be build automatically.  This is being worked on (we want databases to be signed automatically too!).


Board footer

Powered by FluxBB