From 800dd99c602241e573ade914b67901b9dee59db5 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 4 Dec 2018 04:13:58 -0500 Subject: Add init priorities for XLC compilers --- ecp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ecp.cpp') diff --git a/ecp.cpp b/ecp.cpp index ff259ba0..f5aa08e3 100644 --- a/ecp.cpp +++ b/ecp.cpp @@ -24,6 +24,9 @@ using CryptoPP::ModularArithmetic; #pragma init_seg(".CRT$XCU") const ECP::Point g_identity; #pragma warning(default: 4075) +#elif defined(HAVE_XLC_INIT_PRIORITY) + #pragma priority(290) + const ECP::Point g_identity; #endif inline ECP::Point ToMontgomery(const ModularArithmetic &mr, const ECP::Point &P) @@ -215,7 +218,7 @@ bool ECP::Equal(const Point &P, const Point &Q) const const ECP::Point& ECP::Identity() const { -#if defined(HAVE_GCC_INIT_PRIORITY) || defined(HAVE_MSC_INIT_PRIORITY) +#if defined(HAVE_GCC_INIT_PRIORITY) || defined(HAVE_MSC_INIT_PRIORITY) || defined(HAVE_XLC_INIT_PRIORITY) return g_identity; #elif defined(CRYPTOPP_CXX11_DYNAMIC_INIT) static const ECP::Point g_identity; -- cgit v1.2.1