https://bugs.winehq.org/show_bug.cgi?id=38780
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello André,
--- quote --- It seems to me that the key is to configure gcc with: --with-specs=%{!ffixed-x18:-ffixed-x18} Can someone confirm? So that we can guide people how to do it... --- quote ---
that would be one way.
Ultimately it's the distro gcc package maintainer to decide how to implement it - not the end users.
For Fedora (the distro I use) the contact would be Jakub Jelinek
https://admin.fedoraproject.org/pkgdb/package/gcc/
Gcc package repository:
http://pkgs.fedoraproject.org/cgit/gcc.git/tree/
The .spec file to add the option for '%ifarch aarch64':
http://pkgs.fedoraproject.org/cgit/gcc.git/tree/gcc.spec
But ... I've had a look at the aarch64 config for gcc and noticed this:
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/aarch64/aarch64.h#L...
--- snip --- #define STATIC_CHAIN_REGNUM R18_REGNUM --- snip ---
Whoops. To avoid multiple files changed/patched for this "feature" (gcc arch config header and the .spec file which is distro/build system specific anyway) one could put a small patch together which only affects one file:
gcc/config/aarch64/aarch64.h
'ffixed-x18' can also be realized by modifying FIXED_REGISTERS, CALL_USED_REGISTERS register allocator bitmaps (1 = exclude from general use)
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/aarch64/aarch64.h#L...
Regards