Engage vpaes-armv8 module.
[openssl.git] / Configure
index c038f8559499a69afe9c1de2ca7a5d9db141401f..ba8cd964c3f261a9c9e7267b2fcf98ed89280a31 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -110,7 +110,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimenta
 # Minimum warning options... any contributions to OpenSSL should at least get
 # past these.
 
-my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK";
+my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DDEBUG_UNUSED";
 
 my $clang_disabled_warnings = "-Wno-language-extension-token -Wno-extended-offsetof -Wno-padded -Wno-shorten-64-to-32 -Wno-format-nonliteral -Wno-missing-noreturn -Wno-unused-parameter -Wno-sign-conversion -Wno-unreachable-code -Wno-conversion -Wno-documentation -Wno-missing-variable-declarations -Wno-cast-align -Wno-incompatible-pointer-types-discards-qualifiers -Wno-missing-variable-declarations -Wno-missing-field-initializers -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-conditional-uninitialized -Wno-switch-enum";
 
@@ -121,42 +121,11 @@ my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL";
 # MD2_CHAR slags pentium pros
 my $x86_gcc_opts="RC4_INDEX MD2_INT";
 
-# MODIFY THESE PARAMETERS IF YOU ARE GOING TO USE THE 'util/speed.sh SCRIPT
-# Don't worry about these normally
-
-my $tcc="cc";
-my $tflags="-fast -Xa";
-my $tbn_mul="";
-my $tlib="-lnsl -lsocket";
 #$bits1="SIXTEEN_BIT ";
 #$bits2="THIRTY_TWO_BIT ";
 my $bits1="THIRTY_TWO_BIT ";
 my $bits2="SIXTY_FOUR_BIT ";
 
-my $x86_asm="x86cpuid.o:bn-586.o co-586.o x86-mont.o x86-gf2m.o:ecp_nistz256.o ecp_nistz256-x86.o:des-586.o crypt586.o:aes-586.o vpaes-x86.o aesni-x86.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o:cmll-x86.o:ghash-x86.o:e_padlock-x86.o";
-my $x86_asm_nocast=$x86_asm;$x86_asm_nocast=~s/cast\-586\.o//;
-
-my $x86_elf_asm="$x86_asm:elf";
-my $android_x86_elf_asm="$x86_asm:android";
-
-my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o rsaz_exp.o rsaz-x86_64.o rsaz-avx2.o:ecp_nistz256.o ecp_nistz256-x86_64.o::aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o aesni-x86_64.o aesni-sha1-x86_64.o aesni-sha256-x86_64.o aesni-mb-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o sha1-mb-x86_64.o sha256-mb-x86_64.o::rc4-x86_64.o rc4-md5-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:ghash-x86_64.o aesni-gcm-x86_64.o:e_padlock-x86_64.o";
-my $win_x86_64_asm=$x86_asm;$win_x86_64_asm=~s/x86_64-gcc\.o/bn_asm.o/;
-my $ia64_asm="ia64cpuid.o:bn-ia64.o ia64-mont.o:::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o:::::ghash-ia64.o::void";
-my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-mont.o vis3-mont.o sparct4-mont.o sparcv9-gf2m.o::des_enc-sparc.o fcrypt_b.o dest4-sparcv9.o:aes_core.o aes_cbc.o aes-sparcv9.o aest4-sparcv9.o::md5-sparcv9.o:sha1-sparcv9.o sha256-sparcv9.o sha512-sparcv9.o::::::camellia.o cmll_misc.o cmll_cbc.o cmllt4-sparcv9.o:ghash-sparcv9.o::void";
-my $sparcv8_asm=":sparcv8.o::des_enc-sparc.o fcrypt_b.o:::::::::::::void";
-my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o::::::sha1-alpha.o:::::::ghash-alpha.o::void";
-my $mips64_asm=":bn-mips.o mips-mont.o:::aes_cbc.o aes-mips.o:::sha1-mips.o sha256-mips.o sha512-mips.o::::::::";
-my $mips32_asm=$mips64_asm; $mips32_asm =~ s/\s*sha512\-mips\.o//;
-my $s390x_asm="s390xcap.o s390xcpuid.o:bn-s390x.o s390x-mont.o s390x-gf2m.o:::aes-s390x.o aes-ctr.o aes-xts.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::rc4-s390x.o:::::ghash-s390x.o:";
-my $s390x_32_asm=$s390x_asm;$s390x_32_asm=~s/bn\-s390x\.o/bn_asm.o/;
-my $armv4_asm="armcap.o armv4cpuid.o:bn_asm.o armv4-mont.o armv4-gf2m.o:ecp_nistz256.o ecp_nistz256-armv4.o::aes_cbc.o aes-armv4.o bsaes-armv7.o aesv8-armx.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::ghash-armv4.o ghashv8-armx.o::void";
-my $aarch64_asm="armcap.o arm64cpuid.o mem_clr.o::::aes_core.o aes_cbc.o aesv8-armx.o:::sha1-armv8.o sha256-armv8.o sha512-armv8.o:::::::ghashv8-armx.o:";
-my $parisc11_asm="pariscid.o:bn_asm.o parisc-mont.o:::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o::32";
-my $parisc20_64_asm="pariscid.o:pa-risc2W.o parisc-mont.o:::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o::64";
-my $parisc20_32_asm=$parisc20_64_asm;$parisc20_32_asm=~s/2W\./2\./;$parisc20_32_asm=~s/:64/:32/;
-my $ppc64_asm="ppccpuid.o ppccap.o:bn-ppc.o ppc-mont.o ppc64-mont.o:::aes_core.o aes_cbc.o aes-ppc.o vpaes-ppc.o aesp8-ppc.o:::sha1-ppc.o sha256-ppc.o sha512-ppc.o sha256p8-ppc.o sha512p8-ppc.o:::::::ghashp8-ppc.o:";
-my $ppc32_asm=$ppc64_asm;
-
 # As for $BSDthreads. Idea is to maintain "collective" set of flags,
 # which would cover all BSD flavors. -pthread applies to them all,
 # but is treated differently. OpenBSD expands is as -D_POSIX_THREAD
@@ -456,7 +425,7 @@ my %table=(
     aarch64_asm => {
        template        => 1,
        cpuid_obj       => "armcap.o arm64cpuid.o mem_clr.o",
-       aes_obj         => "aes_core.o aes_cbc.o aesv8-armx.o",
+       aes_obj         => "aes_core.o aes_cbc.o aesv8-armx.o vpaes-armv8.o",
        sha1_obj        => "sha1-armv8.o sha256-armv8.o sha512-armv8.o",
        modes_obj       => "ghashv8-armx.o",
     },
@@ -1196,6 +1165,7 @@ if ($d) {
 &usage if (!defined($table{$target})
           || $table{$target}->{template}
           || ($build_prefix eq "debug_"
+              && $target !~ /^debug-/
               && !($table{$target}->{debug_cflags}
                    || $table{$target}->{debug_lflags})));
 
@@ -1302,47 +1272,47 @@ $openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/]
 print "IsMK1MF=$IsMK1MF\n";
 
 # Allow environment CC to override compiler...
-my $cc = $ENV{CC} || $table{$t}->{cc};
+my $cc = $ENV{CC} || $table{$target}->{cc};
 
 # For cflags and lflags, add the debug_ or release_ attributes
 # Do it in such a way that no spurious space is appended (hence the grep).
 my $cflags = join(" ",
-                 grep { $_ } ($table{$t}->{cflags},
-                              $table{$t}->{$build_prefix."cflags"}));
+                 grep { $_ } ($table{$target}->{cflags},
+                              $table{$target}->{$build_prefix."cflags"}));
 my $lflags = join(" ",
-                 grep { $_ } ($table{$t}->{lflags},
-                              $table{$t}->{$build_prefix."lflags"}));
-
-my $unistd = $table{$t}->{unistd};
-my $thread_cflag = $table{$t}->{thread_cflag};
-my $sys_id = $table{$t}->{sys_id};
-my $bn_ops = $table{$t}->{bn_ops};
-my $cpuid_obj = $table{$t}->{cpuid_obj};
-my $bn_obj = $table{$t}->{bn_obj};
-my $ec_obj = $table{$t}->{ec_obj};
-my $des_obj = $table{$t}->{des_obj};
-my $aes_obj = $table{$t}->{aes_obj};
-my $bf_obj = $table{$t}->{bf_obj};
-my $md5_obj = $table{$t}->{md5_obj};
-my $sha1_obj = $table{$t}->{sha1_obj};
-my $cast_obj = $table{$t}->{cast_obj};
-my $rc4_obj = $table{$t}->{rc4_obj};
-my $rmd160_obj = $table{$t}->{rmd160_obj};
-my $rc5_obj = $table{$t}->{rc5_obj};
-my $wp_obj = $table{$t}->{wp_obj};
-my $cmll_obj = $table{$t}->{cmll_obj};
-my $modes_obj = $table{$t}->{modes_obj};
-my $engines_obj = $table{$t}->{engines_obj};
-my $perlasm_scheme = $table{$t}->{perlasm_scheme};
-my $dso_scheme = $table{$t}->{dso_scheme};
-my $shared_target = $table{$t}->{shared_target};
-my $shared_cflag = $table{$t}->{shared_cflag};
-my $shared_ldflag = $table{$t}->{shared_ldflag};
-my $shared_extension = $table{$t}->{shared_extension};
-my $ranlib = $ENV{'RANLIB'} || $table{$t}->{ranlib};
+                 grep { $_ } ($table{$target}->{lflags},
+                              $table{$target}->{$build_prefix."lflags"}));
+
+my $unistd = $table{$target}->{unistd};
+my $thread_cflag = $table{$target}->{thread_cflag};
+my $sys_id = $table{$target}->{sys_id};
+my $bn_ops = $table{$target}->{bn_ops};
+my $cpuid_obj = $table{$target}->{cpuid_obj};
+my $bn_obj = $table{$target}->{bn_obj};
+my $ec_obj = $table{$target}->{ec_obj};
+my $des_obj = $table{$target}->{des_obj};
+my $aes_obj = $table{$target}->{aes_obj};
+my $bf_obj = $table{$target}->{bf_obj};
+my $md5_obj = $table{$target}->{md5_obj};
+my $sha1_obj = $table{$target}->{sha1_obj};
+my $cast_obj = $table{$target}->{cast_obj};
+my $rc4_obj = $table{$target}->{rc4_obj};
+my $rmd160_obj = $table{$target}->{rmd160_obj};
+my $rc5_obj = $table{$target}->{rc5_obj};
+my $wp_obj = $table{$target}->{wp_obj};
+my $cmll_obj = $table{$target}->{cmll_obj};
+my $modes_obj = $table{$target}->{modes_obj};
+my $engines_obj = $table{$target}->{engines_obj};
+my $perlasm_scheme = $table{$target}->{perlasm_scheme};
+my $dso_scheme = $table{$target}->{dso_scheme};
+my $shared_target = $table{$target}->{shared_target};
+my $shared_cflag = $table{$target}->{shared_cflag};
+my $shared_ldflag = $table{$target}->{shared_ldflag};
+my $shared_extension = $table{$target}->{shared_extension};
+my $ranlib = $ENV{'RANLIB'} || $table{$target}->{ranlib};
 my $ar = $ENV{'AR'} || "ar";
-my $arflags = $table{$t}->{arflags};
-my $multilib = $table{$t}->{multilib};
+my $arflags = $table{$target}->{arflags};
+my $multilib = $table{$target}->{multilib};
 
 # if $prefix/lib$multilib is not an existing directory, then
 # assume that it's not searched by linker automatically, in