|
25 | 25 | my $nasm_banner = `nasm -v`; |
26 | 26 | die "Error: nasm is not installed." if (!$nasm_banner); |
27 | 27 |
|
28 | | -my $nasm_version_min = 2.13.3; |
29 | | -my ($nasm_version) = ($nasm_banner =~/^NASM version ([0-9]\.[0-9][0-9])+/); |
30 | | -if ($nasm_version < $nasm_version_min) { |
31 | | - die "Error: nasm version $nasm_version is too old." . |
32 | | - "$nasm_version_min or higher is required."; |
33 | | -} |
34 | | - |
35 | 28 | # gas version check |
36 | 29 | my $gas_version_min = 2.30; |
37 | 30 | my $gas_banner = `gcc -Wa,-v -c -o /dev/null -x assembler /dev/null 2>&1`; |
|
118 | 111 | $target{'lib_cppflags'} =~ s/-D//g; |
119 | 112 | my @lib_cppflags = split(/ /, $target{'lib_cppflags'}); |
120 | 113 |
|
| 114 | +my @cflags = (); |
| 115 | +push(@cflags, @{$config{'cflags'}}); |
| 116 | +push(@cflags, @{$config{'CFLAGS'}}); |
| 117 | +push(@cflags, $target{'cflags'}); |
| 118 | +push(@cflags, $target{'CFLAGS'}); |
| 119 | + |
| 120 | +# AIX has own assembler not GNU as that does not support --noexecstack |
| 121 | +if ($arch =~ /aix/) { |
| 122 | + @cflags = grep $_ ne '-Wa,--noexecstack', @cflags; |
| 123 | +} |
| 124 | + |
121 | 125 | # Create openssl.gypi |
122 | 126 | my $template = |
123 | 127 | Text::Template->new(TYPE => 'FILE', |
|
132 | 136 | generated_srcs => \@generated_srcs, |
133 | 137 | config => \%config, |
134 | 138 | target => \%target, |
| 139 | + cflags => \@cflags, |
135 | 140 | asm => \$asm, |
136 | 141 | arch => \$arch, |
137 | 142 | lib_cppflags => \@lib_cppflags, |
|
155 | 160 | libapps_srcs => \@libapps_srcs, |
156 | 161 | config => \%config, |
157 | 162 | target => \%target, |
| 163 | + cflags => \@cflags, |
158 | 164 | asm => \$asm, |
159 | 165 | arch => \$arch, |
160 | 166 | lib_cppflags => \@lib_cppflags, |
|
0 commit comments