summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@ozlabs.org>2021-04-06 12:52:44 +1000
committerMatt Caswell <matt@openssl.org>2021-04-08 12:18:10 +0100
commita72da9ecebcd8e9b9caf6a3d05251a7008e9c614 (patch)
tree2fe816d93b8b884c0372d31a7d87d04d3fd2426e /Configure
parentf684a2d783bf2c4728e65f83e0f89ec654f40e79 (diff)
downloadopenssl-new-a72da9ecebcd8e9b9caf6a3d05251a7008e9c614.tar.gz
Configure: Check if 128-bit integers are supported by compiler
Add a config variable "use_int128" to indicate if 128-bit integers are supported or not at the configure time. This makes it easier to automatically select 64-bit versus 32-bit implementation for curve448. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14784)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure14
1 files changed, 14 insertions, 0 deletions
diff --git a/Configure b/Configure
index 64d809258d..e36c5d93aa 100755
--- a/Configure
+++ b/Configure
@@ -1573,6 +1573,20 @@ if (!$disabled{asm} && !$predefined_C{__MACH__} && $^O ne 'VMS') {
}
}
+# Check if __SIZEOF_INT128__ is defined by compiler
+$config{use_int128} = 0;
+{
+ my $cc = $config{CROSS_COMPILE}.$config{CC};
+ open(PIPE, "$cc -E -dM - </dev/null 2>&1 |");
+ while(<PIPE>) {
+ if (m/__SIZEOF_INT128__/) {
+ $config{use_int128} = 1;
+ last;
+ }
+ }
+ close(PIPE);
+}
+
# Deal with bn_ops ###################################################
$config{bn_ll} =0;