Blame SOURCES/nss-3.71-fix-lto-gtests.patch

391c46
diff --git a/gtests/ssl_gtest/tls_subcerts_unittest.cc b/gtests/ssl_gtest/tls_subcerts_unittest.cc
391c46
--- a/gtests/ssl_gtest/tls_subcerts_unittest.cc
391c46
+++ b/gtests/ssl_gtest/tls_subcerts_unittest.cc
391c46
@@ -8,23 +8,32 @@
391c46
 
391c46
 #include "prtime.h"
391c46
 #include "secerr.h"
391c46
 #include "ssl.h"
391c46
 
391c46
 #include "gtest_utils.h"
391c46
 #include "tls_agent.h"
391c46
 #include "tls_connect.h"
391c46
+#define LTO
391c46
 
391c46
 namespace nss_test {
391c46
 
391c46
+#ifndef LTO
391c46
+// sigh this construction breaks LTO
391c46
 const std::string kEcdsaDelegatorId = TlsAgent::kDelegatorEcdsa256;
391c46
 const std::string kRsaeDelegatorId = TlsAgent::kDelegatorRsae2048;
391c46
 const std::string kPssDelegatorId = TlsAgent::kDelegatorRsaPss2048;
391c46
 const std::string kDCId = TlsAgent::kServerEcdsa256;
391c46
+#else
391c46
+#define kEcdsaDelegatorId TlsAgent::kDelegatorEcdsa256
391c46
+#define kRsaeDelegatorId TlsAgent::kDelegatorRsae2048
391c46
+#define kPssDelegatorId TlsAgent::kDelegatorRsaPss2048
391c46
+#define kDCId  TlsAgent::kServerEcdsa256
391c46
+#endif
391c46
 const SSLSignatureScheme kDCScheme = ssl_sig_ecdsa_secp256r1_sha256;
391c46
 const PRUint32 kDCValidFor = 60 * 60 * 24 * 7 /* 1 week (seconds) */;
391c46
 
391c46
 static void CheckPreliminaryPeerDelegCred(
391c46
     const std::shared_ptr<TlsAgent>& client, bool expected,
391c46
     PRUint32 key_bits = 0, SSLSignatureScheme sig_scheme = ssl_sig_none) {
391c46
   EXPECT_NE(0U, (client->pre_info().valuesSet & ssl_preinfo_peer_auth));
391c46
   EXPECT_EQ(expected, client->pre_info().peerDelegCred);