Add aix64-gcc-as architecture and p2align callback
authorDaniel Bevenius <daniel.bevenius@gmail.com>
Mon, 7 Jun 2021 04:01:54 +0000 (06:01 +0200)
committerPauli <pauli@openssl.org>
Tue, 8 Jun 2021 08:52:53 +0000 (18:52 +1000)
commit178fa72ed5c6b26ac3d6bab1a45e732ee6458565
tree0f7b449f6f9e019ea2c031c52cfdf90fde3fdd2c
parentfccf3dcef42f12b0ac2b1ab8979125a2511dc271
Add aix64-gcc-as architecture and p2align callback

This commit adds an architecture named aix64-gcc-as which can generate
assembler source code compatible with AIX assembler (as) instead of the
GNU Assembler (gas). This architecture name is then used in a callback
for the .p2align directive which is not available in AIX as.

The motivation for this addition came out of an issue we ran into when
working on upgrading OpenSSL in Node.js. We ran into the following
compilation error on one of the CI machines that uses AIX:

  05:39:05 Assembler:
  05:39:05 crypto/bn/ppc64-mont-fixed.s: line 4: Error In Syntax

This machine is using AIX Version 7.2 and does not have gas installed
and the .p2align directive is causing this error. After asking around if
it would be possible to install GAS on this machine I learned that AIX
GNU utils are not maintained as well as the native AIX ones and we
(Red Hat/IBM) have run into issues with the GNU utils in the past and if
possible it would be preferable to be able to use the AIX native
assembler.

Refs: https://github.com/nodejs/node/pull/38512

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15638)
Configurations/10-main.conf
crypto/perlasm/ppc-xlate.pl