Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2018-05-04 15:06:44 +0300
committerAndy Polyakov <appro@openssl.org>2018-05-05 21:44:56 +0300
commit0ad4078cd604797eec4b8922f169da5c2a1a16d3 (patch)
tree952352331749f5c83e130b79f3b7800529cdfd8c /Configure
parent0d94212a046e87fafea6e83e8ea2b2a58db49979 (diff)
Configure: move --noexecstack probe to Configure.
config probe doesn't work in cross-compile scenarios or with clang. In addition consolidate -Qunused-arguments handling. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6174)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure26
1 files changed, 21 insertions, 5 deletions
diff --git a/Configure b/Configure
index ffc5fe5d33..43effc2b46 100755
--- a/Configure
+++ b/Configure
@@ -1427,6 +1427,27 @@ if (!$disabled{makedepend}) {
}
}
+if (!$disabled{asm}) {
+ # probe for -Wa,--noexecstack option...
+ if ($predefined{__clang__}) {
+ # clang has builtin assembler, which doesn't recognize --help,
+ # but it apparently recognizes the option in question on all
+ # supported platforms even when it's meaningless. In other words
+ # probe would fail, but probed option always accepted...
+ push @{$config{cflags}}, "-Wa,--noexecstack", "-Qunused-arguments";
+ } elsif ($^O ne 'VMS') {
+ my $cc = $config{CROSS_COMPILE}.$config{CC};
+ open(PIPE, "$cc -Wa,--help -c -o null.$$.o -x assembler /dev/null 2>&1 |");
+ while(<PIPE>) {
+ if (m/--noexecstack/) {
+ push @{$config{cflags}}, "-Wa,--noexecstack";
+ last;
+ }
+ }
+ close(PIPE);
+ unlink("null.$$.o");
+ }
+}
# Deal with bn_ops ###################################################
@@ -1468,11 +1489,6 @@ if (defined($config{api})) {
push @{$config{defines}}, $apiflag;
}
-if (defined($predefined{__clang__}) && !$disabled{asm}) {
- push @{$config{cflags}}, "-Qunused-arguments";
- push @{$config{cxxflags}}, "-Qunused-arguments" if $config{CXX};
-}
-
if ($strict_warnings)
{
my $wopt;