diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build-data/arch/x86_32.txt | 4 | ||||
-rw-r--r-- | src/build-data/arch/x86_64.txt | 4 | ||||
-rw-r--r-- | src/build-data/buildh.in | 53 | ||||
-rw-r--r-- | src/build-data/cc/clang.txt | 4 | ||||
-rw-r--r-- | src/build-data/cc/gcc.txt | 4 | ||||
-rw-r--r-- | src/build-data/cc/msvc.txt | 4 | ||||
-rw-r--r-- | src/build-data/cc/sunstudio.txt | 4 | ||||
-rw-r--r-- | src/lib/hash/sha1/sha1_x86/info.txt | 2 | ||||
-rw-r--r-- | src/lib/hash/sha2_32/sha2_32_x86/info.txt | 2 | ||||
-rwxr-xr-x | src/scripts/install.py | 2 |
10 files changed, 61 insertions, 22 deletions
diff --git a/src/build-data/arch/x86_32.txt b/src/build-data/arch/x86_32.txt index 20401e034..0aa9b6683 100644 --- a/src/build-data/arch/x86_32.txt +++ b/src/build-data/arch/x86_32.txt @@ -68,7 +68,7 @@ rdrand rdseed sha sse2 -sse4.1 -sse4.2 +sse41 +sse42 ssse3 </isa_extensions> diff --git a/src/build-data/arch/x86_64.txt b/src/build-data/arch/x86_64.txt index 49f8a6a55..1757e4f42 100644 --- a/src/build-data/arch/x86_64.txt +++ b/src/build-data/arch/x86_64.txt @@ -47,7 +47,7 @@ rdrand rdseed sha sse2 -sse4.1 -sse4.2 +sse41 +sse42 ssse3 </isa_extensions> diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index 822a73c44..cacc01ed0 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -24,8 +24,13 @@ /* How many bits per limb in a BigInt */ #define BOTAN_MP_WORD_BITS %{mp_bits} -%{unsafe_fuzzer_mode_define} -%{fuzzer_type} + +%{if fuzzer_mode} +#define BOTAN_UNSAFE_FUZZER_MODE +%{endif} +%{if fuzzer_type} +#define BOTAN_FUZZER_IS_%{fuzzer_type} +%{endif} #define BOTAN_INSTALL_PREFIX R"(%{prefix})" #define BOTAN_INSTALL_HEADER_DIR "%{includedir}/botan-%{version_major}" @@ -38,22 +43,56 @@ #endif /* Target identification and feature test macros */ -%{target_os_defines} -%{target_cpu_defines} +#define BOTAN_TARGET_OS_IS_%{os_name|upper} +%{if os_type} +#define BOTAN_TARGET_OS_TYPE_IS_%{os_type|upper} +%{endif} + +%{for os_features} +#define BOTAN_TARGET_OS_HAS_%{i|upper} +%{endfor} + +#define BOTAN_BUILD_COMPILER_IS_%{cc_macro} + +#define BOTAN_TARGET_ARCH_IS_%{arch|upper} +%{if endian} +#define BOTAN_TARGET_CPU_IS_%{endian|upper}_ENDIAN +%{endif} +%{if cpu_family} +#define BOTAN_TARGET_CPU_IS_%{cpu_family|upper}_FAMILY +%{endif} +%{if cpu_is_64bit} +#define BOTAN_TARGET_CPU_HAS_NATIVE_64BIT +%{endif} -%{target_compiler_defines} +%{for cpu_features} +#define BOTAN_TARGET_SUPPORTS_%{i|upper} +%{endfor} + +%{if with_valgrind} +#define BOTAN_HAS_VALGRIND +%{endif} + +%{if with_openmp} +#define BOTAN_TARGET_HAS_OPENMP +%{endif} /* * Module availability definitions */ -%{module_defines} +%{for module_defines} +#define BOTAN_HAS_%{i} +%{endfor} /* * Local/misc configuration options (if any) follow */ %{local_config} -%{house_ecc_curve_defines} + +%{for house_ecc_curve_defines} +#define BOTAN_HOUSE_ECC_CURVE_%{i} +%{endfor} /* * Things you can edit (but probably shouldn't) diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt index 44dd654f3..aaef4357a 100644 --- a/src/build-data/cc/clang.txt +++ b/src/build-data/cc/clang.txt @@ -37,8 +37,8 @@ llvm -> "llvm-link" <isa_flags> sse2 -> "-msse2" ssse3 -> "-mssse3" -sse4.1 -> "-msse4.1" -sse4.2 -> "-msse4.2" +sse41 -> "-msse4.1" +sse42 -> "-msse4.2" avx2 -> "-mavx2" bmi2 -> "-mbmi2" aesni -> "-maes -mpclmul -mssse3" diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt index 64c52f076..ce1f47ae0 100644 --- a/src/build-data/cc/gcc.txt +++ b/src/build-data/cc/gcc.txt @@ -47,8 +47,8 @@ default -> "$(LINKER)" <isa_flags> sse2 -> "-msse2" ssse3 -> "-mssse3" -sse4.1 -> "-msse4.1" -sse4.2 -> "-msse4.2" +sse41 -> "-msse4.1" +sse42 -> "-msse4.2" avx2 -> "-mavx2" bmi2 -> "-mbmi2" aesni -> "-maes -mpclmul -mssse3" diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt index 6df218a4f..b816d33f8 100644 --- a/src/build-data/cc/msvc.txt +++ b/src/build-data/cc/msvc.txt @@ -34,8 +34,8 @@ ar_output_to "/OUT:" <isa_flags> sse2 -> "" ssse3 -> "" -sse4.1 -> "" -sse4.2 -> "" +sse41 -> "" +sse42 -> "" x86_64:avx2 -> "" bmi2 -> "" aesni -> "" diff --git a/src/build-data/cc/sunstudio.txt b/src/build-data/cc/sunstudio.txt index 38f9d828c..e983bf701 100644 --- a/src/build-data/cc/sunstudio.txt +++ b/src/build-data/cc/sunstudio.txt @@ -54,8 +54,8 @@ x86_64 -> "-m64" # https://docs.oracle.com/cd/E37069_01/html/E37074/bjapp.html#OSSCGbkazd sse2 -> "-xarch=sse2" ssse3 -> "-xarch=ssse3" -sse4.1 -> "-xarch=sse4_1" -sse4.2 -> "-xarch=sse4_2" +sse41 -> "-xarch=sse4.1" +sse42 -> "-xarch=sse4.2" aesni -> "-xarch=aes" avx -> "-xarch=avx" rdrand -> "-xarch=avx_i" diff --git a/src/lib/hash/sha1/sha1_x86/info.txt b/src/lib/hash/sha1/sha1_x86/info.txt index 9cddd40a2..cfa1750c2 100644 --- a/src/lib/hash/sha1/sha1_x86/info.txt +++ b/src/lib/hash/sha1/sha1_x86/info.txt @@ -2,7 +2,7 @@ SHA1_X86_SHA_NI -> 20170518 </defines> -need_isa sha,ssse3,sse4.1 +need_isa sha,ssse3,sse41 <cc> clang:3.9 diff --git a/src/lib/hash/sha2_32/sha2_32_x86/info.txt b/src/lib/hash/sha2_32/sha2_32_x86/info.txt index bf34e73a3..838d2a4a8 100644 --- a/src/lib/hash/sha2_32/sha2_32_x86/info.txt +++ b/src/lib/hash/sha2_32/sha2_32_x86/info.txt @@ -2,7 +2,7 @@ SHA2_32_X86 -> 20170518 </defines> -need_isa sha,sse4.1 +need_isa sha,sse41 <cc> gcc:5.0 diff --git a/src/scripts/install.py b/src/scripts/install.py index c6e4ec2cd..d30493ebe 100755 --- a/src/scripts/install.py +++ b/src/scripts/install.py @@ -229,7 +229,7 @@ def main(args): copy_file(cfg['botan_pkgconfig'], prepend_destdir(os.path.join(pkgconfig_dir, os.path.basename(cfg['botan_pkgconfig'])))) - if 'ffi' in cfg['mod_list'].split('\n'): + if 'ffi' in cfg['mod_list']: for ver in cfg['python_version'].split(','): py_lib_path = os.path.join(lib_dir, 'python%s' % (ver), 'site-packages') logging.debug('Installing python module to %s' % (py_lib_path)) |