Permalink
Browse files

deps: fix for non GNU assembler in AIX

AIX has own assembler not GNU as that does not support --noexecstack.

PR-URL: #25381
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Backport-PR-URL: #25688
  • Loading branch information...
shigeki authored and targos committed Nov 15, 2018
1 parent ad04d7b commit 5225214d0776d76665fe92f2f046de3eb1997cf6
@@ -25,13 +25,6 @@
my $nasm_banner = `nasm -v`;
die "Error: nasm is not installed." if (!$nasm_banner);

my $nasm_version_min = 2.13.3;
my ($nasm_version) = ($nasm_banner =~/^NASM version ([0-9]\.[0-9][0-9])+/);
if ($nasm_version < $nasm_version_min) {
die "Error: nasm version $nasm_version is too old." .
"$nasm_version_min or higher is required.";
}

# gas version check
my $gas_version_min = 2.30;
my $gas_banner = `gcc -Wa,-v -c -o /dev/null -x assembler /dev/null 2>&1`;
@@ -118,6 +111,17 @@
$target{'lib_cppflags'} =~ s/-D//g;
my @lib_cppflags = split(/ /, $target{'lib_cppflags'});

my @cflags = ();
push(@cflags, @{$config{'cflags'}});
push(@cflags, @{$config{'CFLAGS'}});
push(@cflags, $target{'cflags'});
push(@cflags, $target{'CFLAGS'});

# AIX has own assembler not GNU as that does not support --noexecstack
if ($arch =~ /aix/) {
@cflags = grep $_ ne '-Wa,--noexecstack', @cflags;
}

# Create openssl.gypi
my $template =
Text::Template->new(TYPE => 'FILE',
@@ -132,6 +136,7 @@
generated_srcs => \@generated_srcs,
config => \%config,
target => \%target,
cflags => \@cflags,
asm => \$asm,
arch => \$arch,
lib_cppflags => \@lib_cppflags,
@@ -155,6 +160,7 @@
libapps_srcs => \@libapps_srcs,
config => \%config,
target => \%target,
cflags => \@cflags,
asm => \$asm,
arch => \$arch,
lib_cppflags => \@lib_cppflags,
@@ -14,15 +14,9 @@
$OUT .= " '$define',\n";
} -%% ],
'openssl_cflags_%%-$arch-%%': [
%%- foreach $cflag (@{$config{cflags}}) {
%%- foreach $cflag (@cflags) {
$OUT .= " '$cflag',\n";
}
foreach $cflag (@{$config{CFLAGS}}) {
$OUT .= " '$cflag',\n";
} -%%
'%%-$target{cflags}-%%',
'%%-$target{CFLAGS}-%%',
],
} -%% ],
'openssl_ex_libs_%%-$arch-%%': [
'%%-$target{ex_libs}-%%',
],
@@ -25,15 +25,9 @@ foreach $src (@libcrypto_srcs) {
$OUT .= " '$define',\n";
} -%% ],
'openssl_cflags_%%-$arch-%%': [
%%- foreach $cflag (@{$config{cflags}}) {
%%- foreach $cflag (@cflags) {
$OUT .= " '$cflag',\n";
}
foreach $cflag (@{$config{CFLAGS}}) {
$OUT .= " '$cflag',\n";
} -%%
'%%-$target{cflags}-%%',
'%%-$target{CFLAGS}-%%',
],
} -%% ],
'openssl_ex_libs_%%-$arch-%%': [
'%%-$target{ex_libs}-%%',
],

0 comments on commit 5225214

Please sign in to comment.