|
316 | 316 | fi |
317 | 317 | AC_SUBST([ENABLED_ASM]) |
318 | 318 |
|
319 | | - |
320 | 319 | # Default math is SP Math all and not fast math |
321 | 320 | # FIPS v1 and v2 must use fast math |
322 | 321 | DEF_SP_MATH="yes" |
@@ -1029,12 +1028,21 @@ then |
1029 | 1028 |
|
1030 | 1029 | # More thorough error queue usage. |
1031 | 1030 | AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_VERBOSE_ERRORS" |
| 1031 | + |
| 1032 | + # enable all applicable assembly accelerations |
| 1033 | + if test "$ENABLED_ASM" != "no" && |
| 1034 | + test "$enable_sp_asm" != "no" && |
| 1035 | + test "$enable_all_asm" = "" && |
| 1036 | + test "$ENABLED_LINUXKM_DEFAULTS" = "no" |
| 1037 | + then |
| 1038 | + enable_all_asm=yes |
| 1039 | + fi |
1032 | 1040 | fi |
1033 | 1041 |
|
1034 | 1042 |
|
1035 | 1043 | # ALL CRYPTO FEATURES |
1036 | 1044 | AC_ARG_ENABLE([all-crypto], |
1037 | | - [AS_HELP_STRING([--enable-all-crypto],[Enable all wolfcrypt algorithms (default: disabled)])], |
| 1045 | + [AS_HELP_STRING([--enable-all-crypto],[Enable all available wolfcrypt algorithm support (default: disabled)])], |
1038 | 1046 | [ ENABLED_ALL_CRYPT=$enableval ], |
1039 | 1047 | [ ENABLED_ALL_CRYPT=no ] |
1040 | 1048 | ) |
@@ -1157,6 +1165,15 @@ then |
1157 | 1165 |
|
1158 | 1166 | # Store issuer name components when parsing certificates. |
1159 | 1167 | AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_ISSUER_NAMES" |
| 1168 | + |
| 1169 | + # enable all applicable assembly accelerations |
| 1170 | + if test "$ENABLED_ASM" != "no" && |
| 1171 | + test "$enable_sp_asm" != "no" && |
| 1172 | + test "$enable_all_asm" = "" && |
| 1173 | + test "$ENABLED_LINUXKM_DEFAULTS" = "no" |
| 1174 | + then |
| 1175 | + enable_all_asm=yes |
| 1176 | + fi |
1160 | 1177 | fi |
1161 | 1178 |
|
1162 | 1179 | # liboqs |
@@ -2845,6 +2862,61 @@ then |
2845 | 2862 | fi |
2846 | 2863 |
|
2847 | 2864 |
|
| 2865 | +# Auto-selected activation of all applicable asm accelerations |
| 2866 | +AC_ARG_ENABLE([all-asm], |
| 2867 | + [AS_HELP_STRING([--enable-all-asm],[Enable all applicable assembly accelerations (default: disabled)])], |
| 2868 | + [ ENABLED_ALL_ASM=$enableval ], |
| 2869 | + [ ENABLED_ALL_ASM=no ] |
| 2870 | + ) |
| 2871 | + |
| 2872 | +if test "$ENABLED_ALL_ASM" != "no" |
| 2873 | +then |
| 2874 | + if test "$ENABLED_ASM" = "no" |
| 2875 | + then |
| 2876 | + AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-asm]) |
| 2877 | + fi |
| 2878 | + |
| 2879 | + if test "$enable_sp_asm" = "no" |
| 2880 | + then |
| 2881 | + AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-sp-asm]) |
| 2882 | + fi |
| 2883 | + |
| 2884 | + if test "$enable_intelasm" = "no" |
| 2885 | + then |
| 2886 | + AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-intelasm]) |
| 2887 | + fi |
| 2888 | + |
| 2889 | + if test "$enable_armasm" = "no" |
| 2890 | + then |
| 2891 | + AC_MSG_ERROR([--enable-all-asm is incompatible with --disable-armasm]) |
| 2892 | + fi |
| 2893 | + |
| 2894 | + if test "$ENABLED_SP" != "no" |
| 2895 | + then |
| 2896 | + ENABLED_SP_ASM=yes |
| 2897 | + if test "$ENABLED_SP" = "" |
| 2898 | + then |
| 2899 | + ENABLED_SP=yes |
| 2900 | + fi |
| 2901 | + fi |
| 2902 | + |
| 2903 | + case "$host_cpu" in |
| 2904 | + *x86_64*|*amd64*) |
| 2905 | + if test "$enable_intelasm" = "" |
| 2906 | + then |
| 2907 | + enable_intelasm=yes |
| 2908 | + fi |
| 2909 | + ;; |
| 2910 | + *aarch64*|*arm*|*cortex*) |
| 2911 | + if test "$enable_armasm" = "" |
| 2912 | + then |
| 2913 | + enable_armasm=yes |
| 2914 | + fi |
| 2915 | + ;; |
| 2916 | + esac |
| 2917 | +fi |
| 2918 | + |
| 2919 | + |
2848 | 2920 | ENABLED_ARMASM_INLINE="no" |
2849 | 2921 | ENABLED_ARMASM_SHA3="no" |
2850 | 2922 | ENABLED_ARMASM_CRYPTO_SM4="no" |
|
0 commit comments