aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-01-22 08:36:45 -0500
committerJack Lloyd <[email protected]>2020-01-22 09:18:54 -0500
commit8afc681704950df8f6cae99408b53d9fc536f7e7 (patch)
tree13cb8f0ec9d2053a1f654cc49f2b5240b2636538 /src/lib
parent206c18114e7e7336a6f41251979b979bb74223e7 (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/lib')
-rw-r--r--src/lib/block/sm4/sm4_armv8/sm4_armv8.cpp8
-rw-r--r--src/lib/tls/tls_blocking.cpp8
-rw-r--r--src/lib/utils/compiler.h6
3 files changed, 10 insertions, 12 deletions
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