From: Amitay Isaacs Date: Tue, 6 Apr 2021 02:52:44 +0000 (+1000) Subject: Configure: Check if 128-bit integers are supported by compiler X-Git-Tag: openssl-3.0.0-alpha14~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a72da9ecebcd8e9b9caf6a3d05251a7008e9c614;p=thirdparty%2Fopenssl.git 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 Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/14784) --- diff --git a/Configure b/Configure index 64d809258d0..e36c5d93aaa 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 - &1 |"); + while() { + if (m/__SIZEOF_INT128__/) { + $config{use_int128} = 1; + last; + } + } + close(PIPE); +} + # Deal with bn_ops ################################################### $config{bn_ll} =0;