diff options
author | Jack Lloyd <[email protected]> | 2020-01-22 08:36:45 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2020-01-22 09:18:54 -0500 |
commit | 8afc681704950df8f6cae99408b53d9fc536f7e7 (patch) | |
tree | 13cb8f0ec9d2053a1f654cc49f2b5240b2636538 /src | |
parent | 206c18114e7e7336a6f41251979b979bb74223e7 (diff) |
Remove support for splitting the amalgamation by ABI
This is as if --single-file-amalgamation was always used, except
also now botan_all_internal.h is not created.
This effectively drops support for very old GCC/Clang in the
amalgamation (only). GCC 5+ and Clang 3.8+ support the target
attribute and work fine. MSVC not affected since it doesn't need
such attributes in the first place.
Diffstat (limited to 'src')
-rw-r--r-- | src/build-data/cc/clang.txt | 15 | ||||
-rw-r--r-- | src/build-data/cc/gcc.txt | 17 | ||||
-rw-r--r-- | src/configs/pylint.rc | 2 | ||||
-rw-r--r-- | src/lib/block/sm4/sm4_armv8/sm4_armv8.cpp | 8 | ||||
-rw-r--r-- | src/lib/tls/tls_blocking.cpp | 8 | ||||
-rw-r--r-- | src/lib/utils/compiler.h | 6 | ||||
-rwxr-xr-x | src/scripts/ci_build.py | 3 |
7 files changed, 11 insertions, 48 deletions
diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt index 7521f0918..b183f60ef 100644 --- a/src/build-data/cc/clang.txt +++ b/src/build-data/cc/clang.txt @@ -67,21 +67,6 @@ arm32:neon -> "-mfpu=neon" arm64:neon -> "" </isa_flags> -<isa_targets> -sse41 -> sse4.1 -sse42 -> sse4.2 - -rdrand -> rdrnd - -armv8crypto -> "+crypto" -armv8sm4 -> "+sm4" - -powercrypto -> "crypto" - -arm32:neon -> "fpu=neon" -arm64:neon -> "+simd" -</isa_targets> - <cpu_flags> llvm -> "-emit-llvm -fno-use-cxa-atexit" </cpu_flags> diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt index 401e68ddc..a653fe47e 100644 --- a/src/build-data/cc/gcc.txt +++ b/src/build-data/cc/gcc.txt @@ -78,23 +78,6 @@ arm32:neon -> "-mfpu=neon" arm64:neon -> "" </isa_flags> -# Values used in BOTAN_FUNC_ISA eg __attribute__((target("X"))) -# values not set are assumed identical to basename; sse2 -> sse2 -<isa_targets> -sse41 -> sse4.1 -sse42 -> sse4.2 - -rdrand -> rdrnd - -armv8crypto -> "+crypto" -armv8sm4 -> "+sm4" - -powercrypto -> "crypto" - -arm32:neon -> "fpu=neon" -arm64:neon -> "+simd" -</isa_targets> - # Flags set here are included at compile and link time <mach_abi_linking> all!haiku,qnx -> "-pthread" diff --git a/src/configs/pylint.rc b/src/configs/pylint.rc index ae9d2e24c..14020880b 100644 --- a/src/configs/pylint.rc +++ b/src/configs/pylint.rc @@ -60,7 +60,7 @@ confidence= # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" -disable=missing-docstring,no-else-return,logging-not-lazy,locally-disabled +disable=missing-docstring,no-else-return,logging-not-lazy,locally-disabled,import-outside-toplevel [REPORTS] diff --git a/src/lib/block/sm4/sm4_armv8/sm4_armv8.cpp b/src/lib/block/sm4/sm4_armv8/sm4_armv8.cpp index b91004aea..a0326f211 100644 --- a/src/lib/block/sm4/sm4_armv8/sm4_armv8.cpp +++ b/src/lib/block/sm4/sm4_armv8/sm4_armv8.cpp @@ -41,8 +41,8 @@ inline uint32x4_t bqswap_32(uint32x4_t B) } -BOTAN_FUNC_ISA("+sm4") -void SM4::sm4_armv8_encrypt(const uint8_t input8[], uint8_t output8[], size_t blocks) const +void BOTAN_FUNC_ISA("arch=armv8.2-a+sm4") +SM4::sm4_armv8_encrypt(const uint8_t input8[], uint8_t output8[], size_t blocks) const { const uint32x4_t K0 = vld1q_u32(&m_RK[ 0]); const uint32x4_t K1 = vld1q_u32(&m_RK[ 4]); @@ -102,8 +102,8 @@ void SM4::sm4_armv8_encrypt(const uint8_t input8[], uint8_t output8[], size_t bl } } -BOTAN_FUNC_ISA("+sm4") -void SM4::sm4_armv8_decrypt(const uint8_t input8[], uint8_t output8[], size_t blocks) const +void BOTAN_FUNC_ISA("arch=armv8.2-a+sm4") +SM4::sm4_armv8_decrypt(const uint8_t input8[], uint8_t output8[], size_t blocks) const { const uint32x4_t K0 = qswap_32(vld1q_u32(&m_RK[ 0])); const uint32x4_t K1 = qswap_32(vld1q_u32(&m_RK[ 4])); diff --git a/src/lib/tls/tls_blocking.cpp b/src/lib/tls/tls_blocking.cpp index d89c11a2c..b9c699dc0 100644 --- a/src/lib/tls/tls_blocking.cpp +++ b/src/lib/tls/tls_blocking.cpp @@ -12,8 +12,6 @@ namespace Botan { namespace TLS { -using namespace std::placeholders; - Blocking_Client::Blocking_Client(read_fn reader, write_fn writer, Session_Manager& session_manager, @@ -31,9 +29,9 @@ Blocking_Client::Blocking_Client(read_fn reader, */ TLS::Compat_Callbacks::SILENCE_DEPRECATION_WARNING::PLEASE, writer, - std::bind(&Blocking_Client::data_cb, this, _1, _2), - std::function<void (Alert)>(std::bind(&Blocking_Client::alert_cb, this, _1)), - std::bind(&Blocking_Client::handshake_cb, this, _1) + std::bind(&Blocking_Client::data_cb, this, std::placeholders::_1, std::placeholders::_2), + std::function<void (Alert)>(std::bind(&Blocking_Client::alert_cb, this, std::placeholders::_1)), + std::bind(&Blocking_Client::handshake_cb, this, std::placeholders::_1) )), m_channel(*m_callbacks.get(), session_manager, diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h index 3f1dc4f8b..e30ecda71 100644 --- a/src/lib/utils/compiler.h +++ b/src/lib/utils/compiler.h @@ -103,7 +103,7 @@ #define BOTAN_DEPRECATED(msg) __attribute__ ((deprecated(msg))) #define BOTAN_DEPRECATED_HEADER(hdr) _Pragma("message \"this header is deprecated\"") - #if !defined(BOTAN_IS_BEING_BUILT) + #if !defined(BOTAN_IS_BEING_BUILT) && !defined(BOTAN_AMALGAMATION_H_) #define BOTAN_FUTURE_INTERNAL_HEADER(hdr) _Pragma("message \"this header will be made internal in the future\"") #endif @@ -111,7 +111,7 @@ #define BOTAN_DEPRECATED(msg) __declspec(deprecated(msg)) #define BOTAN_DEPRECATED_HEADER(hdr) __pragma(message("this header is deprecated")) - #if !defined(BOTAN_IS_BEING_BUILT) + #if !defined(BOTAN_IS_BEING_BUILT) && !defined(BOTAN_AMALGAMATION_H_) #define BOTAN_FUTURE_INTERNAL_HEADER(hdr) __pragma(message("this header will be made internal in the future")) #endif @@ -120,7 +120,7 @@ #define BOTAN_DEPRECATED(msg) __attribute__ ((deprecated(msg))) #define BOTAN_DEPRECATED_HEADER(hdr) _Pragma("GCC warning \"this header is deprecated\"") - #if !defined(BOTAN_IS_BEING_BUILT) + #if !defined(BOTAN_IS_BEING_BUILT) && !defined(BOTAN_AMALGAMATION_H_) #define BOTAN_FUTURE_INTERNAL_HEADER(hdr) _Pragma("GCC warning \"this header will be made internal in the future\"") #endif #endif diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py index d10fc173b..99dc343db 100755 --- a/src/scripts/ci_build.py +++ b/src/scripts/ci_build.py @@ -86,9 +86,6 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, # Arbitrarily test amalgamation with the static lib builds flags += ['--amalgamation'] - if target_cc == 'msvc': - flags += ['--single-amalgamation-file'] - if target in ['bsi', 'nist']: # Arbitrarily test disable static on module policy builds # tls is optional for bsi/nist but add it so verify tests work with these minimized configs |