Skip to content

Commit be9d939

Browse files
committed
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: nodejs/node#38512
1 parent 97cf9b0 commit be9d939

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Configurations/10-main.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,10 @@ my %targets = (
12121212
AR => add("-X64"),
12131213
RANLIB => add("-X64"),
12141214
},
1215+
"aix64-gcc-as" => {
1216+
inherit_from => [ "aix64-gcc" ],
1217+
perlasm_scheme => "aix64-as",
1218+
},
12151219
"aix-cc" => {
12161220
inherit_from => [ "aix-common" ],
12171221
CC => "cc",

crypto/perlasm/ppc-xlate.pl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
$ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64(le|v2)/);
8484
$ret;
8585
};
86+
my $p2align = sub {
87+
my $ret = ($flavour =~ /aix64-as/) ? "" : ".p2align $line";
88+
$ret;
89+
};
8690
my $machine = sub {
8791
my $junk = shift;
8892
my $arch = shift;

0 commit comments

Comments
 (0)