From b3db974c411a6377bc7a22262267d209c5a45572 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 12 Oct 2024 10:43:47 -0500 Subject: [PATCH 001/401] Update random.cpp change logging on RNG messages to only verbose --- src/random.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/random.cpp b/src/random.cpp index ab98cdd56009..eccb09681062 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -483,7 +483,7 @@ static void SeedPeriodic(CSHA512& hasher, RNGState& rng) // Dynamic environment data (performance monitoring, ...) auto old_size = hasher.Size(); RandAddDynamicEnv(hasher); - LogPrintf("Feeding %i bytes of dynamic environment data into RNG\n", hasher.Size() - old_size); + LogPrint(BCLog::ALL, "Feeding %i bytes of dynamic environment data into RNG\n", hasher.Size() - old_size); // Strengthen for 10 ms SeedStrengthen(hasher, rng, 10000); @@ -503,7 +503,7 @@ static void SeedStartup(CSHA512& hasher, RNGState& rng) noexcept // Static environment data RandAddStaticEnv(hasher); - LogPrintf("Feeding %i bytes of environment data into RNG\n", hasher.Size() - old_size); + LogPrint(BCLog::ALL, "Feeding %i bytes of environment data into RNG\n", hasher.Size() - old_size); // Strengthen for 100 ms SeedStrengthen(hasher, rng, 100000); From 9a1e1b06b7231886ab1e69eabc1f9c7d855aa738 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 30 Oct 2024 21:01:54 -0500 Subject: [PATCH 002/401] changes --- src/txdb.h | 4 ++-- src/validation.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/txdb.h b/src/txdb.h index 054942b2d886..5395c7a4f8b8 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -34,9 +34,9 @@ static const int64_t nMaxBlockDBCache = 2; //! Max memory allocated to block tree DB specific cache, if -txindex (MiB) // Unlike for the UTXO database, for the txindex scenario the leveldb cache make // a meaningful difference: https://github.com/bitcoin/bitcoin/pull/8273#issuecomment-229601991 -static const int64_t nMaxTxIndexCache = 1024; +static const int64_t nMaxTxIndexCache = 512; //! Max memory allocated to all block filter index caches combined in MiB. -static const int64_t max_filter_index_cache = 1024; +static const int64_t max_filter_index_cache = 512; //! Max memory allocated to coin DB specific cache (MiB) static const int64_t nMaxCoinsDBCache = 8; diff --git a/src/validation.cpp b/src/validation.cpp index b0fde3e20f20..65691fbba029 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -77,7 +77,7 @@ static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB /** Time to wait between writing blocks/block index to disk. */ static constexpr std::chrono::hours DATABASE_WRITE_INTERVAL{1}; /** Time to wait between flushing chainstate to disk. */ -static constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL{24}; +static constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL{6}; /** Maximum age of our tip for us to be considered current for fee estimation */ static constexpr std::chrono::hours MAX_FEE_ESTIMATION_TIP_AGE{3}; From 96313681e938d16987ae5b7193134461d2543f74 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sun, 17 Nov 2024 19:27:21 -0600 Subject: [PATCH 003/401] more memory testing --- src/init.cpp | 2 +- src/txdb.h | 10 +++++----- src/validation.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 6ece8de02008..caff95a91fc1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1941,7 +1941,7 @@ bool AppInitMain(InitInterfaces& interfaces) nTotalCache -= nCoinDBCache; nCoinCacheUsage = nTotalCache; // the rest goes to in-memory cache int64_t nMempoolSizeMax = gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000; - int64_t nEvoDbCache = 1024 * 1024 * 64; // TODO + int64_t nEvoDbCache = 1024 * 1024 * 32; // TODO LogPrintf("Cache configuration:\n"); LogPrintf("* Using %.1f MiB for block index database\n", nBlockTreeDBCache * (1.0 / 1024 / 1024)); if (gArgs.GetBoolArg("-txindex", DEFAULT_TXINDEX)) { diff --git a/src/txdb.h b/src/txdb.h index 5395c7a4f8b8..a4788115e202 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -22,21 +22,21 @@ class CCoinsViewDBCursor; class uint256; //! -dbcache default (MiB) -static const int64_t nDefaultDbCache = 50; +static const int64_t nDefaultDbCache = 32; //! -dbbatchsize default (bytes) static const int64_t nDefaultDbBatchSize = 16 << 20; //! max. -dbcache (MiB) -static const int64_t nMaxDbCache = sizeof(void*) > 4 ? 16384 : 1024; +static const int64_t nMaxDbCache = sizeof(void*) > 4 ? 8192 : 1024; //! min. -dbcache (MiB) -static const int64_t nMinDbCache = 4; +static const int64_t nMinDbCache = 2; //! Max memory allocated to block tree DB specific cache, if no -txindex (MiB) static const int64_t nMaxBlockDBCache = 2; //! Max memory allocated to block tree DB specific cache, if -txindex (MiB) // Unlike for the UTXO database, for the txindex scenario the leveldb cache make // a meaningful difference: https://github.com/bitcoin/bitcoin/pull/8273#issuecomment-229601991 -static const int64_t nMaxTxIndexCache = 512; +static const int64_t nMaxTxIndexCache = 256; //! Max memory allocated to all block filter index caches combined in MiB. -static const int64_t max_filter_index_cache = 512; +static const int64_t max_filter_index_cache = 256; //! Max memory allocated to coin DB specific cache (MiB) static const int64_t nMaxCoinsDBCache = 8; diff --git a/src/validation.cpp b/src/validation.cpp index 65691fbba029..d7895000f050 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -77,7 +77,7 @@ static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB /** Time to wait between writing blocks/block index to disk. */ static constexpr std::chrono::hours DATABASE_WRITE_INTERVAL{1}; /** Time to wait between flushing chainstate to disk. */ -static constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL{6}; +static constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL{2}; /** Maximum age of our tip for us to be considered current for fee estimation */ static constexpr std::chrono::hours MAX_FEE_ESTIMATION_TIP_AGE{3}; From 24b94ea8f6b34a4d0a59a192b1485006531924d2 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 22 Nov 2024 17:41:13 -0600 Subject: [PATCH 004/401] Update configure.ac --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 0e9a058d8349..40b99f6d0b0c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 3) define(_CLIENT_VERSION_MINOR, 4) -define(_CLIENT_VERSION_REVISION, 7) -define(_CLIENT_VERSION_BUILD, 2) +define(_CLIENT_VERSION_REVISION, 8) +define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2023) From 25b8517d3d95f694181c46ac31381a7a82beec06 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 12:43:32 -0600 Subject: [PATCH 005/401] Update validation.cpp --- src/validation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index d7895000f050..3af369c5fdaf 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2625,7 +2625,7 @@ bool CChainState::DisconnectTip(CValidationState& state, const CChainParams& cha } LogPrint(BCLog::BENCHMARK, "- Disconnect block: %.2fms\n", (GetTimeMicros() - nStart) * MILLI); // Write the chain state to disk, if necessary. - if (!FlushStateToDisk(chainparams, state, FlushStateMode::IF_NEEDED)) + if (!FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC)) return false; if (disconnectpool) { @@ -2764,7 +2764,7 @@ bool CChainState::ConnectTip(CValidationState& state, const CChainParams& chainp int64_t nTime4 = GetTimeMicros(); nTimeFlush += nTime4 - nTime3; LogPrint(BCLog::BENCHMARK, " - Flush: %.2fms [%.2fs (%.2fms/blk)]\n", (nTime4 - nTime3) * MILLI, nTimeFlush * MICRO, nTimeFlush * MILLI / nBlocksTotal); // Write the chain state to disk, if necessary. - if (!FlushStateToDisk(chainparams, state, FlushStateMode::IF_NEEDED)) + if (!FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC)) return false; int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4; LogPrint(BCLog::BENCHMARK, " - Writing chainstate: %.2fms [%.2fs (%.2fms/blk)]\n", (nTime5 - nTime4) * MILLI, nTimeChainState * MICRO, nTimeChainState * MILLI / nBlocksTotal); From d56ed4c87ee416fd2ee66b8fc52b4e031fe75178 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 13:37:23 -0600 Subject: [PATCH 006/401] Update validation.cpp --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 3af369c5fdaf..34edc1ce9085 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4090,7 +4090,7 @@ bool CChainState::AcceptBlock(const std::shared_ptr& pblock, CVali } if (g_chainstate && g_chainstate->CanFlushToDisk()) { - g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::NONE); + g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC); } CheckBlockIndex(chainparams.GetConsensus()); From dd9bbbaf24e3d470ff9911870aace28202e1a6d1 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 14:54:02 -0600 Subject: [PATCH 007/401] testing --- src/validation.cpp | 16 ++-------------- src/validation.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 34edc1ce9085..0b23718bff0d 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2586,6 +2586,8 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar GuessVerificationProgress(chainParams.TxData(), pindexNew), ::ChainstateActive().CoinsTip().DynamicMemoryUsage() * (1.0 / (1<<20)), ::ChainstateActive().CoinsTip().GetCacheSize(), evoDb->GetMemoryUsage() * (1.0 / (1<<20)), !warningMessages.empty() ? strprintf(" warning='%s'", warningMessages) : ""); + + CMainCleanup(); } @@ -5366,17 +5368,3 @@ double GuessVerificationProgress(const ChainTxData& data, const CBlockIndex *pin return std::min(pindex->nChainTx / fTxTotal, 1.0); } - -class CMainCleanup -{ -public: - CMainCleanup() {} - ~CMainCleanup() { - // block headers - BlockMap::iterator it1 = g_blockman.m_block_index.begin(); - for (; it1 != g_blockman.m_block_index.end(); it1++) - delete (*it1).second; - g_blockman.m_block_index.clear(); - } -}; -static CMainCleanup instance_of_cmaincleanup; diff --git a/src/validation.h b/src/validation.h index dcec924c3c83..81356a91fae4 100644 --- a/src/validation.h +++ b/src/validation.h @@ -812,4 +812,19 @@ inline bool IsBlockPruned(const CBlockIndex* pblockindex) return (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0); } +class CMainCleanup +{ +public: + CMainCleanup() {} + ~CMainCleanup() { + // block headers + BlockMap::iterator it1 = g_blockman.m_block_index.begin(); + for (; it1 != g_blockman.m_block_index.end(); it1++) + delete (*it1).second; + g_blockman.m_block_index.clear(); + } +}; +static CMainCleanup instance_of_cmaincleanup; + + #endif // BITCOIN_VALIDATION_H From 3b5cbe0bf2cf014fe218b8c3b9645eaf61430c75 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 14:57:20 -0600 Subject: [PATCH 008/401] test --- src/validation.cpp | 18 ++++++++++++++++++ src/validation.h | 15 --------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 0b23718bff0d..2087803a79fe 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -185,6 +185,24 @@ namespace { std::set setDirtyFileInfo; } // anon namespace + +class CMainCleanup +{ +public: + CMainCleanup() {} + ~CMainCleanup() { + // block headers + BlockMap::iterator it1 = g_blockman.m_block_index.begin(); + for (; it1 != g_blockman.m_block_index.end(); it1++) + delete (*it1).second; + g_blockman.m_block_index.clear(); + } +}; +static CMainCleanup instance_of_cmaincleanup; + + + + CBlockIndex* LookupBlockIndex(const uint256& hash) { AssertLockHeld(cs_main); diff --git a/src/validation.h b/src/validation.h index 81356a91fae4..dcec924c3c83 100644 --- a/src/validation.h +++ b/src/validation.h @@ -812,19 +812,4 @@ inline bool IsBlockPruned(const CBlockIndex* pblockindex) return (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0); } -class CMainCleanup -{ -public: - CMainCleanup() {} - ~CMainCleanup() { - // block headers - BlockMap::iterator it1 = g_blockman.m_block_index.begin(); - for (; it1 != g_blockman.m_block_index.end(); it1++) - delete (*it1).second; - g_blockman.m_block_index.clear(); - } -}; -static CMainCleanup instance_of_cmaincleanup; - - #endif // BITCOIN_VALIDATION_H From 7a293269540875da30b9b1cb3f697c36bfba5d52 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 15:49:33 -0600 Subject: [PATCH 009/401] Update validation.cpp --- src/validation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 2087803a79fe..d71ad1f42c6f 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1154,6 +1154,9 @@ bool CChainState::IsInitialBlockDownload() const return true; LogPrintf("Leaving InitialBlockDownload (latching to false)\n"); m_cached_finished_ibd.store(true, std::memory_order_relaxed); + + UnloadBlockIndex(); + return false; } @@ -2605,8 +2608,6 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar evoDb->GetMemoryUsage() * (1.0 / (1<<20)), !warningMessages.empty() ? strprintf(" warning='%s'", warningMessages) : ""); - CMainCleanup(); - } /** Disconnect m_chain's tip. From 3b6959ce3e169a79669c64d14ad521133a79dda7 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 15:53:04 -0600 Subject: [PATCH 010/401] Revert "Update validation.cpp" This reverts commit 7a293269540875da30b9b1cb3f697c36bfba5d52. --- src/validation.cpp | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 34edc1ce9085..d71ad1f42c6f 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -185,6 +185,24 @@ namespace { std::set setDirtyFileInfo; } // anon namespace + +class CMainCleanup +{ +public: + CMainCleanup() {} + ~CMainCleanup() { + // block headers + BlockMap::iterator it1 = g_blockman.m_block_index.begin(); + for (; it1 != g_blockman.m_block_index.end(); it1++) + delete (*it1).second; + g_blockman.m_block_index.clear(); + } +}; +static CMainCleanup instance_of_cmaincleanup; + + + + CBlockIndex* LookupBlockIndex(const uint256& hash) { AssertLockHeld(cs_main); @@ -1136,6 +1154,9 @@ bool CChainState::IsInitialBlockDownload() const return true; LogPrintf("Leaving InitialBlockDownload (latching to false)\n"); m_cached_finished_ibd.store(true, std::memory_order_relaxed); + + UnloadBlockIndex(); + return false; } @@ -2586,7 +2607,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar GuessVerificationProgress(chainParams.TxData(), pindexNew), ::ChainstateActive().CoinsTip().DynamicMemoryUsage() * (1.0 / (1<<20)), ::ChainstateActive().CoinsTip().GetCacheSize(), evoDb->GetMemoryUsage() * (1.0 / (1<<20)), !warningMessages.empty() ? strprintf(" warning='%s'", warningMessages) : ""); - + } /** Disconnect m_chain's tip. @@ -5366,17 +5387,3 @@ double GuessVerificationProgress(const ChainTxData& data, const CBlockIndex *pin return std::min(pindex->nChainTx / fTxTotal, 1.0); } - -class CMainCleanup -{ -public: - CMainCleanup() {} - ~CMainCleanup() { - // block headers - BlockMap::iterator it1 = g_blockman.m_block_index.begin(); - for (; it1 != g_blockman.m_block_index.end(); it1++) - delete (*it1).second; - g_blockman.m_block_index.clear(); - } -}; -static CMainCleanup instance_of_cmaincleanup; From c4f606d724ec703bca97d4554408bf7905a4cefa Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 16:45:44 -0600 Subject: [PATCH 011/401] Update validation.cpp --- src/validation.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index d71ad1f42c6f..1a86f6a7f420 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1155,8 +1155,6 @@ bool CChainState::IsInitialBlockDownload() const LogPrintf("Leaving InitialBlockDownload (latching to false)\n"); m_cached_finished_ibd.store(true, std::memory_order_relaxed); - UnloadBlockIndex(); - return false; } @@ -4110,9 +4108,13 @@ bool CChainState::AcceptBlock(const std::shared_ptr& pblock, CVali return AbortNode(state, std::string("System error: ") + e.what()); } - if (g_chainstate && g_chainstate->CanFlushToDisk()) { + g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC); + +/* + if (g_chainstate && g_chainstate->CanFlushToDisk()) { g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC); } +*/ CheckBlockIndex(chainparams.GetConsensus()); From a66619380ccd717369f8d74b1ecd2beb02b07794 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 17:07:45 -0600 Subject: [PATCH 012/401] Update validation.cpp --- src/validation.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 1a86f6a7f420..50150498bf9d 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3541,10 +3541,13 @@ void CChainState::ReceivedBlockTransactions(const CBlock& block, CBlockIndex* pi CBlockIndex *pindex = queue.front(); queue.pop_front(); pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx; + pindex->nSequenceId = nBlockSequenceId++; +/* { LOCK(cs_nBlockSequenceId); pindex->nSequenceId = nBlockSequenceId++; } +*/ if (m_chain.Tip() == nullptr || !setBlockIndexCandidates.value_comp()(pindex, m_chain.Tip())) { if (!(pindex->nStatus & BLOCK_CONFLICT_CHAINLOCK)) { setBlockIndexCandidates.insert(pindex); @@ -3558,6 +3561,9 @@ void CChainState::ReceivedBlockTransactions(const CBlock& block, CBlockIndex* pi m_blockman.m_blocks_unlinked.erase(it); } } + + CMainCleanup(); + } else { if (pindexNew->pprev && pindexNew->pprev->IsValid(BLOCK_VALID_TREE)) { m_blockman.m_blocks_unlinked.insert(std::make_pair(pindexNew->pprev, pindexNew)); @@ -4108,7 +4114,7 @@ bool CChainState::AcceptBlock(const std::shared_ptr& pblock, CVali return AbortNode(state, std::string("System error: ") + e.what()); } - g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC); + g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::ALWAYS); /* if (g_chainstate && g_chainstate->CanFlushToDisk()) { From f22b82276054ad1035608a49edf496ee2dc51ecb Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 17:15:32 -0600 Subject: [PATCH 013/401] Update validation.cpp --- src/validation.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 50150498bf9d..be2c89512c05 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3562,7 +3562,6 @@ void CChainState::ReceivedBlockTransactions(const CBlock& block, CBlockIndex* pi } } - CMainCleanup(); } else { if (pindexNew->pprev && pindexNew->pprev->IsValid(BLOCK_VALID_TREE)) { From 2d34b4fbcdd5926692264fa656392e1e75802557 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 17:51:50 -0600 Subject: [PATCH 014/401] Update validation.cpp --- src/validation.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/validation.cpp b/src/validation.cpp index be2c89512c05..602992ab1b82 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -78,6 +78,8 @@ static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB static constexpr std::chrono::hours DATABASE_WRITE_INTERVAL{1}; /** Time to wait between flushing chainstate to disk. */ static constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL{2}; +/** Time to wait between flushing COINS cache to disk. */ +static constexpr std::chrono::minutes COINS_CACHE_FLUSH_INTERVAL{5}; /** Maximum age of our tip for us to be considered current for fee estimation */ static constexpr std::chrono::hours MAX_FEE_ESTIMATION_TIP_AGE{3}; @@ -2445,6 +2447,10 @@ bool CChainState::FlushStateToDisk( bool fPeriodicWrite = mode == FlushStateMode::PERIODIC && nNow > nLastWrite + DATABASE_WRITE_INTERVAL; // It's been very long since we flushed the cache. Do this infrequently, to optimize cache usage. bool fPeriodicFlush = mode == FlushStateMode::PERIODIC && nNow > nLastFlush + DATABASE_FLUSH_INTERVAL; + + // It's been very long since we flushed the cache. Do this infrequently, to optimize cache usage. + bool fPeriodicCoinFlush = mode == FlushStateMode::PERIODIC && nNow > nLastFlush + COINS_CACHE_FLUSH_INTERVAL; + // Combine all conditions that result in a full cache flush. fDoFullFlush = (mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fEvoDbCacheCritical || fPeriodicFlush || fFlushForPrune; // Write blocks and block index to disk. @@ -2489,6 +2495,29 @@ bool CChainState::FlushStateToDisk( } nLastWrite = nNow; } + + if (fPeriodicCoinFlush && !CoinsTip().GetBestBlock().IsNull()) { + LOG_TIME_SECONDS(strprintf("write coins cache to disk (%d coins, %.2fkB)", + coins_count, coins_mem_usage / 1000)); + + // Typical Coin structures on disk are around 48 bytes in size. + // Pushing a new one to the database can cause it to be written + // twice (once in the log, and once in the tables). This is already + // an overestimation, as most will delete an existing entry or + // overwrite one. Still, use a conservative safety factor of 2. + if (!CheckDiskSpace(GetDataDir(), 48 * 2 * 2 * CoinsTip().GetCacheSize())) { + return AbortNode(state, "Disk space is too low!", _("Error: Disk space is too low!").translated, CClientUIInterface::MSG_NOPREFIX); + } + // Flush the chainstate (which may refer to block index entries). + if (!CoinsTip().Flush()) + return AbortNode(state, "Failed to write to coin database"); + if (!evoDb->CommitRootTransaction()) { + return AbortNode(state, "Failed to commit EvoDB"); + } + nLastFlush = nNow; + full_flush_completed = true; + } + // Flush best chain related state. This can only be done if the blocks / block index write was also done. if (fDoFullFlush && !CoinsTip().GetBestBlock().IsNull()) { LOG_TIME_SECONDS(strprintf("write coins cache to disk (%d coins, %.2fkB)", From f93529696fe0c74f84702fffa37eb4b7a97d66fc Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 17:53:46 -0600 Subject: [PATCH 015/401] Update validation.cpp --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 602992ab1b82..c5bafa439dff 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4142,7 +4142,7 @@ bool CChainState::AcceptBlock(const std::shared_ptr& pblock, CVali return AbortNode(state, std::string("System error: ") + e.what()); } - g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::ALWAYS); + g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC); /* if (g_chainstate && g_chainstate->CanFlushToDisk()) { From 360aedadad8502b7aadecb5e6298b45ee97dd31d Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 19:08:42 -0600 Subject: [PATCH 016/401] Update validation.cpp --- src/validation.cpp | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index c5bafa439dff..2cc75d2ae42b 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -79,7 +79,7 @@ static constexpr std::chrono::hours DATABASE_WRITE_INTERVAL{1}; /** Time to wait between flushing chainstate to disk. */ static constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL{2}; /** Time to wait between flushing COINS cache to disk. */ -static constexpr std::chrono::minutes COINS_CACHE_FLUSH_INTERVAL{5}; +static constexpr std::chrono::minutes MEMORY_FLUSH_INTERVAL{5}; /** Maximum age of our tip for us to be considered current for fee estimation */ static constexpr std::chrono::hours MAX_FEE_ESTIMATION_TIP_AGE{3}; @@ -2449,12 +2449,13 @@ bool CChainState::FlushStateToDisk( bool fPeriodicFlush = mode == FlushStateMode::PERIODIC && nNow > nLastFlush + DATABASE_FLUSH_INTERVAL; // It's been very long since we flushed the cache. Do this infrequently, to optimize cache usage. - bool fPeriodicCoinFlush = mode == FlushStateMode::PERIODIC && nNow > nLastFlush + COINS_CACHE_FLUSH_INTERVAL; + bool fPeriodicMemoryFlush = mode == FlushStateMode::PERIODIC && nNow > nLastFlush + MEMORY_FLUSH_INTERVAL; // Combine all conditions that result in a full cache flush. fDoFullFlush = (mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fEvoDbCacheCritical || fPeriodicFlush || fFlushForPrune; + // Write blocks and block index to disk. - if (fDoFullFlush || fPeriodicWrite) { + if (fDoFullFlush || fPeriodicWrite || fPeriodicMemoryFlush) { // Depend on nMinDiskSpace to ensure we can write block index if (!CheckDiskSpace(GetBlocksDir())) { return AbortNode(state, "Disk space is too low!", _("Error: Disk space is too low!").translated, CClientUIInterface::MSG_NOPREFIX); @@ -2494,28 +2495,9 @@ bool CChainState::FlushStateToDisk( UnlinkPrunedFiles(setFilesToPrune); } nLastWrite = nNow; - } - if (fPeriodicCoinFlush && !CoinsTip().GetBestBlock().IsNull()) { - LOG_TIME_SECONDS(strprintf("write coins cache to disk (%d coins, %.2fkB)", - coins_count, coins_mem_usage / 1000)); + if (fPeriodicMemoryFlush) { nLastFlush = nNow; ) - // Typical Coin structures on disk are around 48 bytes in size. - // Pushing a new one to the database can cause it to be written - // twice (once in the log, and once in the tables). This is already - // an overestimation, as most will delete an existing entry or - // overwrite one. Still, use a conservative safety factor of 2. - if (!CheckDiskSpace(GetDataDir(), 48 * 2 * 2 * CoinsTip().GetCacheSize())) { - return AbortNode(state, "Disk space is too low!", _("Error: Disk space is too low!").translated, CClientUIInterface::MSG_NOPREFIX); - } - // Flush the chainstate (which may refer to block index entries). - if (!CoinsTip().Flush()) - return AbortNode(state, "Failed to write to coin database"); - if (!evoDb->CommitRootTransaction()) { - return AbortNode(state, "Failed to commit EvoDB"); - } - nLastFlush = nNow; - full_flush_completed = true; } // Flush best chain related state. This can only be done if the blocks / block index write was also done. @@ -3591,7 +3573,6 @@ void CChainState::ReceivedBlockTransactions(const CBlock& block, CBlockIndex* pi } } - } else { if (pindexNew->pprev && pindexNew->pprev->IsValid(BLOCK_VALID_TREE)) { m_blockman.m_blocks_unlinked.insert(std::make_pair(pindexNew->pprev, pindexNew)); From 228ed9f09e5c140c13dc10f7da71089a3b7e51ea Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 19:11:34 -0600 Subject: [PATCH 017/401] typo --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 2cc75d2ae42b..6b8ff0fd529e 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2496,7 +2496,7 @@ bool CChainState::FlushStateToDisk( } nLastWrite = nNow; - if (fPeriodicMemoryFlush) { nLastFlush = nNow; ) + if (fPeriodicMemoryFlush) { nLastFlush = nNow; } } From a987f4731df4dcbdd7d2e24f9142eb2c19a549d1 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 19:35:56 -0600 Subject: [PATCH 018/401] Update validation.cpp --- src/validation.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 6b8ff0fd529e..e6c149cf312b 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2449,7 +2449,7 @@ bool CChainState::FlushStateToDisk( bool fPeriodicFlush = mode == FlushStateMode::PERIODIC && nNow > nLastFlush + DATABASE_FLUSH_INTERVAL; // It's been very long since we flushed the cache. Do this infrequently, to optimize cache usage. - bool fPeriodicMemoryFlush = mode == FlushStateMode::PERIODIC && nNow > nLastFlush + MEMORY_FLUSH_INTERVAL; + bool fPeriodicMemoryFlush = ((mode == FlushStateMode::MEMORY) || (nNow > nLastFlush + MEMORY_FLUSH_INTERVAL)); // Combine all conditions that result in a full cache flush. fDoFullFlush = (mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fEvoDbCacheCritical || fPeriodicFlush || fFlushForPrune; @@ -4123,7 +4123,12 @@ bool CChainState::AcceptBlock(const std::shared_ptr& pblock, CVali return AbortNode(state, std::string("System error: ") + e.what()); } - g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC); + if (fInitialBlockDownload) { + g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::MEMORY); + } else { + g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC); + } + /* if (g_chainstate && g_chainstate->CanFlushToDisk()) { From b93e4129501cfe3220aaad5ce4ebc76c503cdbe9 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 19:42:06 -0600 Subject: [PATCH 019/401] Update validation.cpp --- src/validation.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index e6c149cf312b..addc73fb8a05 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2449,7 +2449,7 @@ bool CChainState::FlushStateToDisk( bool fPeriodicFlush = mode == FlushStateMode::PERIODIC && nNow > nLastFlush + DATABASE_FLUSH_INTERVAL; // It's been very long since we flushed the cache. Do this infrequently, to optimize cache usage. - bool fPeriodicMemoryFlush = ((mode == FlushStateMode::MEMORY) || (nNow > nLastFlush + MEMORY_FLUSH_INTERVAL)); + bool fPeriodicMemoryFlush = ((mode == FlushStateMode::PERIODIC) || (nNow > nLastFlush + MEMORY_FLUSH_INTERVAL)); // Combine all conditions that result in a full cache flush. fDoFullFlush = (mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fEvoDbCacheCritical || fPeriodicFlush || fFlushForPrune; @@ -4123,8 +4123,10 @@ bool CChainState::AcceptBlock(const std::shared_ptr& pblock, CVali return AbortNode(state, std::string("System error: ") + e.what()); } - if (fInitialBlockDownload) { - g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::MEMORY); + bool fInitialDownload = IsInitialBlockDownload(); + + if (fInitialDownload) { + g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::ALWAYS); } else { g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC); } From e5db5e564079a9d9561ed7c42b6943e154ae139a Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 19:48:57 -0600 Subject: [PATCH 020/401] updates --- src/validation.cpp | 4 ++-- src/validation.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index addc73fb8a05..9430c456e2bd 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2449,7 +2449,7 @@ bool CChainState::FlushStateToDisk( bool fPeriodicFlush = mode == FlushStateMode::PERIODIC && nNow > nLastFlush + DATABASE_FLUSH_INTERVAL; // It's been very long since we flushed the cache. Do this infrequently, to optimize cache usage. - bool fPeriodicMemoryFlush = ((mode == FlushStateMode::PERIODIC) || (nNow > nLastFlush + MEMORY_FLUSH_INTERVAL)); + bool fPeriodicMemoryFlush = ((mode == FlushStateMode::MEMORY) || (nNow > nLastFlush + MEMORY_FLUSH_INTERVAL)); // Combine all conditions that result in a full cache flush. fDoFullFlush = (mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fEvoDbCacheCritical || fPeriodicFlush || fFlushForPrune; @@ -4126,7 +4126,7 @@ bool CChainState::AcceptBlock(const std::shared_ptr& pblock, CVali bool fInitialDownload = IsInitialBlockDownload(); if (fInitialDownload) { - g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::ALWAYS); + g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::MEMORY); } else { g_chainstate->FlushStateToDisk(chainparams, state, FlushStateMode::PERIODIC); } diff --git a/src/validation.h b/src/validation.h index dcec924c3c83..4134cb46a4dc 100644 --- a/src/validation.h +++ b/src/validation.h @@ -388,6 +388,7 @@ enum class FlushStateMode { NONE, IF_NEEDED, PERIODIC, + MEMORY, ALWAYS }; From 72fae0b54551a5515bf61558faa990b05abf073e Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 23 Nov 2024 20:04:37 -0600 Subject: [PATCH 021/401] Update validation.cpp --- src/validation.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 9430c456e2bd..cbf4851c401f 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2501,10 +2501,12 @@ bool CChainState::FlushStateToDisk( } // Flush best chain related state. This can only be done if the blocks / block index write was also done. - if (fDoFullFlush && !CoinsTip().GetBestBlock().IsNull()) { - LOG_TIME_SECONDS(strprintf("write coins cache to disk (%d coins, %.2fkB)", - coins_count, coins_mem_usage / 1000)); - + if (fPeriodicMemoryFlush || (fDoFullFlush && !CoinsTip().GetBestBlock().IsNull())) { + if (fDoFullFlush) { + LOG_TIME_SECONDS(strprintf("write coins cache to disk (%d coins, %.2fkB)", + coins_count, coins_mem_usage / 1000)); + } + // Typical Coin structures on disk are around 48 bytes in size. // Pushing a new one to the database can cause it to be written // twice (once in the log, and once in the tables). This is already From 7730794d1d12e922f2fa671bb994881b99eabbfc Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:44:50 -0600 Subject: [PATCH 022/401] Updates for Ubuntu 24 building bumped version to 3.4.9.0 Updated Boost, LibEvent, bls-dash, libxcb, xcb_proto dependencies [20:22] and a few code changes to accommodate upgraded depends --- configure.ac | 2 +- depends/packages/bls-dash.mk | 4 ++-- depends/packages/boost.mk | 22 +++++++++++++++------- depends/packages/libevent.mk | 34 +++++++++++++++++++--------------- depends/packages/libxcb.mk | 6 +++--- depends/packages/xcb_proto.mk | 6 +++--- src/support/lockedpool.h | 1 + src/sync.h | 8 +++++--- src/util/string.h | 1 + src/wallet/bdb.cpp | 4 ++-- src/wallet/walletutil.cpp | 2 +- 11 files changed, 53 insertions(+), 37 deletions(-) diff --git a/configure.ac b/configure.ac index 40b99f6d0b0c..1ca7e04bec56 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 3) define(_CLIENT_VERSION_MINOR, 4) -define(_CLIENT_VERSION_REVISION, 8) +define(_CLIENT_VERSION_REVISION, 9) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) diff --git a/depends/packages/bls-dash.mk b/depends/packages/bls-dash.mk index a8ab82188580..aeaa315c29a6 100644 --- a/depends/packages/bls-dash.mk +++ b/depends/packages/bls-dash.mk @@ -1,10 +1,10 @@ package=bls-dash -$(package)_version=1.2.0 +$(package)_version=1.2.4 $(package)_download_path=https://github.com/dashpay/bls-signatures/archive $(package)_download_file=$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_download_file) $(package)_build_subdir=build -$(package)_sha256_hash=94e49f3eaa29bc1f354cd569c00f4f4314d1c8ab4758527c248b67da9686135a +$(package)_sha256_hash=552795b50cd8af65a8c3b8efe5dce7f9c837b8fe6d70668c112f67711285495c $(package)_dependencies=gmp cmake $(package)_darwin_triplet=x86_64-apple-darwin19 diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 8b499367be24..e4c9d700106a 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,8 +1,9 @@ package=boost -$(package)_version=1_73_0 +$(package)_version=1_86_0 $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/ $(package)_file_name=boost_$($(package)_version).tar.bz2 -$(package)_sha256_hash=4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 +$(package)_sha256_hash=1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b +#4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 $(package)_dependencies=native_b2 define $(package)_set_vars @@ -21,20 +22,27 @@ $(package)_config_opts_i686_android=address-model=32 $(package)_config_opts_aarch64_android=address-model=64 $(package)_config_opts_x86_64_android=address-model=64 $(package)_config_opts_armv7a_android=address-model=32 +unary_function=unary_function ifneq (,$(findstring clang,$($(package)_cxx))) $(package)_toolset_$(host_os)=clang +ifeq ($(build_os),darwin) +unary_function=__unary_function +endif else $(package)_toolset_$(host_os)=gcc endif -$(package)_config_libraries=filesystem,thread,test -$(package)_cxxflags=-std=c++17 -fvisibility=hidden +$(package)_config_libraries=filesystem,test,thread +$(package)_cxxflags=-std=c++17 $(package)_cxxflags_linux=-fPIC +$(package)_cxxflags_freebsd=-fPIC +$(package)_cxxflags_openbsd=-fPIC $(package)_cxxflags_android=-fPIC +$(package)_cxxflags_x86_64=-fcf-protection=full endef -# Fix unused variable in boost_process, can be removed after upgrading to 1.72 +# Fix missing unary_function in clang15 on macos, can be removed after upgrading to 1.81 define $(package)_preprocess_cmds - sed -i.old "s/int ret_sig = 0;//" boost/process/detail/posix/wait_group.hpp && \ + sed -i.old "s/unary_function/$(unary_function)/" boost/container_hash/hash.hpp && \ echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cflags)\" \"$($(package)_cxxflags)\" \"$($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_ar)\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef @@ -47,5 +55,5 @@ define $(package)_build_cmds endef define $(package)_stage_cmds - b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install + b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) --no-cmake-config install endef diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 9d235239dabc..5bd12522a7d5 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -1,25 +1,26 @@ package=libevent -$(package)_version=2.1.8 -$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)-stable -$(package)_file_name=$(package)-$($(package)_version)-stable.tar.gz -$(package)_sha256_hash=965cc5a8bb46ce4199a47e9b2c9e1cae3b137e8356ffdad6d94d3b9069b71dc2 -$(package)_patches=fix_android_arc4random_addrandom.patch - -ifneq (,$(findstring android,$(host))) - define $(package)_preprocess_cmds - ./autogen.sh && patch -p1 < $($(package)_patch_dir)/fix_android_arc4random_addrandom.patch - endef -else - define $(package)_preprocess_cmds - ./autogen.sh - endef -endif +$(package)_version=2.1.12-stable +$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)/ +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb +# When building for Windows, we set _WIN32_WINNT to target the same Windows +# version as we do in configure. Due to quirks in libevents build system, this +# is also required to enable support for ipv6. See #19375. define $(package)_set_vars $(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples + $(package)_config_opts += --disable-dependency-tracking --enable-option-checking $(package)_config_opts_release=--disable-debug-mode $(package)_config_opts_linux=--with-pic + $(package)_config_opts_freebsd=--with-pic + $(package)_config_opts_netbsd=--with-pic + $(package)_config_opts_openbsd=--with-pic $(package)_config_opts_android=--with-pic + $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601 +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux endef define $(package)_config_cmds @@ -35,4 +36,7 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds + rm lib/*.la && \ + rm include/ev*.h && \ + rm include/event2/*_compat.h endef diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index bc3a9a091373..70ee6e065ed2 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -1,8 +1,8 @@ package=libxcb -$(package)_version=1.10 +$(package)_version=1.17.0 $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5 +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=2c69287424c9e2128cb47ffe92171e10417041ec2963bceafb65cb3fcf8f0b85 $(package)_dependencies=xcb_proto libXau define $(package)_set_vars diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk index 44110394bdda..5af7731a5cca 100644 --- a/depends/packages/xcb_proto.mk +++ b/depends/packages/xcb_proto.mk @@ -1,8 +1,8 @@ package=xcb_proto -$(package)_version=1.10 +$(package)_version=1.17.0 $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=xcb-proto-$($(package)_version).tar.bz2 -$(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05 +$(package)_file_name=xcb-proto-$($(package)_version).tar.gz +$(package)_sha256_hash=392d3c9690f8c8202a68fdb89c16fd55159ab8d65000a6da213f4a1576e97a16 define $(package)_set_vars $(package)_config_opts=--disable-shared diff --git a/src/support/lockedpool.h b/src/support/lockedpool.h index 891c2eaa506e..f9596fc80244 100644 --- a/src/support/lockedpool.h +++ b/src/support/lockedpool.h @@ -5,6 +5,7 @@ #ifndef BITCOIN_SUPPORT_LOCKEDPOOL_H #define BITCOIN_SUPPORT_LOCKEDPOOL_H +#include #include #include #include diff --git a/src/sync.h b/src/sync.h index 77aaf6903938..21d26686016a 100644 --- a/src/sync.h +++ b/src/sync.h @@ -148,10 +148,12 @@ class SCOPED_LOCKABLE UniqueLock : public Base bool TryEnter(const char* pszName, const char* pszFile, int nLine) { EnterCritical(pszName, pszFile, nLine, (void*)(Base::mutex()), true); - Base::try_lock(); + if (Base::try_lock()) return true; +/* if (!Base::owns_lock()) - LeaveCritical(); - return Base::owns_lock(); +*/ + LeaveCritical(); + return false; /* Base::owns_lock(); */ } public: diff --git a/src/util/string.h b/src/util/string.h index 223216b4cc1b..3c9186445120 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -7,6 +7,7 @@ #include +#include #include #include #include diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp index f4dff34b9654..90b54bdbd83c 100644 --- a/src/wallet/bdb.cpp +++ b/src/wallet/bdb.cpp @@ -697,7 +697,7 @@ bool BerkeleyDatabase::Backup(const std::string& strDest) const return false; } - fs::copy_file(pathSrc, pathDest, fs::copy_option::overwrite_if_exists); + fs::copy_file(pathSrc, pathDest, fs::copy_options::overwrite_existing); LogPrintf("copied %s to %s\n", strFile, pathDest.string()); return true; } catch (const fs::filesystem_error& e) { @@ -874,4 +874,4 @@ void BerkeleyDatabase::RemoveRef() std::unique_ptr BerkeleyDatabase::MakeBatch(const char* mode, bool flush_on_close) { return MakeUnique(*this, mode, flush_on_close); -} \ No newline at end of file +} diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp index 9aaa620c9e03..5f341f146d4d 100644 --- a/src/wallet/walletutil.cpp +++ b/src/wallet/walletutil.cpp @@ -74,7 +74,7 @@ std::vector ListWalletDir() if (it->status().type() == fs::directory_file && IsBerkeleyBtree(it->path() / "wallet.dat")) { // Found a directory which contains wallet.dat btree file, add it as a wallet. paths.emplace_back(path); - } else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && IsBerkeleyBtree(it->path())) { + } else if (it.depth() == 0 && it->symlink_status().type() == fs::regular_file && IsBerkeleyBtree(it->path())) { if (it->path().filename() == "wallet.dat") { // Found top-level wallet.dat btree file, add top level directory "" // as a wallet. From 33c1e8526f4181b82811c2ff117fa57523c629fd Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 25 Nov 2024 21:29:57 -0600 Subject: [PATCH 023/401] Update bip32.h missing updated file --- src/util/bip32.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/bip32.h b/src/util/bip32.h index fa1c0125f449..8cc8f8c15555 100644 --- a/src/util/bip32.h +++ b/src/util/bip32.h @@ -8,6 +8,7 @@ #include #include #include +#include /** Parse an HD keypaths like "m/7/0'/2000". */ [[nodiscard]] bool ParseHDKeypath(const std::string& keypath_str, std::vector& keypath); From ddd94f5f0c6d1036a578193869c8b416aa693587 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sun, 1 Dec 2024 09:07:07 -0600 Subject: [PATCH 024/401] Update funcs.mk --- depends/funcs.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/depends/funcs.mk b/depends/funcs.mk index 8891e17082ae..27fd9eb4c4d4 100644 --- a/depends/funcs.mk +++ b/depends/funcs.mk @@ -170,42 +170,42 @@ define int_add_cmds $($(1)_fetched): $(AT)mkdir -p $$(@D) $(SOURCES_PATH) $(AT)rm -f $$@ - $(AT)touch $$@ +# $(AT)touch $$@ $(AT)cd $$(@D); $(call $(1)_fetch_cmds,$(1)) $(AT)cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);) - $(AT)touch $$@ +# $(AT)touch $$@ $($(1)_extracted): | $($(1)_fetched) $(AT)echo Extracting $(1)... $(AT)mkdir -p $$(@D) $(AT)cd $$(@D); $(call $(1)_extract_cmds,$(1)) - $(AT)touch $$@ +# $(AT)touch $$@ $($(1)_preprocessed): | $($(1)_extracted) $(AT)echo Preprocessing $(1)... $(AT)mkdir -p $$(@D) $($(1)_patch_dir) $(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;) $(AT)cd $$(@D); $(call $(1)_preprocess_cmds, $(1)) - $(AT)touch $$@ +# $(AT)touch $$@ $($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed) $(AT)echo Configuring $(1)... $(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar --no-same-owner -xf $($(package)_cached); ) $(AT)mkdir -p $$(@D) $(AT)+cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1)) - $(AT)touch $$@ +# $(AT)touch $$@ $($(1)_built): | $($(1)_configured) $(AT)echo Building $(1)... $(AT)mkdir -p $$(@D) $(AT)+cd $$(@D); $($(1)_build_env) $(call $(1)_build_cmds, $(1)) - $(AT)touch $$@ +# $(AT)touch $$@ $($(1)_staged): | $($(1)_built) $(AT)echo Staging $(1)... $(AT)mkdir -p $($(1)_staging_dir)/$(host_prefix) $(AT)cd $($(1)_build_dir); $($(1)_stage_env) $(call $(1)_stage_cmds, $(1)) $(AT)rm -rf $($(1)_extract_dir) - $(AT)touch $$@ +# $(AT)touch $$@ $($(1)_postprocessed): | $($(1)_staged) $(AT)echo Postprocessing $(1)... $(AT)cd $($(1)_staging_prefix_dir); $(call $(1)_postprocess_cmds) - $(AT)touch $$@ +# $(AT)touch $$@ $($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed) $(AT)echo Caching $(1)... $(AT)cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | tar --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T - From c85d7e0a578ed37c702b63a19ab0b155cd144352 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sun, 1 Dec 2024 09:09:38 -0600 Subject: [PATCH 025/401] Revert "Update funcs.mk" This reverts commit ddd94f5f0c6d1036a578193869c8b416aa693587. --- depends/funcs.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/depends/funcs.mk b/depends/funcs.mk index 27fd9eb4c4d4..8891e17082ae 100644 --- a/depends/funcs.mk +++ b/depends/funcs.mk @@ -170,42 +170,42 @@ define int_add_cmds $($(1)_fetched): $(AT)mkdir -p $$(@D) $(SOURCES_PATH) $(AT)rm -f $$@ -# $(AT)touch $$@ + $(AT)touch $$@ $(AT)cd $$(@D); $(call $(1)_fetch_cmds,$(1)) $(AT)cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);) -# $(AT)touch $$@ + $(AT)touch $$@ $($(1)_extracted): | $($(1)_fetched) $(AT)echo Extracting $(1)... $(AT)mkdir -p $$(@D) $(AT)cd $$(@D); $(call $(1)_extract_cmds,$(1)) -# $(AT)touch $$@ + $(AT)touch $$@ $($(1)_preprocessed): | $($(1)_extracted) $(AT)echo Preprocessing $(1)... $(AT)mkdir -p $$(@D) $($(1)_patch_dir) $(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;) $(AT)cd $$(@D); $(call $(1)_preprocess_cmds, $(1)) -# $(AT)touch $$@ + $(AT)touch $$@ $($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed) $(AT)echo Configuring $(1)... $(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar --no-same-owner -xf $($(package)_cached); ) $(AT)mkdir -p $$(@D) $(AT)+cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1)) -# $(AT)touch $$@ + $(AT)touch $$@ $($(1)_built): | $($(1)_configured) $(AT)echo Building $(1)... $(AT)mkdir -p $$(@D) $(AT)+cd $$(@D); $($(1)_build_env) $(call $(1)_build_cmds, $(1)) -# $(AT)touch $$@ + $(AT)touch $$@ $($(1)_staged): | $($(1)_built) $(AT)echo Staging $(1)... $(AT)mkdir -p $($(1)_staging_dir)/$(host_prefix) $(AT)cd $($(1)_build_dir); $($(1)_stage_env) $(call $(1)_stage_cmds, $(1)) $(AT)rm -rf $($(1)_extract_dir) -# $(AT)touch $$@ + $(AT)touch $$@ $($(1)_postprocessed): | $($(1)_staged) $(AT)echo Postprocessing $(1)... $(AT)cd $($(1)_staging_prefix_dir); $(call $(1)_postprocess_cmds) -# $(AT)touch $$@ + $(AT)touch $$@ $($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed) $(AT)echo Caching $(1)... $(AT)cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | tar --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T - From 5428a6488d08c961b78cb6f91b712bf7f8bd94b7 Mon Sep 17 00:00:00 2001 From: Crypto Plisskin <13294167+2a5A1Ghu1@users.noreply.github.com> Date: Sun, 1 Dec 2024 10:50:18 -0800 Subject: [PATCH 026/401] [LIBS LINKING] Fix missing CBatchedLogger Linker Issue on Compile --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index e87c3ed97f50..aec7797e4525 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -744,6 +744,7 @@ libscc_util_a_SOURCES = \ util/threadnames.cpp \ util/url.cpp \ util/validation.cpp \ + batchedlogger.cpp \ $(BITCOIN_CORE_H) if GLIBC_BACK_COMPAT From 7d6c04742be7c809a3ba08b804fc2b3cc1815fb6 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sun, 1 Dec 2024 21:15:46 -0600 Subject: [PATCH 027/401] Update packages.mk fixed duplicate in depends make --- depends/packages/packages.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index b5d5322e1130..3e614a85f0aa 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -1,4 +1,4 @@ -packages:=boost libevent zeromq gmp bls-dash backtrace cmake +packages:=boost libevent gmp bls-dash backtrace cmake qt_packages = qrencode zlib From dfcce7b54b28dfe83807fd19d63cdb25863b5d20 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:17:10 -0600 Subject: [PATCH 028/401] combined updates qt 5.15.14 and other updates --- build-aux/m4/bitcoin_qt.m4 | 97 ++++++--- depends/builders/default.mk | 3 +- depends/packages/dbus.mk | 6 +- depends/packages/libXau.mk | 11 +- depends/packages/libxcb.mk | 37 ++-- depends/packages/libxcb_util.mk | 32 +++ depends/packages/libxcb_util_image.mk | 31 +++ depends/packages/libxcb_util_keysyms.mk | 31 +++ depends/packages/libxcb_util_render.mk | 31 +++ depends/packages/libxcb_util_wm.mk | 31 +++ depends/packages/libxkbcommon.mk | 37 ++++ depends/packages/packages.mk | 2 +- depends/packages/qt.mk | 202 ++++++++++-------- depends/packages/xcb_proto.mk | 13 +- depends/packages/xproto.mk | 5 +- .../patches/libxcb/remove_pthread_stubs.patch | 12 ++ depends/patches/qt/clang_18_libpng.patch | 40 ++++ depends/patches/qt/dont_hardcode_pwd.patch | 14 +- .../patches/qt/drop_lrelease_dependency.patch | 20 -- depends/patches/qt/duplicate_lcqpafonts.patch | 104 +++++++++ .../qt/fast_fixed_dtoa_no_optimize.patch | 20 ++ depends/patches/qt/fix-macos-linker.patch | 55 +++++ .../patches/qt/fix_android_jni_static.patch | 3 +- .../patches/qt/fix_android_qmake_conf.patch | 20 -- depends/patches/qt/fix_configure_mac.patch | 50 ----- depends/patches/qt/fix_limits_header.patch | 30 --- .../patches/qt/fix_mingw_cross_compile.patch | 25 --- depends/patches/qt/fix_no_printer.patch | 19 -- depends/patches/qt/fix_powerpc_libpng.patch | 23 -- .../qt/fix_qpainter_non_determinism.patch | 63 ------ depends/patches/qt/fix_qt_pkgconfig.patch | 16 +- depends/patches/qt/fix_rcc_determinism.patch | 15 -- depends/patches/qt/fix_riscv64_arch.patch | 14 -- depends/patches/qt/freetype_back_compat.patch | 28 --- depends/patches/qt/guix_cross_lib_path.patch | 17 ++ depends/patches/qt/mac-qmake.conf | 6 +- depends/patches/qt/memory_resource.patch | 49 +++++ depends/patches/qt/no-xlib.patch | 22 +- depends/patches/qt/qt.pro | 16 ++ .../qt/qtbase-moc-ignore-gcc-macro.patch | 17 ++ depends/patches/qt/qttools_src.pro | 6 + .../patches/qt/rcc_hardcode_timestamp.patch | 24 +++ .../qt/utc_from_string_no_optimize.patch | 84 ++++++++ depends/patches/qt/windows_lto.patch | 31 +++ depends/patches/qt/xkb-default.patch | 26 --- src/qt/guiutil.cpp | 9 + src/qt/guiutil.h | 9 + src/qt/transactionview.cpp | 16 +- 48 files changed, 921 insertions(+), 551 deletions(-) create mode 100644 depends/packages/libxcb_util.mk create mode 100644 depends/packages/libxcb_util_image.mk create mode 100644 depends/packages/libxcb_util_keysyms.mk create mode 100644 depends/packages/libxcb_util_render.mk create mode 100644 depends/packages/libxcb_util_wm.mk create mode 100644 depends/packages/libxkbcommon.mk create mode 100644 depends/patches/libxcb/remove_pthread_stubs.patch create mode 100644 depends/patches/qt/clang_18_libpng.patch delete mode 100644 depends/patches/qt/drop_lrelease_dependency.patch create mode 100644 depends/patches/qt/duplicate_lcqpafonts.patch create mode 100644 depends/patches/qt/fast_fixed_dtoa_no_optimize.patch create mode 100644 depends/patches/qt/fix-macos-linker.patch delete mode 100644 depends/patches/qt/fix_android_qmake_conf.patch delete mode 100644 depends/patches/qt/fix_configure_mac.patch delete mode 100644 depends/patches/qt/fix_limits_header.patch delete mode 100644 depends/patches/qt/fix_mingw_cross_compile.patch delete mode 100644 depends/patches/qt/fix_no_printer.patch delete mode 100644 depends/patches/qt/fix_powerpc_libpng.patch delete mode 100644 depends/patches/qt/fix_qpainter_non_determinism.patch delete mode 100644 depends/patches/qt/fix_rcc_determinism.patch delete mode 100644 depends/patches/qt/fix_riscv64_arch.patch delete mode 100644 depends/patches/qt/freetype_back_compat.patch create mode 100644 depends/patches/qt/guix_cross_lib_path.patch create mode 100644 depends/patches/qt/memory_resource.patch create mode 100644 depends/patches/qt/qt.pro create mode 100644 depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch create mode 100644 depends/patches/qt/qttools_src.pro create mode 100644 depends/patches/qt/rcc_hardcode_timestamp.patch create mode 100644 depends/patches/qt/utc_from_string_no_optimize.patch create mode 100644 depends/patches/qt/windows_lto.patch delete mode 100644 depends/patches/qt/xkb-default.patch diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index ca7e6ba3495e..efa14ae8b0c5 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -67,10 +67,11 @@ AC_DEFUN([BITCOIN_QT_INIT],[ AS_IF([test "x$with_gui" = xqt5_debug], [AS_CASE([$host], [*darwin*], [qt_lib_suffix=_debug], - [*mingw*], [qt_lib_suffix=d], [qt_lib_suffix= ]); bitcoin_qt_want_version=qt5], [qt_lib_suffix= ]) + AS_CASE([$host], [*android*], [qt_lib_suffix=_$ANDROID_ARCH]) + AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], []) AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], []) AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], []) @@ -108,11 +109,10 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS]) dnl This is ugly and complicated. Yuck. Works as follows: - dnl For Qt5, we can check a header to find out whether Qt is build - dnl statically. When Qt is built statically, some plugins must be linked into - dnl the final binary as well. - dnl _BITCOIN_QT_CHECK_STATIC_PLUGIN does a quick link-check and appends the - dnl results to QT_LIBS. + dnl We check a header to find out whether Qt is built statically. + dnl When Qt is built statically, some plugins must be linked into + dnl the final binary as well. _BITCOIN_QT_CHECK_STATIC_PLUGIN does + dnl a quick link-check and appends the results to QT_LIBS. BITCOIN_QT_CHECK([ TEMP_CPPFLAGS=$CPPFLAGS TEMP_CXXFLAGS=$CXXFLAGS @@ -123,7 +123,12 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ _BITCOIN_QT_CHECK_STATIC_LIBS if test "x$qt_plugin_path" != x; then - QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms" + if test -d "$qt_plugin_path/platforms"; then + QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms" + fi + if test -d "$qt_plugin_path/styles"; then + QT_LIBS="$QT_LIBS -L$qt_plugin_path/styles" + fi if test -d "$qt_plugin_path/accessible"; then QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible" fi @@ -138,16 +143,25 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists]) fi if test "x$TARGET_OS" = xwindows; then + dnl Linking against wtsapi32 is required. See #17749 and + dnl https://bugreports.qt.io/browse/QTBUG-27097. + AX_CHECK_LINK_FLAG([-lwtsapi32], [QT_LIBS="$QT_LIBS -lwtsapi32"], [AC_MSG_ERROR([could not link against -lwtsapi32])]) _BITCOIN_QT_CHECK_STATIC_PLUGIN([QWindowsIntegrationPlugin], [-lqwindows]) + _BITCOIN_QT_CHECK_STATIC_PLUGIN([QWindowsVistaStylePlugin], [-lqwindowsvistastyle]) AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows]) elif test "x$TARGET_OS" = xlinux; then - _BITCOIN_QT_CHECK_STATIC_PLUGIN([QXcbIntegrationPlugin], [-lqxcb -lxcb-static]) + _BITCOIN_QT_CHECK_STATIC_PLUGIN([QXcbIntegrationPlugin], [-lqxcb]) AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb]) elif test "x$TARGET_OS" = xdarwin; then + AX_CHECK_LINK_FLAG([[-framework Carbon]],[QT_LIBS="$QT_LIBS -framework Carbon"],[AC_MSG_ERROR(could not link against Carbon framework)]) + AX_CHECK_LINK_FLAG([[-framework IOSurface]],[QT_LIBS="$QT_LIBS -framework IOSurface"],[AC_MSG_ERROR(could not link against IOSurface framework)]) + AX_CHECK_LINK_FLAG([[-framework Metal]],[QT_LIBS="$QT_LIBS -framework Metal"],[AC_MSG_ERROR(could not link against Metal framework)]) + AX_CHECK_LINK_FLAG([[-framework QuartzCore]],[QT_LIBS="$QT_LIBS -framework QuartzCore"],[AC_MSG_ERROR(could not link against QuartzCore framework)]) _BITCOIN_QT_CHECK_STATIC_PLUGIN([QCocoaIntegrationPlugin], [-lqcocoa]) + _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle]) AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa]) elif test "x$TARGET_OS" = xandroid; then - QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lqtforandroid -ljnigraphics -landroid -lqtfreetype -lQt5EglSupport $QT_LIBS" + QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid${qt_lib_suffix} -ljnigraphics -landroid -lqtfreetype${qt_lib_suffix} $QT_LIBS" AC_DEFINE(QT_QPA_PLATFORM_ANDROID, 1, [Define this symbol if the qt platform is android]) fi fi @@ -156,7 +170,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ ]) if test "x$qt_bin_path" = x; then - qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`" + qt_bin_path="`$PKG_CONFIG --variable=host_bins ${qt_lib_prefix}Core 2>/dev/null`" fi if test "x$use_hardening" != xno; then @@ -211,6 +225,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt5 rcc5 rcc], $qt_bin_path) BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt5 lrelease5 lrelease], $qt_bin_path) BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt5 lupdate5 lupdate],$qt_bin_path, yes) + BITCOIN_QT_PATH_PROGS([LCONVERT], [lconvert-qt5 lconvert5 lconvert], $qt_bin_path, yes) BITCOIN_QT_CHECK([ AC_CACHE_CHECK([whether $RCC accepts --format-version option], @@ -259,7 +274,10 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ AC_MSG_ERROR([libQtDBus not found. Install libQtDBus or remove --with-qtdbus.]) fi if test "x$LUPDATE" = x; then - AC_MSG_WARN([lupdate is required to update qt translations]) + AC_MSG_WARN([lupdate tool is required to update Qt translations.]) + fi + if test "x$LCONVERT" = x; then + AC_MSG_WARN([lconvert tool is required to update Qt translations.]) fi ],[ bitcoin_enable_qt=no @@ -275,19 +293,18 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ AC_SUBST(QT_LIBS) AC_SUBST(QT_LDFLAGS) AC_SUBST(QT_DBUS_INCLUDES) - AC_SUBST(QT_DBUS_LIBS) AC_SUBST(QT_TEST_INCLUDES) - AC_SUBST(QT_TEST_LIBS) AC_SUBST(QT_SELECT, qt5) AC_SUBST(MOC_DEFS) ]) -dnl All macros below are internal and should _not_ be used from the main -dnl configure.ac. -dnl ---- +dnl All macros below are internal and should _not_ be used from configure.ac. -dnl Internal. Check if the linked version of Qt was built as static libs. -dnl Requires: Qt5. +dnl Internal. Check if the linked version of Qt was built statically. +dnl +dnl _BITCOIN_QT_IS_STATIC +dnl --------------------- +dnl dnl Requires: INCLUDES and LIBS must be populated as necessary. dnl Output: bitcoin_cv_static_qt=yes|no AC_DEFUN([_BITCOIN_QT_IS_STATIC],[ @@ -335,46 +352,56 @@ dnl dnl _BITCOIN_QT_CHECK_STATIC_LIBS dnl ----------------------------- dnl -dnl Inputs: no inputs. dnl Outputs: QT_LIBS is prepended. AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [ - PKG_CHECK_MODULES([QTFONTDATABASE], [Qt5FontDatabaseSupport${qt_lib_suffix}], [QT_LIBS="-lQt5FontDatabaseSupport${qt_lib_suffix} $QT_LIBS"]) - PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport${qt_lib_suffix}], [QT_LIBS="-lQt5EventDispatcherSupport${qt_lib_suffix} $QT_LIBS"]) - PKG_CHECK_MODULES([QTTHEME], [Qt5ThemeSupport${qt_lib_suffix}], [QT_LIBS="-lQt5ThemeSupport${qt_lib_suffix} $QT_LIBS"]) - PKG_CHECK_MODULES([QTDEVICEDISCOVERY], [Qt5DeviceDiscoverySupport${qt_lib_suffix}], [QT_LIBS="-lQt5DeviceDiscoverySupport${qt_lib_suffix} $QT_LIBS"]) - PKG_CHECK_MODULES([QTACCESSIBILITY], [Qt5AccessibilitySupport${qt_lib_suffix}], [QT_LIBS="-lQt5AccessibilitySupport${qt_lib_suffix} $QT_LIBS"]) - PKG_CHECK_MODULES([QTFB], [Qt5FbSupport${qt_lib_suffix}], [QT_LIBS="-lQt5FbSupport${qt_lib_suffix} $QT_LIBS"]) + PKG_CHECK_MODULES([QT_ACCESSIBILITY], [${qt_lib_prefix}AccessibilitySupport${qt_lib_suffix}], [QT_LIBS="$QT_ACCESSIBILITY_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_DEVICEDISCOVERY], [${qt_lib_prefix}DeviceDiscoverySupport${qt_lib_suffix}], [QT_LIBS="$QT_DEVICEDISCOVERY_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_EDID], [${qt_lib_prefix}EdidSupport${qt_lib_suffix}], [QT_LIBS="$QT_EDID_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_EVENTDISPATCHER], [${qt_lib_prefix}EventDispatcherSupport${qt_lib_suffix}], [QT_LIBS="$QT_EVENTDISPATCHER_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_FB], [${qt_lib_prefix}FbSupport${qt_lib_suffix}], [QT_LIBS="$QT_FB_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_FONTDATABASE], [${qt_lib_prefix}FontDatabaseSupport${qt_lib_suffix}], [QT_LIBS="$QT_FONTDATABASE_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_THEME], [${qt_lib_prefix}ThemeSupport${qt_lib_suffix}], [QT_LIBS="$QT_THEME_LIBS $QT_LIBS"]) if test "x$TARGET_OS" = xlinux; then - PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_INPUT], [${qt_lib_prefix}InputSupport], [QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_XCBQPA], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_XKBCOMMON], [${qt_lib_prefix}XkbCommonSupport], [QT_LIBS="$QT_XKBCOMMON_LIBS $QT_LIBS"]) elif test "x$TARGET_OS" = xdarwin; then - PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport${qt_lib_suffix}], [QT_LIBS="-lQt5ClipboardSupport${qt_lib_suffix} $QT_LIBS"]) - PKG_CHECK_MODULES([QTGRAPHICS], [Qt5GraphicsSupport${qt_lib_suffix}], [QT_LIBS="-lQt5GraphicsSupport${qt_lib_suffix} $QT_LIBS"]) - PKG_CHECK_MODULES([QTCGL], [Qt5CglSupport${qt_lib_suffix}], [QT_LIBS="-lQt5CglSupport${qt_lib_suffix} $QT_LIBS"]) + PKG_CHECK_MODULES([QT_CLIPBOARD], [${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}], [QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_GRAPHICS], [${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}], [QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) + elif test "x$TARGET_OS" = xwindows; then + PKG_CHECK_MODULES([QT_WINDOWSUIAUTOMATION], [${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"]) + elif test "x$TARGET_OS" = xandroid; then + PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport${qt_lib_suffix}], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) fi ]) dnl Internal. Find Qt libraries using pkg-config. +dnl +dnl _BITCOIN_QT_FIND_LIBS +dnl --------------------- +dnl dnl Outputs: All necessary QT_* variables are set. dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no. AC_DEFUN([_BITCOIN_QT_FIND_LIBS],[ BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT_CORE], [${qt_lib_prefix}Core${qt_lib_suffix} $qt_version], [], + PKG_CHECK_MODULES([QT_CORE], [${qt_lib_prefix}Core${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_CORE_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_CORE_LIBS $QT_LIBS"], [BITCOIN_QT_FAIL([${qt_lib_prefix}Core${qt_lib_suffix} $qt_version not found])]) ]) BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT_GUI], [${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version], [], + PKG_CHECK_MODULES([QT_GUI], [${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_GUI_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_GUI_LIBS $QT_LIBS"], [BITCOIN_QT_FAIL([${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version not found])]) ]) BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT_WIDGETS], [${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version], [], + PKG_CHECK_MODULES([QT_WIDGETS], [${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_WIDGETS_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_WIDGETS_LIBS $QT_LIBS"], [BITCOIN_QT_FAIL([${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version not found])]) ]) BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT_NETWORK], [${qt_lib_prefix}Network${qt_lib_suffix} $qt_version], [], + PKG_CHECK_MODULES([QT_NETWORK], [${qt_lib_prefix}Network${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_NETWORK_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_NETWORK_LIBS $QT_LIBS"], [BITCOIN_QT_FAIL([${qt_lib_prefix}Network${qt_lib_suffix} $qt_version not found])]) ]) - QT_INCLUDES="$QT_CORE_CFLAGS $QT_GUI_CFLAGS $QT_WIDGETS_CFLAGS $QT_NETWORK_CFLAGS" - QT_LIBS="$QT_CORE_LIBS $QT_GUI_LIBS $QT_WIDGETS_LIBS $QT_NETWORK_LIBS" BITCOIN_QT_CHECK([ PKG_CHECK_MODULES([QT_TEST], [${qt_lib_prefix}Test${qt_lib_suffix} $qt_version], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no]) diff --git a/depends/builders/default.mk b/depends/builders/default.mk index f097db65d603..0b5e8f6acc54 100644 --- a/depends/builders/default.mk +++ b/depends/builders/default.mk @@ -6,13 +6,14 @@ default_build_STRIP = strip default_build_NM = nm default_build_OTOOL = otool default_build_INSTALL_NAME_TOOL = install_name_tool +default_build_TAR = tar define add_build_tool_func build_$(build_os)_$1 ?= $$(default_build_$1) build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1) build_$1=$$(build_$(build_arch)_$(build_os)_$1) endef -$(foreach var,CC CXX AR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL,$(eval $(call add_build_tool_func,$(var)))) +$(foreach var,CC CXX AR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL TAR INSTALL_NAME_TOOL,$(eval $(call add_build_tool_func,$(var)))) define add_build_flags_func build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1) build_$1=$$(build_$(build_arch)_$(build_os)_$1) diff --git a/depends/packages/dbus.mk b/depends/packages/dbus.mk index bbe03754099f..3cdda00fa300 100644 --- a/depends/packages/dbus.mk +++ b/depends/packages/dbus.mk @@ -1,8 +1,8 @@ package=dbus -$(package)_version=1.10.18 +$(package)_version=1.15.0 $(package)_download_path=https://dbus.freedesktop.org/releases/dbus -$(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=6049ddd5f3f3e2618f615f1faeda0a115104423a7996b7aa73e2f36e38cc514a +$(package)_file_name=$(package)-$($(package)_version).tar.xz +$(package)_sha256_hash=5073C8CB9AD20226647BB38F4965182B762A6E1F595CCDC8E59411014BFD640A $(package)_dependencies=expat define $(package)_set_vars diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk index a31c4a74811f..878b13ed2459 100644 --- a/depends/packages/libXau.mk +++ b/depends/packages/libXau.mk @@ -1,14 +1,15 @@ package=libXau -$(package)_version=1.0.8 +$(package)_version=1.0.11 $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2 +$(package)_file_name=$(package)-$($(package)_version).tar.xz +$(package)_sha256_hash=F3FA3282F5570C3F6BD620244438DBFBDD580FC80F02F549587A0F8AB329BBEB $(package)_dependencies=xproto # When updating this package, check the default value of # --disable-xthreads. It is currently enabled. define $(package)_set_vars $(package)_config_opts=--disable-shared --disable-lint-library --without-lint + $(package)_config_opts += --disable-dependency-tracking --enable-option-checking $(package)_config_opts_linux=--with-pic endef @@ -27,3 +28,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm -rf share lib/*.la +endef diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index 70ee6e065ed2..13a5c2a5614a 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -1,38 +1,31 @@ package=libxcb $(package)_version=1.17.0 $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=2c69287424c9e2128cb47ffe92171e10417041ec2963bceafb65cb3fcf8f0b85 +$(package)_file_name=$(package)-$($(package)_version).tar.xz +$(package)_sha256_hash=599EBF9996710FEA71622E6E184F3A8AD5B43D0E5FA8C4E407123C88A59A6D55 $(package)_dependencies=xcb_proto libXau +$(package)_patches = remove_pthread_stubs.patch define $(package)_set_vars -$(package)_config_opts=--disable-static --disable-build-docs --without-doxygen --without-launchd -# Because we pass -qt-xcb to Qt, it will compile in a set of xcb helper libraries and extensions, -# so we skip building all of the extensions here. -# More info is available from: https://doc.qt.io/qt-5.9/linux-requirements.html +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen --without-launchd +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +# Disable unneeded extensions. +# More info is available from: https://doc.qt.io/qt-5.15/linux-requirements.html $(package)_config_opts += --disable-composite --disable-damage --disable-dpms $(package)_config_opts += --disable-dri2 --disable-dri3 --disable-glx -$(package)_config_opts += --disable-present --disable-randr --disable-record -$(package)_config_opts += --disable-render --disable-resource --disable-screensaver -$(package)_config_opts += --disable-shape --disable-shm --disable-sync -$(package)_config_opts += --disable-xevie --disable-xfixes --disable-xfree86-dri -$(package)_config_opts += --disable-xinerama --disable-xinput --disable-xkb -$(package)_config_opts += --disable-xprint --disable-selinux --disable-xtest -$(package)_config_opts += --disable-xv --disable-xvmc +$(package)_config_opts += --disable-present --disable-record --disable-resource +$(package)_config_opts += --disable-screensaver --disable-xevie --disable-xfree86-dri +$(package)_config_opts += --disable-xinput --disable-xprint --disable-selinux +$(package)_config_opts += --disable-xtest --disable-xv --disable-xvmc endef define $(package)_preprocess_cmds - cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux &&\ - sed "s/pthread-stubs//" -i configure + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux && \ + patch -p1 -i $($(package)_patch_dir)/remove_pthread_stubs.patch endef -# Don't install xcb headers to the default path in order to work around a qt -# build issue: https://bugreports.qt.io/browse/QTBUG-34748 -# When using qt's internal libxcb, it may end up finding the real headers in -# depends staging. Use a non-default path to avoid that. - define $(package)_config_cmds - $($(package)_autoconf) --includedir=$(host_prefix)/include/xcb-shared + $($(package)_autoconf) endef define $(package)_build_cmds @@ -44,5 +37,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm -rf share/man share/doc + rm -rf share lib/*.la endef diff --git a/depends/packages/libxcb_util.mk b/depends/packages/libxcb_util.mk new file mode 100644 index 000000000000..6f1b9cd7c65e --- /dev/null +++ b/depends/packages/libxcb_util.mk @@ -0,0 +1,32 @@ +package=libxcb_util +$(package)_version=0.4.0 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-$($(package)_version).tar.bz2 +$(package)_sha256_hash=46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9 +$(package)_dependencies=libxcb + +define $(package)_set_vars +$(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +$(package)_config_opts += --with-pic +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_image.mk b/depends/packages/libxcb_util_image.mk new file mode 100644 index 000000000000..d12d67e8e888 --- /dev/null +++ b/depends/packages/libxcb_util_image.mk @@ -0,0 +1,31 @@ +package=libxcb_util_image +$(package)_version=0.4.0 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-image-$($(package)_version).tar.bz2 +$(package)_sha256_hash=2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc +$(package)_dependencies=libxcb libxcb_util + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts+= --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_keysyms.mk b/depends/packages/libxcb_util_keysyms.mk new file mode 100644 index 000000000000..d4f72dedbea7 --- /dev/null +++ b/depends/packages/libxcb_util_keysyms.mk @@ -0,0 +1,31 @@ +package=libxcb_util_keysyms +$(package)_version=0.4.0 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-keysyms-$($(package)_version).tar.bz2 +$(package)_sha256_hash=0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9 +$(package)_dependencies=libxcb xproto + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_render.mk b/depends/packages/libxcb_util_render.mk new file mode 100644 index 000000000000..28f1fb073c68 --- /dev/null +++ b/depends/packages/libxcb_util_render.mk @@ -0,0 +1,31 @@ +package=libxcb_util_render +$(package)_version=0.3.9 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-renderutil-$($(package)_version).tar.bz2 +$(package)_sha256_hash=c6e97e48fb1286d6394dddb1c1732f00227c70bd1bedb7d1acabefdd340bea5b +$(package)_dependencies=libxcb + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_wm.mk b/depends/packages/libxcb_util_wm.mk new file mode 100644 index 000000000000..3b905ba4ec55 --- /dev/null +++ b/depends/packages/libxcb_util_wm.mk @@ -0,0 +1,31 @@ +package=libxcb_util_wm +$(package)_version=0.4.1 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-wm-$($(package)_version).tar.bz2 +$(package)_sha256_hash=28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f +$(package)_dependencies=libxcb + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxkbcommon.mk b/depends/packages/libxkbcommon.mk new file mode 100644 index 000000000000..bcdcf671f71a --- /dev/null +++ b/depends/packages/libxkbcommon.mk @@ -0,0 +1,37 @@ +package=libxkbcommon +$(package)_version=0.8.4 +$(package)_download_path=https://xkbcommon.org/download/ +$(package)_file_name=$(package)-$($(package)_version).tar.xz +$(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b +$(package)_dependencies=libxcb + +# This package explicitly enables -Werror=array-bounds, which causes build failures +# with GCC 12.1+. Work around that by turning errors back into warnings. +# This workaround would be dropped if the package was updated, as that would require +# a different build system (Meson) +define $(package)_set_vars +$(package)_config_opts = --enable-option-checking --disable-dependency-tracking +$(package)_config_opts += --disable-static --disable-docs +$(package)_cflags += -Wno-error=array-bounds +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef + diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index 3e614a85f0aa..dd03119cb903 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -2,7 +2,7 @@ packages:=boost libevent gmp bls-dash backtrace cmake qt_packages = qrencode zlib -qt_linux_packages:=qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig +qt_linux_packages:=qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm qt_android_packages=qt qt_darwin_packages=qt diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 5afef0c3e201..79283f0106e9 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -1,42 +1,54 @@ -PACKAGE=qt -$(package)_version=5.9.8 -$(package)_download_path=https://download.qt.io/new_archive/qt/5.9/$($(package)_version)/submodules -$(package)_suffix=opensource-src-$($(package)_version).tar.xz +package=qt +$(package)_version=5.15.14 +$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules +$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz $(package)_file_name=qtbase-$($(package)_suffix) -$(package)_sha256_hash=9b9dec1f67df1f94bce2955c5604de992d529dde72050239154c56352da0907d -$(package)_dependencies=zlib -$(package)_linux_dependencies=freetype fontconfig libxcb +$(package)_sha256_hash=500d3b390048e9538c28b5f523dfea6936f9c2e10d24ab46580ff57d430b98be +$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm $(package)_qt_libs=corelib network widgets gui plugins testlib -$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_riscv64_arch.patch -$(package)_patches+= fix_rcc_determinism.patch xkb-default.patch no-xlib.patch -$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch -$(package)_patches+= freetype_back_compat.patch drop_lrelease_dependency.patch fix_powerpc_libpng.patch -$(package)_patches+= fix_mingw_cross_compile.patch fix_qpainter_non_determinism.patch -$(package)_patches+= fix_limits_header.patch +$(package)_linguist_tools = lrelease lupdate lconvert +$(package)_patches = qt.pro +$(package)_patches += qttools_src.pro +$(package)_patches += mac-qmake.conf +$(package)_patches += fix_qt_pkgconfig.patch +$(package)_patches += no-xlib.patch +$(package)_patches += fix_android_jni_static.patch +$(package)_patches += dont_hardcode_pwd.patch +$(package)_patches += qtbase-moc-ignore-gcc-macro.patch +$(package)_patches += rcc_hardcode_timestamp.patch +$(package)_patches += duplicate_lcqpafonts.patch +$(package)_patches += guix_cross_lib_path.patch +$(package)_patches += fast_fixed_dtoa_no_optimize.patch +$(package)_patches += fix-macos-linker.patch +$(package)_patches += memory_resource.patch +$(package)_patches += clang_18_libpng.patch +$(package)_patches += utc_from_string_no_optimize.patch +$(package)_patches += windows_lto.patch -# Update OSX_QT_TRANSLATIONS when this is updated $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) -$(package)_qttranslations_sha256_hash=fb5a47799754af73d3bf501fe513342cfe2fc37f64e80df5533f6110e804220c +$(package)_qttranslations_sha256_hash=5b94d1a11b566908622fcca2f8b799744d2f8a68da20be4caa5953ed63b10489 $(package)_qttools_file_name=qttools-$($(package)_suffix) -$(package)_qttools_sha256_hash=a97556eb7b2f30252cdd8a598c396cfce2b2f79d2bae883af6d3b26a2cdcc63c +$(package)_qttools_sha256_hash=12061a85baf5f4de8fbc795e1d3872b706f340211b9e70962caeffc6f5e89563 $(package)_extra_sources = $($(package)_qttranslations_file_name) $(package)_extra_sources += $($(package)_qttools_file_name) define $(package)_set_vars +$(package)_config_env = QT_MAC_SDK_NO_VERSION_CHECK=1 $(package)_config_opts_release = -release $(package)_config_opts_release += -silent $(package)_config_opts_debug = -debug +$(package)_config_opts_debug += -optimized-tools $(package)_config_opts += -bindir $(build_prefix)/bin -$(package)_config_opts += -c++std c++1z +$(package)_config_opts += -c++std c++17 $(package)_config_opts += -confirm-license $(package)_config_opts += -hostprefix $(build_prefix) $(package)_config_opts += -no-compile-examples $(package)_config_opts += -no-cups $(package)_config_opts += -no-egl $(package)_config_opts += -no-eglfs -$(package)_config_opts += -no-freetype +$(package)_config_opts += -no-evdev $(package)_config_opts += -no-gif $(package)_config_opts += -no-glib $(package)_config_opts += -no-icu @@ -44,12 +56,16 @@ $(package)_config_opts += -no-ico $(package)_config_opts += -no-iconv $(package)_config_opts += -no-kms $(package)_config_opts += -no-linuxfb +$(package)_config_opts += -no-libjpeg +$(package)_config_opts += -no-libproxy $(package)_config_opts += -no-libudev +$(package)_config_opts += -no-mimetype-database $(package)_config_opts += -no-mtdev $(package)_config_opts += -no-openssl $(package)_config_opts += -no-openvg $(package)_config_opts += -no-reduce-relocations -$(package)_config_opts += -no-qml-debug +$(package)_config_opts += -no-schannel +$(package)_config_opts += -no-sctp $(package)_config_opts += -no-securetransport $(package)_config_opts += -no-sql-db2 $(package)_config_opts += -no-sql-ibase @@ -60,20 +76,19 @@ $(package)_config_opts += -no-sql-odbc $(package)_config_opts += -no-sql-psql $(package)_config_opts += -no-sql-sqlite $(package)_config_opts += -no-sql-sqlite2 +$(package)_config_opts += -no-system-proxies $(package)_config_opts += -no-use-gold-linker -$(package)_config_opts += -no-xinput2 +$(package)_config_opts += -no-zstd $(package)_config_opts += -nomake examples $(package)_config_opts += -nomake tests +$(package)_config_opts += -nomake tools $(package)_config_opts += -opensource -$(package)_config_opts += -optimized-tools -$(package)_config_opts += -pch $(package)_config_opts += -pkg-config $(package)_config_opts += -prefix $(host_prefix) $(package)_config_opts += -qt-libpng -$(package)_config_opts += -qt-libjpeg $(package)_config_opts += -qt-pcre $(package)_config_opts += -qt-harfbuzz -$(package)_config_opts += -system-zlib +$(package)_config_opts += -qt-zlib $(package)_config_opts += -static $(package)_config_opts += -v $(package)_config_opts += -no-feature-bearermanagement @@ -83,22 +98,27 @@ $(package)_config_opts += -no-feature-concurrent $(package)_config_opts += -no-feature-dial $(package)_config_opts += -no-feature-fontcombobox $(package)_config_opts += -no-feature-ftp +$(package)_config_opts += -no-feature-http $(package)_config_opts += -no-feature-image_heuristic_mask $(package)_config_opts += -no-feature-keysequenceedit $(package)_config_opts += -no-feature-lcdnumber +$(package)_config_opts += -no-feature-networkdiskcache +$(package)_config_opts += -no-feature-networkproxy $(package)_config_opts += -no-feature-pdf $(package)_config_opts += -no-feature-printdialog $(package)_config_opts += -no-feature-printer $(package)_config_opts += -no-feature-printpreviewdialog $(package)_config_opts += -no-feature-printpreviewwidget $(package)_config_opts += -no-feature-sessionmanager +$(package)_config_opts += -no-feature-socks5 $(package)_config_opts += -no-feature-sql +$(package)_config_opts += -no-feature-sqlmodel $(package)_config_opts += -no-feature-statemachine $(package)_config_opts += -no-feature-syntaxhighlighter $(package)_config_opts += -no-feature-textbrowser +$(package)_config_opts += -no-feature-textmarkdownwriter $(package)_config_opts += -no-feature-textodfwriter $(package)_config_opts += -no-feature-topleveldomain -$(package)_config_opts += -no-feature-udpsocket $(package)_config_opts += -no-feature-undocommand $(package)_config_opts += -no-feature-undogroup $(package)_config_opts += -no-feature-undostack @@ -109,61 +129,75 @@ $(package)_config_opts += -no-feature-xml $(package)_config_opts_darwin = -no-dbus $(package)_config_opts_darwin += -no-opengl +$(package)_config_opts_darwin += -pch +$(package)_config_opts_darwin += -no-feature-corewlan +$(package)_config_opts_darwin += -no-freetype +$(package)_config_opts_darwin += QMAKE_MACOSX_DEPLOYMENT_TARGET=$(OSX_MIN_VERSION) ifneq ($(build_os),darwin) $(package)_config_opts_darwin += -xplatform macx-clang-linux $(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK) $(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION) $(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-" -$(package)_config_opts_darwin += -device-option MAC_MIN_VERSION=$(OSX_MIN_VERSION) $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) $(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION) endif -# for macOS on Apple Silicon (ARM) see https://bugreports.qt.io/browse/QTBUG-85279 +ifneq ($(build_arch),$(host_arch)) $(package)_config_opts_aarch64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64 +$(package)_config_opts_x86_64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64 +endif -$(package)_config_opts_linux = -qt-xkbcommon-x11 -$(package)_config_opts_linux += -qt-xcb +$(package)_config_opts_linux = -xcb $(package)_config_opts_linux += -no-xcb-xlib $(package)_config_opts_linux += -no-feature-xlib $(package)_config_opts_linux += -system-freetype $(package)_config_opts_linux += -fontconfig $(package)_config_opts_linux += -no-opengl +$(package)_config_opts_linux += -no-feature-vulkan $(package)_config_opts_linux += -dbus-runtime -$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++ -$(package)_config_opts_i686_linux = -xplatform linux-g++-32 -$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64 -$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++ -$(package)_config_opts_riscv64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++ +ifneq ($(LTO),) +$(package)_config_opts_linux += -ltcg +endif +$(package)_config_opts_linux += -platform linux-g++ -xplatform bitcoin-linux-g++ +ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx))) +$(package)_config_opts_x86_64_linux = -xplatform linux-clang-libc++ +endif $(package)_config_opts_mingw32 = -no-opengl $(package)_config_opts_mingw32 += -no-dbus +$(package)_config_opts_mingw32 += -no-freetype $(package)_config_opts_mingw32 += -xplatform win32-g++ +$(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(package)_cppflags)'" +$(package)_config_opts_mingw32 += "QMAKE_CXX = '$($(package)_cxx)'" +$(package)_config_opts_mingw32 += "QMAKE_CXXFLAGS = '$($(package)_cxxflags) $($(package)_cppflags)'" +$(package)_config_opts_mingw32 += "QMAKE_LINK = '$($(package)_cxx)'" +$(package)_config_opts_mingw32 += "QMAKE_LFLAGS = '$($(package)_ldflags)'" +$(package)_config_opts_mingw32 += "QMAKE_LIB = '$($(package)_ar) rc'" $(package)_config_opts_mingw32 += -device-option CROSS_COMPILE="$(host)-" +$(package)_config_opts_mingw32 += -pch +ifneq ($(LTO),) +$(package)_config_opts_mingw32 += -ltcg +endif $(package)_config_opts_android = -xplatform android-clang $(package)_config_opts_android += -android-sdk $(ANDROID_SDK) $(package)_config_opts_android += -android-ndk $(ANDROID_NDK) $(package)_config_opts_android += -android-ndk-platform android-$(ANDROID_API_LEVEL) -$(package)_config_opts_android += -device-option CROSS_COMPILE="$(host)-" $(package)_config_opts_android += -egl $(package)_config_opts_android += -qpa xcb -$(package)_config_opts_android += -no-eglfs $(package)_config_opts_android += -no-dbus $(package)_config_opts_android += -opengl es2 $(package)_config_opts_android += -qt-freetype $(package)_config_opts_android += -no-fontconfig $(package)_config_opts_android += -L $(host_prefix)/lib $(package)_config_opts_android += -I $(host_prefix)/include +$(package)_config_opts_android += -pch +$(package)_config_opts_android += -no-feature-vulkan $(package)_config_opts_aarch64_android += -android-arch arm64-v8a $(package)_config_opts_armv7a_android += -android-arch armeabi-v7a $(package)_config_opts_x86_64_android += -android-arch x86_64 -$(package)_config_opts_i686_android += -android-arch i686 - -$(package)_build_env = QT_RCC_TEST=1 -$(package)_build_env += QT_RCC_SOURCE_DATE_OVERRIDE=1 endef define $(package)_fetch_cmds @@ -179,100 +213,80 @@ define $(package)_extract_cmds echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ mkdir qtbase && \ - tar --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \ + $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \ mkdir qttranslations && \ - tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \ + $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \ mkdir qttools && \ - tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools + $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools endef # Preprocessing steps work as follows: # # 1. Apply our patches to the extracted source. See each patch for more info. # -# 2. Point to lrelease in qttools/bin/lrelease; otherwise Qt will look for it in -# $(host)/native/bin/lrelease and not find it. -# -# 3. Create a macOS-Clang-Linux mkspec using our mac-qmake.conf. -# -# 4. After making a copy of the mkspec for the linux-arm-gnueabi host, named -# bitcoin-linux-g++, replace instances of linux-arm-gnueabi with $(host). This -# way we can generically support hosts like riscv64-linux-gnu, which Qt doesn't -# ship a mkspec for. See it's usage in config_opts_* above. -# -# 5. Put our C, CXX and LD FLAGS into gcc-base.conf. Only used for non-host builds. +# 2. Create a macOS-Clang-Linux mkspec using our mac-qmake.conf. # -# 6. Do similar for the win32-g++ mkspec. +# 3. After making a copy of the mkspec for the linux-arm-gnueabi host, named +# bitcoin-linux-g++, replace tool names with $($($(package)_type)_TOOL). # -# 7. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466. +# 4. Put our C, CXX and LD FLAGS into gcc-base.conf. Only used for non-host builds. # -# 8. Adjust a regex in toolchain.prf, to accomodate Guix's usage of -# CROSS_LIBRARY_PATH. See #15277. +# 5. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466. define $(package)_preprocess_cmds - patch -p1 -i $($(package)_patch_dir)/freetype_back_compat.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_powerpc_libpng.patch && \ - patch -p1 -i $($(package)_patch_dir)/drop_lrelease_dependency.patch && \ + cp $($(package)_patch_dir)/qt.pro qt.pro && \ + cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \ + patch -p1 -i $($(package)_patch_dir)/fix-macos-linker.patch && \ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_configure_mac.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_rcc_determinism.patch && \ - patch -p1 -i $($(package)_patch_dir)/xkb-default.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_android_qmake_conf.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_riscv64_arch.patch && \ patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_mingw_cross_compile.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_qpainter_non_determinism.patch &&\ - patch -p1 -i $($(package)_patch_dir)/fix_limits_header.patch && \ - sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \ + patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ + patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \ + patch -p1 -i $($(package)_patch_dir)/clang_18_libpng.patch && \ + patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ + patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \ + patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \ + patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \ + patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \ + patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \ cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \ - sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-gcc|$($($(package)_type)_CC)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-g++|$($($(package)_type)_CXX)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-ar|$($($(package)_type)_AR)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-objcopy|$($($(package)_type)_OBJCOPY)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-nm|$($($(package)_type)_NM)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-strip|$($($(package)_type)_STRIP)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ - sed -i.old "s|QMAKE_CFLAGS += |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \ - sed -i.old "s|QMAKE_CXXFLAGS += |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \ - sed -i.old "0,/^QMAKE_LFLAGS_/s|^QMAKE_LFLAGS_|!host_build: QMAKE_LFLAGS = $($(package)_ldflags)\n&|" qtbase/mkspecs/win32-g++/qmake.conf && \ - sed -i.old "s|QMAKE_CC = clang|QMAKE_CC = $($(package)_cc)|" qtbase/mkspecs/common/clang.conf && \ - sed -i.old "s|QMAKE_CXX = clang++|QMAKE_CXX = $($(package)_cxx)|" qtbase/mkspecs/common/clang.conf && \ - sed -i.old "s/error(\"failed to parse default search paths from compiler output\")/\!darwin: error(\"failed to parse default search paths from compiler output\")/g" qtbase/mkspecs/features/toolchain.prf + sed -i.old "s|QMAKE_CC = \$$$$\$$$${CROSS_COMPILE}clang|QMAKE_CC = $($(package)_cc)|" qtbase/mkspecs/common/clang.conf && \ + sed -i.old "s|QMAKE_CXX = \$$$$\$$$${CROSS_COMPILE}clang++|QMAKE_CXX = $($(package)_cxx)|" qtbase/mkspecs/common/clang.conf endef define $(package)_config_cmds export PKG_CONFIG_SYSROOT_DIR=/ && \ export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \ - export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \ + export QT_MAC_SDK_NO_VERSION_CHECK=1 && \ cd qtbase && \ - ./configure $($(package)_config_opts) && \ - echo "host_build: QT_CONFIG ~= s/system-zlib/zlib" >> mkspecs/qconfig.pri && \ + ./configure -top-level $($(package)_config_opts) && \ echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \ - cd .. && \ - $(MAKE) -C qtbase sub-src-clean && \ - qtbase/bin/qmake -o qttranslations/Makefile qttranslations/qttranslations.pro && \ - qtbase/bin/qmake -o qttranslations/translations/Makefile qttranslations/translations/translations.pro && \ - qtbase/bin/qmake -o qttools/src/linguist/lrelease/Makefile qttools/src/linguist/lrelease/lrelease.pro && \ - qtbase/bin/qmake -o qttools/src/linguist/lupdate/Makefile qttools/src/linguist/lupdate/lupdate.pro + cd .. endef define $(package)_build_cmds - $(MAKE) -C qtbase/src $(addprefix sub-,$($(package)_qt_libs)) && \ - $(MAKE) -C qttools/src/linguist/lrelease && \ - $(MAKE) -C qttools/src/linguist/lupdate && \ - $(MAKE) -C qttranslations + $(MAKE) endef define $(package)_stage_cmds $(MAKE) -C qtbase/src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && \ - $(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \ - $(MAKE) -C qttools/src/linguist/lupdate INSTALL_ROOT=$($(package)_staging_dir) install_target && \ + $(MAKE) -C qttools/src/linguist INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_linguist_tools))) && \ $(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets endef define $(package)_postprocess_cmds rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \ - rm -f lib/lib*.la lib/*.prl plugins/*/*.prl + rm -f lib/lib*.la endef diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk index 5af7731a5cca..c73fc28b6010 100644 --- a/depends/packages/xcb_proto.mk +++ b/depends/packages/xcb_proto.mk @@ -4,10 +4,10 @@ $(package)_download_path=https://xcb.freedesktop.org/dist $(package)_file_name=xcb-proto-$($(package)_version).tar.gz $(package)_sha256_hash=392d3c9690f8c8202a68fdb89c16fd55159ab8d65000a6da213f4a1576e97a16 -define $(package)_set_vars - $(package)_config_opts=--disable-shared - $(package)_config_opts_linux=--with-pic -endef +#define $(package)_set_vars +# $(package)_config_opts=--disable-shared +# $(package)_config_opts_linux=--with-pic +#endef define $(package)_config_cmds $($(package)_autoconf) @@ -21,7 +21,8 @@ define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef +# find -name "*.pyc" -delete && \ +# find -name "*.pyo" -delete define $(package)_postprocess_cmds - find -name "*.pyc" -delete && \ - find -name "*.pyo" -delete + rm -rf lib/python*/site-packages/xcbgen/__pycache__ endef diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk index 2462f3c647b4..7a43c52faf43 100644 --- a/depends/packages/xproto.mk +++ b/depends/packages/xproto.mk @@ -1,11 +1,12 @@ package=xproto -$(package)_version=7.0.26 +$(package)_version=7.0.31 $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto $(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f +$(package)_sha256_hash=c6f9747da0bd3a95f86b17fb8dd5e717c8f3ab7f0ece3ba1b247899ec1ef7747 define $(package)_set_vars $(package)_config_opts=--without-fop --without-xmlto --without-xsltproc --disable-specs +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking endef define $(package)_preprocess_cmds diff --git a/depends/patches/libxcb/remove_pthread_stubs.patch b/depends/patches/libxcb/remove_pthread_stubs.patch new file mode 100644 index 000000000000..b18941b3e254 --- /dev/null +++ b/depends/patches/libxcb/remove_pthread_stubs.patch @@ -0,0 +1,12 @@ +Remove uneeded pthread-stubs dependency +--- a/configure ++++ b/configure +@@ -19695,7 +19695,7 @@ fi + NEEDED="xau >= 0.99.2" + case $host_os in + linux*|darwin*|solaris*|dragonfly*|freebsd*|netbsd*) ;; +- *) NEEDED="$NEEDED pthread-stubs" ;; ++ *) NEEDED="$NEEDED" ;; + esac + + pkg_failed=no diff --git a/depends/patches/qt/clang_18_libpng.patch b/depends/patches/qt/clang_18_libpng.patch new file mode 100644 index 000000000000..e807905b321a --- /dev/null +++ b/depends/patches/qt/clang_18_libpng.patch @@ -0,0 +1,40 @@ +fix Qt macOS build with Clang 18 + + See: + https://github.com/pnggroup/libpng/commit/893b8113f04d408cc6177c6de19c9889a48faa24. + + In a similar manner as zlib (madler/zlib#895), + libpng contains a header configuration that's no longer valid and + hasn't been exercised for the macOS target. + + - The target OS conditional macros are misused. Specifically + `TARGET_OS_MAC` covers all Apple targets, including iOS, and it + should not be checked with `#if defined` as they would always be + defined (to either 1 or 0) on Apple platforms. + - `#include ` no longer works for the macOS target and results + in a compilation failure. macOS ships all required functions in + `math.h`, and clients should use `math.h` instead. + +--- a/qtbase/src/3rdparty/libpng/pngpriv.h ++++ b/qtbase/src/3rdparty/libpng/pngpriv.h +@@ -514,18 +514,8 @@ + */ + # include + +-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ +- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) +- /* We need to check that hasn't already been included earlier +- * as it seems it doesn't agree with , yet we should really use +- * if possible. +- */ +-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) +-# include +-# endif +-# else +-# include +-# endif ++# include ++ + # if defined(_AMIGA) && defined(__SASC) && defined(_M68881) + /* Amiga SAS/C: We must include builtin FPU functions when compiling using + * MATH=68881 diff --git a/depends/patches/qt/dont_hardcode_pwd.patch b/depends/patches/qt/dont_hardcode_pwd.patch index a74e9cb09872..f6955b2f20ce 100644 --- a/depends/patches/qt/dont_hardcode_pwd.patch +++ b/depends/patches/qt/dont_hardcode_pwd.patch @@ -1,13 +1,13 @@ -commit 0e953866fc4672486e29e1ba6d83b4207e7b2f0b -Author: fanquake -Date: Tue Aug 18 15:09:06 2020 +0800 +Do not assume FHS in scripts - Don't hardcode pwd path +On systems that do not follow the Filesystem Hierarchy Standard, such as +guix, the hardcoded `/bin/pwd` will fail to be found so that the script +will fail. - Let a man use his builtins if he wants to! Also, removes the unnecessary - assumption that pwd lives under /bin/pwd. +Use `pwd`, instead, so that the command can be found through the normal +path search mechanism. - See #15581. +See https://github.com/qt/qtbase/commit/3388de698bfb9bbc456c08f03e83bf3e749df35c. diff --git a/qtbase/configure b/qtbase/configure index 08b49a8d..faea5b55 100755 diff --git a/depends/patches/qt/drop_lrelease_dependency.patch b/depends/patches/qt/drop_lrelease_dependency.patch deleted file mode 100644 index f6b2c9fc8015..000000000000 --- a/depends/patches/qt/drop_lrelease_dependency.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit 67b3ed7406e1d0762188dbad2c44a06824ba0778 -Author: fanquake -Date: Tue Aug 18 15:24:01 2020 +0800 - - Drop dependency on lrelease - - Qts buildsystem insists on using the installed lrelease, but gets - confused about how to find it. Since we manually control the build - order, just drop the dependency. - - See #9469 - -diff --git a/qttranslations/translations/translations.pro b/qttranslations/translations/translations.pro -index 694544c..eff339d 100644 ---- a/qttranslations/translations/translations.pro -+++ b/qttranslations/translations/translations.pro -@@ -109,3 +109,2 @@ updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} - silent:updateqm.commands = @echo lrelease ${QMAKE_FILE_IN} && $$updateqm.commands --updateqm.depends = $$LRELEASE_EXE - updateqm.name = LRELEASE ${QMAKE_FILE_IN} diff --git a/depends/patches/qt/duplicate_lcqpafonts.patch b/depends/patches/qt/duplicate_lcqpafonts.patch new file mode 100644 index 000000000000..c460b51dcff6 --- /dev/null +++ b/depends/patches/qt/duplicate_lcqpafonts.patch @@ -0,0 +1,104 @@ +QtGui: Fix duplication of logging category lcQpaFonts + +Move it to qplatformfontdatabase.h. + +Upstream commit: + - Qt 6.0: ab01885e48873fb2ad71841a3f1627fe4d9cd835 + +--- a/qtbase/src/gui/text/qplatformfontdatabase.cpp ++++ b/qtbase/src/gui/text/qplatformfontdatabase.cpp +@@ -52,6 +52,8 @@ + + QT_BEGIN_NAMESPACE + ++Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") ++ + void qt_registerFont(const QString &familyname, const QString &stylename, + const QString &foundryname, int weight, + QFont::Style style, int stretch, bool antialiased, + +--- a/qtbase/src/gui/text/qplatformfontdatabase.h ++++ b/qtbase/src/gui/text/qplatformfontdatabase.h +@@ -50,6 +50,7 @@ + // + + #include ++#include + #include + #include + #include +@@ -62,6 +63,7 @@ + + QT_BEGIN_NAMESPACE + ++Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) + + class QWritingSystemsPrivate; + + +--- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm ++++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +@@ -86,8 +86,6 @@ + + QT_BEGIN_NAMESPACE + +-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") +- + static float SYNTHETIC_ITALIC_SKEW = std::tan(14.f * std::acos(0.f) / 90.f); + + bool QCoreTextFontEngine::ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length) + +--- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h ++++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +@@ -64,8 +64,6 @@ + + QT_BEGIN_NAMESPACE + +-Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) +- + class QCoreTextFontEngine : public QFontEngine + { + Q_GADGET + +--- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp ++++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp +@@ -68,8 +68,6 @@ + + QT_BEGIN_NAMESPACE + +-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") +- + #ifndef QT_NO_DIRECTWRITE + // ### fixme: Consider direct linking of dwrite.dll once Windows Vista pre SP2 is dropped (QTBUG-49711) + + +--- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h ++++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h +@@ -63,8 +63,6 @@ + + QT_BEGIN_NAMESPACE + +-Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) +- + class QWindowsFontEngineData + { + Q_DISABLE_COPY_MOVE(QWindowsFontEngineData) + +--- a/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp ++++ b/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +@@ -40,6 +40,7 @@ + #include "qgenericunixthemes_p.h" + + #include "qpa/qplatformtheme_p.h" ++#include "qpa/qplatformfontdatabase.h" + + #include + #include +@@ -76,7 +77,6 @@ + QT_BEGIN_NAMESPACE + + Q_DECLARE_LOGGING_CATEGORY(qLcTray) +-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") + + ResourceHelper::ResourceHelper() + { diff --git a/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch b/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch new file mode 100644 index 000000000000..d4d6539f56dc --- /dev/null +++ b/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch @@ -0,0 +1,20 @@ +Modify the optimisation flags for FastFixedDtoa. +This fixes a non-determinism issue in the asm produced for +this function when cross-compiling on x86_64 and aarch64 for +the arm-linux-gnueabihf HOST. + +--- a/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h ++++ b/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h +@@ -48,9 +48,12 @@ namespace double_conversion { + // + // This method only works for some parameters. If it can't handle the input it + // returns false. The output is null-terminated when the function succeeds. ++#pragma GCC push_options ++#pragma GCC optimize ("-O1") + bool FastFixedDtoa(double v, int fractional_count, + Vector buffer, int* length, int* decimal_point); + ++#pragma GCC pop_options + } // namespace double_conversion + + #endif // DOUBLE_CONVERSION_FIXED_DTOA_H_ diff --git a/depends/patches/qt/fix-macos-linker.patch b/depends/patches/qt/fix-macos-linker.patch new file mode 100644 index 000000000000..e43968565655 --- /dev/null +++ b/depends/patches/qt/fix-macos-linker.patch @@ -0,0 +1,55 @@ +qmake: Don't error out if QMAKE_DEFAULT_LIBDIRS is empty on macOS + +The new linker in Xcode 15 doesn't provide any default linker or +framework paths when requested via -v, but still seems to use the +default paths documented in the ld man page. + +We trust that linker will do the right thing, even if we don't +know of its default linker paths. + +We also need to opt out of the default fallback logic to +set the libdirs to /lib and /usr/lib. + +This may result in UnixMakefileGenerator::findLibraries finding +different libraries than expected, if additional paths are +passed with -L, which will then take precedence for qmake, +even if the linker itself will use the library from the +SDK's default paths. This should hopefully not be an issue +in practice, as we don't turn -lFoo into absolute paths in +qmake, so the only risk is that we're picking up the wrong +prl files and adding additional dependencies that the lib +in the SDK doesn't have. + +Upstream commits: + - Qt 5.15.16: Not yet publicly available. + - Qt dev: cdf64b0e47115cc473e1afd1472b4b09e130b2a5 + +For other Qt branches see +https://codereview.qt-project.org/q/I2347b26e2df0828471373b0e15b8c9089274c65d + +--- old/qtbase/mkspecs/features/toolchain.prf ++++ new/qtbase/mkspecs/features/toolchain.prf +@@ -288,9 +288,12 @@ isEmpty($${target_prefix}.INCDIRS) { + } + } + } +- isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \ ++ isEmpty(QMAKE_DEFAULT_INCDIRS): \ + !integrity: \ +- error("failed to parse default search paths from compiler output") ++ error("failed to parse default include paths from compiler output") ++ isEmpty(QMAKE_DEFAULT_LIBDIRS): \ ++ !integrity:!darwin: \ ++ error("failed to parse default library paths from compiler output") + QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS) + } else: ghs { + cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp +@@ -412,7 +415,7 @@ isEmpty($${target_prefix}.INCDIRS) { + QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP) + } + +- unix:if(!cross_compile|host_build) { ++ unix:!darwin:if(!cross_compile|host_build) { + isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include + isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib + } diff --git a/depends/patches/qt/fix_android_jni_static.patch b/depends/patches/qt/fix_android_jni_static.patch index 2f6ff00f40c2..79824f244aa5 100644 --- a/depends/patches/qt/fix_android_jni_static.patch +++ b/depends/patches/qt/fix_android_jni_static.patch @@ -1,6 +1,6 @@ --- old/qtbase/src/plugins/platforms/android/androidjnimain.cpp +++ new/qtbase/src/plugins/platforms/android/androidjnimain.cpp -@@ -890,6 +890,14 @@ +@@ -979,6 +979,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/) __android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed"); return -1; } @@ -15,4 +15,3 @@ QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false); m_javaVM = vm; - diff --git a/depends/patches/qt/fix_android_qmake_conf.patch b/depends/patches/qt/fix_android_qmake_conf.patch deleted file mode 100644 index 13bfff977647..000000000000 --- a/depends/patches/qt/fix_android_qmake_conf.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- old/qtbase/mkspecs/android-clang/qmake.conf -+++ new/qtbase/mkspecs/android-clang/qmake.conf -@@ -30,7 +30,7 @@ - QMAKE_CFLAGS += -target mips64el-none-linux-android - - QMAKE_CFLAGS += -gcc-toolchain $$NDK_TOOLCHAIN_PATH --QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -+QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -nostdlib++ - QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$NDK_ROOT/sysroot \ - -isystem $$NDK_ROOT/sysroot/usr/include/$$NDK_TOOLS_PREFIX \ - -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++/include \ -@@ -40,7 +40,7 @@ - ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$ANDROID_TARGET_ARCH - - ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++_shared.so --ANDROID_CXX_STL_LIBS = -lc++ -+ANDROID_CXX_STL_LIBS = -lc++_shared - - QMAKE_ARM_CFLAGS_RELEASE = -Oz - QMAKE_ARM_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -Oz diff --git a/depends/patches/qt/fix_configure_mac.patch b/depends/patches/qt/fix_configure_mac.patch deleted file mode 100644 index 0d7dd647debc..000000000000 --- a/depends/patches/qt/fix_configure_mac.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- old/qtbase/mkspecs/features/mac/sdk.prf 2018-02-08 10:24:48.000000000 -0800 -+++ new/qtbase/mkspecs/features/mac/sdk.prf 2018-03-23 10:38:56.000000000 -0700 -@@ -8,21 +8,21 @@ - defineReplace(xcodeSDKInfo) { - info = $$1 - equals(info, "Path"): \ -- info = --show-sdk-path -+ infoarg = --show-sdk-path - equals(info, "PlatformPath"): \ -- info = --show-sdk-platform-path -+ infoarg = --show-sdk-platform-path - equals(info, "SDKVersion"): \ -- info = --show-sdk-version -+ infoarg = --show-sdk-version - sdk = $$2 - isEmpty(sdk): \ - sdk = $$QMAKE_MAC_SDK - - isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) { -- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$info 2>/dev/null") -+ QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null") - # --show-sdk-platform-path won't work for Command Line Tools; this is fine - # only used by the XCTest backend to testlib -- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(info, "--show-sdk-platform-path")): \ -- error("Could not resolve SDK $$info for \'$$sdk\'") -+ isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \ -+ error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg") - cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info}) - } - ---- old/qtbase/configure 2018-02-08 10:24:48.000000000 -0800 -+++ new/qtbase/configure 2018-03-23 05:42:29.000000000 -0700 -@@ -232,8 +232,13 @@ - - sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1") - if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi -- sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null) -- if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi -+ sysroot=$(getSingleQMakeVariable "QMAKE_MAC_SDK_PATH" "$1") -+ -+ echo "sysroot pre-configured as $sysroot"; -+ if [ -z "$sysroot" ]; then -+ sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null) -+ if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi -+ fi - - case "$sdk" in - macosx*) - - diff --git a/depends/patches/qt/fix_limits_header.patch b/depends/patches/qt/fix_limits_header.patch deleted file mode 100644 index d1acfa15d94d..000000000000 --- a/depends/patches/qt/fix_limits_header.patch +++ /dev/null @@ -1,30 +0,0 @@ -Fix compiling with GCC 11 - -See: https://bugreports.qt.io/browse/QTBUG-90395. - -Upstream commits: - - Qt 5.15 -- unavailable as open source - - Qt 6.0: b2af6332ea37e45ab230a7a5d2d278f86d961b83 - - Qt 6.1: 9c56d4da2ff631a8c1c30475bd792f6c86bda53c - ---- old/qtbase/src/corelib/global/qendian.h -+++ new/qtbase/src/corelib/global/qendian.h -@@ -44,6 +44,8 @@ - #include - #include - -+#include -+ - // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems - #include - #include - ---- old/qtbase/src/corelib/tools/qbytearraymatcher.h -+++ new/qtbase/src/corelib/tools/qbytearraymatcher.h -@@ -42,6 +42,8 @@ - - #include - -+#include -+ - QT_BEGIN_NAMESPACE diff --git a/depends/patches/qt/fix_mingw_cross_compile.patch b/depends/patches/qt/fix_mingw_cross_compile.patch deleted file mode 100644 index 67f76f1d856e..000000000000 --- a/depends/patches/qt/fix_mingw_cross_compile.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit 5a992a549adfe5a587bbcd6cd2b2cee47d236e27 -Author: fanquake -Date: Fri Sep 4 08:13:44 2020 +0800 - - Work around broken mingw cross-compilation - - See upstream issues: - https://bugreports.qt.io/browse/QTBUG-63637 - https://bugreports.qt.io/browse/QTBUG-63659 - https://codereview.qt-project.org/q/8bebded9 - - We should be able to drop this once we are building qt 5.10.1 or later. - - Added in #12971. - -diff --git a/qtbase/mkspecs/win32-g++/qmake.conf b/qtbase/mkspecs/win32-g++/qmake.conf -index e071a0d1..ad229b10 100644 ---- a/qtbase/mkspecs/win32-g++/qmake.conf -+++ b/qtbase/mkspecs/win32-g++/qmake.conf -@@ -87,3 +87,5 @@ QMAKE_NM = $${CROSS_COMPILE}nm -P - include(../common/angle.conf) - - load(qt_config) -+QMAKE_LINK_OBJECT_MAX = 10 -+QMAKE_LINK_OBJECT_SCRIPT = object_script diff --git a/depends/patches/qt/fix_no_printer.patch b/depends/patches/qt/fix_no_printer.patch deleted file mode 100644 index f868ca257755..000000000000 --- a/depends/patches/qt/fix_no_printer.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- x/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h -+++ y/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h -@@ -52,6 +52,7 @@ - // - - #include -+#include - - #ifndef QT_NO_PRINTER - ---- x/qtbase/src/plugins/plugins.pro -+++ y/qtbase/src/plugins/plugins.pro -@@ -8,6 +8,3 @@ qtHaveModule(gui) { - qtConfig(imageformatplugin): SUBDIRS *= imageformats - !android:qtConfig(library): SUBDIRS *= generic - } -- --!winrt:qtHaveModule(printsupport): \ -- SUBDIRS += printsupport diff --git a/depends/patches/qt/fix_powerpc_libpng.patch b/depends/patches/qt/fix_powerpc_libpng.patch deleted file mode 100644 index d37b6c777646..000000000000 --- a/depends/patches/qt/fix_powerpc_libpng.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit 6f9feb773a43c5abfa3455da2e324180e789285b -Author: fanquake -Date: Tue Sep 15 21:44:31 2020 +0800 - - Fix PowerPC build of libpng - - See https://bugreports.qt.io/browse/QTBUG-66388. - - Can be dropped when we are building qt 5.12.0 or later. - -diff --git a/qtbase/src/3rdparty/libpng/libpng.pro b/qtbase/src/3rdparty/libpng/libpng.pro -index 577b61d8..a2f56669 100644 ---- a/qtbase/src/3rdparty/libpng/libpng.pro -+++ b/qtbase/src/3rdparty/libpng/libpng.pro -@@ -10,7 +10,7 @@ MODULE_INCLUDEPATH = $$PWD - - load(qt_helper_lib) - --DEFINES += PNG_ARM_NEON_OPT=0 -+DEFINES += PNG_ARM_NEON_OPT=0 PNG_POWERPC_VSX_OPT=0 - SOURCES += \ - png.c \ - pngerror.c \ diff --git a/depends/patches/qt/fix_qpainter_non_determinism.patch b/depends/patches/qt/fix_qpainter_non_determinism.patch deleted file mode 100644 index 3cfcc22f03a0..000000000000 --- a/depends/patches/qt/fix_qpainter_non_determinism.patch +++ /dev/null @@ -1,63 +0,0 @@ -commit 2a8f7dc6ddfc414a66491522501c1574a1343ee1 -Author: Andrew Chow -Date: Sat Nov 21 01:11:04 2020 -0500 - - build: Fix determinism issue when building with Clang 8 - - When building Qt with LLVM/Clang 8 under -O3 (the default), we run into - a determinism issue in `qt_interset_spans`. The issue has been fixed for - LLVM/Clang 9, see - https://github.com/llvm/llvm-project/commit/db101864bdc938deb1d63fe4f7da761bd38e5cae - and https://reviews.llvm.org/D64601, however this fix was not backported - to 8.x. Once LLVM/Clang 9 is used, this patch can be dropped. - - The particular issue appears to be an optimization done by -O3 which - adds a temporary variable for `spans->y` in `qt_intersect_spans`. When - it does this, sometimes it chooses to use a 32-bit movs instruction - (movswl), and other times it chooses a 64-bit movs instruction (movswq). - By patching `qt_intersect_spans` to always make a temporary variable for - `spans->y`, we are able to sidestep this problem. - -diff --git a/qtbase/src/gui/painting/qpaintengine_raster.cpp b/qtbase/src/gui/painting/qpaintengine_raster.cpp -index 92ab6e8375..f018009e0b 100644 ---- a/qtbase/src/gui/painting/qpaintengine_raster.cpp -+++ b/qtbase/src/gui/painting/qpaintengine_raster.cpp -@@ -3971,22 +3971,23 @@ static const QSpan *qt_intersect_spans(const QClipData *clip, int *currentClip, - const QSpan *clipEnd = clip->m_spans + clip->count; - - while (available && spans < end ) { -+ const short spans_y = spans->y; - if (clipSpans >= clipEnd) { - spans = end; - break; - } -- if (clipSpans->y > spans->y) { -+ if (clipSpans->y > spans_y) { - ++spans; - continue; - } -- if (spans->y != clipSpans->y) { -- if (spans->y < clip->count && clip->m_clipLines[spans->y].spans) -- clipSpans = clip->m_clipLines[spans->y].spans; -+ if (spans_y != clipSpans->y) { -+ if (spans_y < clip->count && clip->m_clipLines[spans_y].spans) -+ clipSpans = clip->m_clipLines[spans_y].spans; - else - ++clipSpans; - continue; - } -- Q_ASSERT(spans->y == clipSpans->y); -+ Q_ASSERT(spans_y == clipSpans->y); - - int sx1 = spans->x; - int sx2 = sx1 + spans->len; -@@ -4005,7 +4006,7 @@ static const QSpan *qt_intersect_spans(const QClipData *clip, int *currentClip, - if (len) { - out->x = qMax(sx1, cx1); - out->len = qMin(sx2, cx2) - out->x; -- out->y = spans->y; -+ out->y = spans_y; - out->coverage = qt_div_255(spans->coverage * clipSpans->coverage); - ++out; - --available; - diff --git a/depends/patches/qt/fix_qt_pkgconfig.patch b/depends/patches/qt/fix_qt_pkgconfig.patch index 8c722ffb46cb..73f4d89f7354 100644 --- a/depends/patches/qt/fix_qt_pkgconfig.patch +++ b/depends/patches/qt/fix_qt_pkgconfig.patch @@ -1,23 +1,11 @@ --- old/qtbase/mkspecs/features/qt_module.prf +++ new/qtbase/mkspecs/features/qt_module.prf -@@ -264,7 +264,7 @@ +@@ -269,7 +269,7 @@ load(qt_installs) load(qt_targets) # this builds on top of qt_common --!internal_module:!lib_bundle:if(unix|mingw) { +-!internal_module:if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { +if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { CONFIG += create_pc QMAKE_PKGCONFIG_DESTDIR = pkgconfig host_build: \ -@@ -274,9 +274,9 @@ - QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw] - QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME - QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ") -- QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION) -+ QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)$$qtPlatformTargetSuffix() - for(i, MODULE_DEPENDS): \ -- QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0)) -+ QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix() - isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ - QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module - pclib_replace.match = $$lib_replace.match diff --git a/depends/patches/qt/fix_rcc_determinism.patch b/depends/patches/qt/fix_rcc_determinism.patch deleted file mode 100644 index c1b07fe23afd..000000000000 --- a/depends/patches/qt/fix_rcc_determinism.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- old/qtbase/src/tools/rcc/rcc.cpp -+++ new/qtbase/src/tools/rcc/rcc.cpp -@@ -207,7 +207,11 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib) - if (lib.formatVersion() >= 2) { - // last modified time stamp - const QDateTime lastModified = m_fileInfo.lastModified(); -- lib.writeNumber8(quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0)); -+ quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0); -+ static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(); -+ if (sourceDate != 0) -+ lastmod = sourceDate; -+ lib.writeNumber8(lastmod); - if (text || pass1) - lib.writeChar('\n'); - } diff --git a/depends/patches/qt/fix_riscv64_arch.patch b/depends/patches/qt/fix_riscv64_arch.patch deleted file mode 100644 index e7f29f01f9cd..000000000000 --- a/depends/patches/qt/fix_riscv64_arch.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h b/qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h -index 20bfd36..93729fa 100644 ---- a/qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h -+++ b/qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h -@@ -65,7 +65,8 @@ - defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ - defined(__SH4__) || defined(__alpha__) || \ - defined(_MIPS_ARCH_MIPS32R2) || \ -- defined(__AARCH64EL__) -+ defined(__AARCH64EL__) || defined(__aarch64__) || \ -+ defined(__riscv) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) - #if defined(_WIN32) diff --git a/depends/patches/qt/freetype_back_compat.patch b/depends/patches/qt/freetype_back_compat.patch deleted file mode 100644 index b0f1c98aa60c..000000000000 --- a/depends/patches/qt/freetype_back_compat.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 14bc77db61bf9d56f9b6c8b84aa02573605c19c6 -Author: fanquake -Date: Tue Aug 18 15:15:08 2020 +0800 - - Fix backwards compatibility with older Freetype versions at runtime - - A few years ago, libfreetype introduced FT_Get_Font_Format() as an alias - for FT_Get_X11_Font_Format(), but FT_Get_X11_Font_Format() was kept for abi - backwards-compatibility. - - Qt 5.9 introduced a call to FT_Get_Font_Format(). Replace it with FT_Get_X11_Font_Format() - in order to remain compatibile with older freetype, which is still used by e.g. Ubuntu Trusty. - - See #14348. - -diff --git a/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp b/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp -index 3f543755..8ecc1c8c 100644 ---- a/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp -+++ b/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp -@@ -898,7 +898,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format, - } - } - #if defined(FT_FONT_FORMATS_H) -- const char *fmt = FT_Get_Font_Format(face); -+ const char *fmt = FT_Get_X11_Font_Format(face); - if (fmt && qstrncmp(fmt, "CFF", 4) == 0) { - FT_Bool no_stem_darkening = true; - FT_Error err = FT_Property_Get(qt_getFreetype(), "cff", "no-stem-darkening", &no_stem_darkening); diff --git a/depends/patches/qt/guix_cross_lib_path.patch b/depends/patches/qt/guix_cross_lib_path.patch new file mode 100644 index 000000000000..7911dc21d7db --- /dev/null +++ b/depends/patches/qt/guix_cross_lib_path.patch @@ -0,0 +1,17 @@ +Facilitate guix building with CROSS_LIBRARY_PATH + +See discussion in https://github.com/bitcoin/bitcoin/pull/15277. + +--- a/qtbase/mkspecs/features/toolchain.prf ++++ b/qtbase/mkspecs/features/toolchain.prf +@@ -236,8 +236,8 @@ isEmpty($${target_prefix}.INCDIRS) { + add_libraries = false + for (line, output) { + line ~= s/^[ \\t]*// # remove leading spaces +- contains(line, "LIBRARY_PATH=.*") { +- line ~= s/^LIBRARY_PATH=// # remove leading LIBRARY_PATH= ++ contains(line, "(CROSS_)?LIBRARY_PATH=.*") { ++ line ~= s/^(CROSS_)?LIBRARY_PATH=// # remove leading (CROSS_)?LIBRARY_PATH= + equals(QMAKE_HOST.os, Windows): \ + paths = $$split(line, ;) + else: \ diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf index 01426675476b..cb94bf07b42d 100644 --- a/depends/patches/qt/mac-qmake.conf +++ b/depends/patches/qt/mac-qmake.conf @@ -8,19 +8,15 @@ include(../common/clang-mac.conf) QMAKE_MAC_SDK_PATH=$${MAC_SDK_PATH} QMAKE_XCODE_VERSION = $${XCODE_VERSION} QMAKE_XCODE_DEVELOPER_PATH=/Developer -QMAKE_MACOSX_DEPLOYMENT_TARGET = $${MAC_MIN_VERSION} QMAKE_MAC_SDK=macosx QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH} QMAKE_MAC_SDK.macosx.platform_name = macosx QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION} QMAKE_MAC_SDK.macosx.PlatformPath = /phony -QMAKE_APPLE_DEVICE_ARCHS=x86_64 !host_build: QMAKE_CFLAGS += -target $${MAC_TARGET} !host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS -!host_build: QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +!host_build: QMAKE_CXXFLAGS += -target $${MAC_TARGET} !host_build: QMAKE_LFLAGS += -target $${MAC_TARGET} QMAKE_AR = $${CROSS_COMPILE}ar cq QMAKE_RANLIB=$${CROSS_COMPILE}ranlib -QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool -QMAKE_INSTALL_NAME_TOOL=$${CROSS_COMPILE}install_name_tool load(qt_config) diff --git a/depends/patches/qt/memory_resource.patch b/depends/patches/qt/memory_resource.patch new file mode 100644 index 000000000000..312f0669f631 --- /dev/null +++ b/depends/patches/qt/memory_resource.patch @@ -0,0 +1,49 @@ +Fix unusable memory_resource on macos + +See https://bugreports.qt.io/browse/QTBUG-117484 +and https://bugreports.qt.io/browse/QTBUG-114316 + +--- a/qtbase/src/corelib/tools/qduplicatetracker_p.h ++++ b/qtbase/src/corelib/tools/qduplicatetracker_p.h +@@ -52,7 +52,7 @@ + + #include + +-#if QT_HAS_INCLUDE() && __cplusplus > 201402L ++#ifdef __cpp_lib_memory_resource + # include + # include + #else + +--- a/qtbase/src/corelib/global/qcompilerdetection.h ++++ b/qtbase/src/corelib/global/qcompilerdetection.h +@@ -1055,16 +1055,22 @@ + # endif // !_HAS_CONSTEXPR + # endif // !__GLIBCXX__ && !_LIBCPP_VERSION + # endif // Q_OS_QNX +-# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \ +- && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) ++# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) ++# if defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) + // Apple has not updated libstdc++ since 2007, which means it does not have + // or std::move. Let's disable these features +-# undef Q_COMPILER_INITIALIZER_LISTS +-# undef Q_COMPILER_RVALUE_REFS +-# undef Q_COMPILER_REF_QUALIFIERS ++# undef Q_COMPILER_INITIALIZER_LISTS ++# undef Q_COMPILER_RVALUE_REFS ++# undef Q_COMPILER_REF_QUALIFIERS + // Also disable , since it's clearly not there +-# undef Q_COMPILER_ATOMICS +-# endif ++# undef Q_COMPILER_ATOMICS ++# endif ++# if defined(__cpp_lib_memory_resource) \ ++ && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000) \ ++ || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 170000)) ++# undef __cpp_lib_memory_resource // Only supported on macOS 14 and iOS 17 ++# endif ++# endif // (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) + # if defined(Q_CC_CLANG) && defined(Q_CC_INTEL) && Q_CC_INTEL >= 1500 + // ICC 15.x and 16.0 have their own implementation of std::atomic, which is activated when in Clang mode + // (probably because libc++'s on OS X failed to compile), but they're missing some diff --git a/depends/patches/qt/no-xlib.patch b/depends/patches/qt/no-xlib.patch index fe82c2c73cb0..0f7965d2ea8b 100644 --- a/depends/patches/qt/no-xlib.patch +++ b/depends/patches/qt/no-xlib.patch @@ -4,12 +4,7 @@ Date: Thu, 18 Jul 2019 17:22:05 -0400 Subject: [PATCH] Wrap xlib related code blocks in #if's They are not necessary to compile QT. ---- - qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 8 ++++++++ - 1 file changed, 8 insertions(+) -diff --git a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp -index 7c62c2e2b3..c05c6c0a07 100644 --- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp +++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp @@ -49,7 +49,9 @@ @@ -22,15 +17,15 @@ index 7c62c2e2b3..c05c6c0a07 100644 #include #include -@@ -384,6 +386,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *widget) - w->setCursor(c, isBitmapCursor); +@@ -391,6 +393,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window) + xcb_flush(xcb_connection()); } +#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) static int cursorIdForShape(int cshape) { int cursorId = 0; -@@ -437,6 +440,7 @@ static int cursorIdForShape(int cshape) +@@ -444,6 +447,7 @@ static int cursorIdForShape(int cshape) } return cursorId; } @@ -47,8 +42,8 @@ index 7c62c2e2b3..c05c6c0a07 100644 +#endif xcb_cursor_t cursor = XCB_NONE; - // Try Xcursor first -@@ -589,6 +595,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) + #if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) +@@ -590,6 +596,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) // Non-standard X11 cursors are created from bitmaps cursor = createNonStandardCursor(cshape); @@ -56,14 +51,11 @@ index 7c62c2e2b3..c05c6c0a07 100644 // Create a glpyh cursor if everything else failed if (!cursor && cursorId) { cursor = xcb_generate_id(conn); -@@ -596,6 +603,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) +@@ -597,6 +604,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) cursorId, cursorId + 1, 0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0); } +#endif if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) { - const char *name = cursorNames[cshape]; --- -2.22.0 - + const char *name = cursorNames[cshape].front(); diff --git a/depends/patches/qt/qt.pro b/depends/patches/qt/qt.pro new file mode 100644 index 000000000000..8f2e900a840f --- /dev/null +++ b/depends/patches/qt/qt.pro @@ -0,0 +1,16 @@ +# Create the super cache so modules will add themselves to it. +cache(, super) + +!QTDIR_build: cache(CONFIG, add, $$list(QTDIR_build)) + +prl = no_install_prl +CONFIG += $$prl +cache(CONFIG, add stash, prl) + +TEMPLATE = subdirs +SUBDIRS = qtbase qttools qttranslations + +qttools.depends = qtbase +qttranslations.depends = qttools + +load(qt_configure) diff --git a/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch b/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch new file mode 100644 index 000000000000..f0c14a9400e1 --- /dev/null +++ b/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch @@ -0,0 +1,17 @@ +The moc executable loops through headers on CPLUS_INCLUDE_PATH and stumbles +on the GCC internal _GLIBCXX_VISIBILITY macro. Tell it to ignore it as it is +not supposed to be looking there to begin with. + +Upstream report: https://bugreports.qt.io/browse/QTBUG-83160 + +diff --git a/qtbase/src/tools/moc/main.cpp b/qtbase/src/tools/moc/main.cpp +--- a/qtbase/src/tools/moc/main.cpp ++++ b/qtbase/src/tools/moc/main.cpp +@@ -238,6 +238,7 @@ int runMoc(int argc, char **argv) + dummyVariadicFunctionMacro.arguments += Symbol(0, PP_IDENTIFIER, "__VA_ARGS__"); + pp.macros["__attribute__"] = dummyVariadicFunctionMacro; + pp.macros["__declspec"] = dummyVariadicFunctionMacro; ++ pp.macros["_GLIBCXX_VISIBILITY"] = dummyVariadicFunctionMacro; + + QString filename; + QString output; diff --git a/depends/patches/qt/qttools_src.pro b/depends/patches/qt/qttools_src.pro new file mode 100644 index 000000000000..6ef71a094273 --- /dev/null +++ b/depends/patches/qt/qttools_src.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs +SUBDIRS = linguist + +fb = force_bootstrap +CONFIG += $$fb +cache(CONFIG, add, fb) diff --git a/depends/patches/qt/rcc_hardcode_timestamp.patch b/depends/patches/qt/rcc_hardcode_timestamp.patch new file mode 100644 index 000000000000..03f389797564 --- /dev/null +++ b/depends/patches/qt/rcc_hardcode_timestamp.patch @@ -0,0 +1,24 @@ +Hardcode last modified timestamp in Qt RCC + +This change allows the already built qt package to be reused even with +the SOURCE_DATE_EPOCH variable set, e.g., for Guix builds. + + +--- old/qtbase/src/tools/rcc/rcc.cpp ++++ new/qtbase/src/tools/rcc/rcc.cpp +@@ -227,14 +227,7 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib) + + if (lib.formatVersion() >= 2) { + // last modified time stamp +- const QDateTime lastModified = m_fileInfo.lastModified(); +- quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0); +- static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(); +- if (sourceDate != 0) +- lastmod = sourceDate; +- static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong(); +- if (sourceDate2 != 0) +- lastmod = sourceDate2; ++ quint64 lastmod = quint64(1); + lib.writeNumber8(lastmod); + if (text || pass1) + lib.writeChar('\n'); diff --git a/depends/patches/qt/utc_from_string_no_optimize.patch b/depends/patches/qt/utc_from_string_no_optimize.patch new file mode 100644 index 000000000000..533ef59b3796 --- /dev/null +++ b/depends/patches/qt/utc_from_string_no_optimize.patch @@ -0,0 +1,84 @@ +Modify optimisation flags for various functions. +This fixes non-determinism issues in the asm produced for +these function when cross-compiling on x86_64 and aarch64 for +the arm64-apple-darwin HOST. + +--- a/qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp ++++ b/qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp +@@ -1078,9 +1078,9 @@ void QItemSelectionModelPrivate::_q_layoutChanged(const QList &parents = QList(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint); +- void _q_layoutChanged(const QList &parents = QList(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint); ++ __attribute__ ((optnone)) void _q_layoutChanged(const QList &parents = QList(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint); + + inline void remove(QList &r) + { + +--- a/qtbase/src/corelib/time/qdatetimeparser_p.h ++++ b/qtbase/src/corelib/time/qdatetimeparser_p.h +@@ -215,7 +215,7 @@ private: + : value(ok == Invalid ? -1 : val), used(read), zeroes(zs), state(ok) + {} + }; +- ParsedSection parseSection(const QDateTime ¤tValue, int sectionIndex, ++ __attribute__ ((optnone)) ParsedSection parseSection(const QDateTime ¤tValue, int sectionIndex, + int offset, QString *text) const; + int findMonth(const QString &str1, int monthstart, int sectionIndex, + int year, QString *monthName = nullptr, int *used = nullptr) const; + +--- a/qtbase/src/corelib/time/qtimezoneprivate_p.h ++++ b/qtbase/src/corelib/time/qtimezoneprivate_p.h +@@ -191,7 +191,7 @@ public: + virtual ~QUtcTimeZonePrivate(); + + // Fall-back for UTC[+-]\d+(:\d+){,2} IDs. +- static qint64 offsetFromUtcString(const QByteArray &id); ++ static __attribute__ ((optnone)) qint64 offsetFromUtcString(const QByteArray &id); + + QUtcTimeZonePrivate *clone() const override; + +--- a/qtbase/src/widgets/widgets/qcalendarwidget.cpp ++++ b/qtbase/src/widgets/widgets/qcalendarwidget.cpp +@@ -329,13 +329,13 @@ class QCalendarYearValidator : public QCalendarDateSectionValidator + + public: + QCalendarYearValidator(); +- virtual Section handleKey(int key) override; ++ __attribute__ ((optnone)) virtual Section handleKey(int key) override; + virtual QDate applyToDate(QDate date, QCalendar cal) const override; + virtual void setDate(QDate date, QCalendar cal) override; + virtual QString text() const override; + virtual QString text(QDate date, QCalendar cal, int repeat) const override; + private: +- int pow10(int n); ++ __attribute__ ((optnone)) int pow10(int n); + int m_pos; + int m_year; + int m_oldYear; diff --git a/depends/patches/qt/windows_lto.patch b/depends/patches/qt/windows_lto.patch new file mode 100644 index 000000000000..ea379a60f14a --- /dev/null +++ b/depends/patches/qt/windows_lto.patch @@ -0,0 +1,31 @@ +Qt (for Windows) fails to build under LTO, due to multiple definition issues, i.e + +multiple definition of `QAccessibleLineEdit::~QAccessibleLineEdit()'; + +Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94156. + +diff --git a/qtbase/src/widgets/accessible/simplewidgets.cpp b/qtbase/src/widgets/accessible/simplewidgets.cpp +index 107fd729fe..0e61878f39 100644 +--- a/qtbase/src/widgets/accessible/simplewidgets.cpp ++++ b/qtbase/src/widgets/accessible/simplewidgets.cpp +@@ -109,6 +109,8 @@ QString qt_accHotKey(const QString &text); + \ingroup accessibility + */ + ++QAccessibleLineEdit::~QAccessibleLineEdit(){}; ++ + /*! + Creates a QAccessibleButton object for \a w. + */ +diff --git a/qtbase/src/widgets/accessible/simplewidgets_p.h b/qtbase/src/widgets/accessible/simplewidgets_p.h +index 73572e3059..658da86143 100644 +--- a/qtbase/src/widgets/accessible/simplewidgets_p.h ++++ b/qtbase/src/widgets/accessible/simplewidgets_p.h +@@ -155,6 +155,7 @@ class QAccessibleLineEdit : public QAccessibleWidget, public QAccessibleTextInte + public: + explicit QAccessibleLineEdit(QWidget *o, const QString &name = QString()); + ++ ~QAccessibleLineEdit(); + QString text(QAccessible::Text t) const override; + void setText(QAccessible::Text t, const QString &text) override; + QAccessible::State state() const override; diff --git a/depends/patches/qt/xkb-default.patch b/depends/patches/qt/xkb-default.patch deleted file mode 100644 index 165abf3e2e7a..000000000000 --- a/depends/patches/qt/xkb-default.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- old/qtbase/src/gui/configure.pri 2018-06-06 17:28:10.000000000 -0400 -+++ new/qtbase/src/gui/configure.pri 2018-08-17 18:43:01.589384567 -0400 -@@ -43,18 +43,11 @@ - } - - defineTest(qtConfTest_xkbConfigRoot) { -- qtConfTest_getPkgConfigVariable($${1}): return(true) -- -- for (dir, $$list("/usr/share/X11/xkb", "/usr/local/share/X11/xkb")) { -- exists($$dir) { -- $${1}.value = $$dir -- export($${1}.value) -- $${1}.cache += value -- export($${1}.cache) -- return(true) -- } -- } -- return(false) -+ $${1}.value = "/usr/share/X11/xkb" -+ export($${1}.value) -+ $${1}.cache += value -+ export($${1}.cache) -+ return(true) - } - - defineTest(qtConfTest_qpaDefaultPlatform) { diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index ab49409fd040..4700554a1aca 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -1876,4 +1876,13 @@ int TextWidth(const QFontMetrics& fm, const QString& text) #endif } +QDateTime StartOfDay(const QDate& date) +{ +#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) + return date.startOfDay(); +#else + return QDateTime(date); +#endif +} + } // namespace GUIUtil diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 8724a0c2623b..928f333813da 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -475,6 +475,15 @@ namespace GUIUtil * In Qt 5.11 the QFontMetrics::horizontalAdvance() was introduced. */ int TextWidth(const QFontMetrics& fm, const QString& text); + + /** + * Returns the start-moment of the day in local time. + * + * QDateTime::QDateTime(const QDate& date) is deprecated since Qt 5.15. + * QDate::startOfDay() was introduced in Qt 5.14. + */ + QDateTime StartOfDay(const QDate& date); + } // namespace GUIUtil #endif // BITCOIN_QT_GUIUTIL_H diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index fe4990249ccb..d8bb9b053f9b 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -283,30 +283,30 @@ void TransactionView::chooseDate(int idx) break; case Today: transactionProxyModel->setDateRange( - QDateTime(current), + GUIUtil::StartOfDay(current), TransactionFilterProxy::MAX_DATE); break; case ThisWeek: { // Find last Monday QDate startOfWeek = current.addDays(-(current.dayOfWeek()-1)); transactionProxyModel->setDateRange( - QDateTime(startOfWeek), + GUIUtil::StartOfDay(startOfWeek), TransactionFilterProxy::MAX_DATE); } break; case ThisMonth: transactionProxyModel->setDateRange( - QDateTime(QDate(current.year(), current.month(), 1)), + GUIUtil::StartOfDay(QDate(current.year(), current.month(), 1)), TransactionFilterProxy::MAX_DATE); break; case LastMonth: transactionProxyModel->setDateRange( - QDateTime(QDate(current.year(), current.month(), 1).addMonths(-1)), - QDateTime(QDate(current.year(), current.month(), 1))); + GUIUtil::StartOfDay(QDate(current.year(), current.month(), 1).addMonths(-1)), + GUIUtil::StartOfDay(QDate(current.year(), current.month(), 1))); break; case ThisYear: transactionProxyModel->setDateRange( - QDateTime(QDate(current.year(), 1, 1)), + GUIUtil::StartOfDay(QDate(current.year(), 1, 1)), TransactionFilterProxy::MAX_DATE); break; case Range: @@ -643,8 +643,8 @@ void TransactionView::dateRangeChanged() settings.setValue("transactionDateTo", dateTo->date().toString(PERSISTENCE_DATE_FORMAT)); transactionProxyModel->setDateRange( - QDateTime(dateFrom->date()), - QDateTime(dateTo->date())); + GUIUtil::StartOfDay(dateFrom->date()), + GUIUtil::StartOfDay(dateTo->date())); } void TransactionView::focusTransaction(const QModelIndex &idx) From 47b84546f34863693ac7bcdb142e081f473a978c Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:52:15 -0600 Subject: [PATCH 029/401] Update logging.h enhanced logging details --- src/logging.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/logging.h b/src/logging.h index c4fafd1b0147..a95752816dab 100644 --- a/src/logging.h +++ b/src/logging.h @@ -17,10 +17,10 @@ #include #include -static const bool DEFAULT_LOGTIMEMICROS = false; -static const bool DEFAULT_LOGIPS = false; +static const bool DEFAULT_LOGTIMEMICROS = true; +static const bool DEFAULT_LOGIPS = true; static const bool DEFAULT_LOGTIMESTAMPS = true; -static const bool DEFAULT_LOGTHREADNAMES = false; +static const bool DEFAULT_LOGTHREADNAMES = true; extern const char * const DEFAULT_DEBUGLOGFILE; extern bool fLogThreadNames; From 12770ccea7a237b59341ca35dadd234a1b114410 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 16:06:38 -0600 Subject: [PATCH 030/401] Update boost.mk updated boost depends location --- depends/packages/boost.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index e4c9d700106a..5822d2da17c0 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,6 +1,6 @@ package=boost $(package)_version=1_86_0 -$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/ +$(package)_download_path=https://archives.boost.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/ $(package)_file_name=boost_$($(package)_version).tar.bz2 $(package)_sha256_hash=1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b #4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 From 40eaa5d6414d95bd73cd9340b629e45e914e5736 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:34:19 -0600 Subject: [PATCH 031/401] c++ 20 updates for leveldb 1.23 --- src/leveldb/util/env_posix.cc | 4 ++-- src/leveldb/util/env_windows.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/leveldb/util/env_posix.cc b/src/leveldb/util/env_posix.cc index d84cd1e301bd..d7de7163ec79 100644 --- a/src/leveldb/util/env_posix.cc +++ b/src/leveldb/util/env_posix.cc @@ -837,7 +837,7 @@ class SingletonEnv { public: SingletonEnv() { #if !defined(NDEBUG) - env_initialized_.store(true, std::memory_order::memory_order_relaxed); + env_initialized_.store(true, std::memory_order_relaxed); #endif // !defined(NDEBUG) static_assert(sizeof(env_storage_) >= sizeof(EnvType), "env_storage_ will not fit the Env"); @@ -854,7 +854,7 @@ class SingletonEnv { static void AssertEnvNotInitialized() { #if !defined(NDEBUG) - assert(!env_initialized_.load(std::memory_order::memory_order_relaxed)); + assert(!env_initialized_.load(std::memory_order_relaxed)); #endif // !defined(NDEBUG) } diff --git a/src/leveldb/util/env_windows.cc b/src/leveldb/util/env_windows.cc index 449f564477e0..de5c3961a221 100644 --- a/src/leveldb/util/env_windows.cc +++ b/src/leveldb/util/env_windows.cc @@ -745,7 +745,7 @@ class SingletonEnv { public: SingletonEnv() { #if !defined(NDEBUG) - env_initialized_.store(true, std::memory_order::memory_order_relaxed); + env_initialized_.store(true, std::memory_order_relaxed); #endif // !defined(NDEBUG) static_assert(sizeof(env_storage_) >= sizeof(EnvType), "env_storage_ will not fit the Env"); @@ -762,7 +762,7 @@ class SingletonEnv { static void AssertEnvNotInitialized() { #if !defined(NDEBUG) - assert(!env_initialized_.load(std::memory_order::memory_order_relaxed)); + assert(!env_initialized_.load(std::memory_order_relaxed)); #endif // !defined(NDEBUG) } From b8a1ec27877b6777f68fad7f48783481bb3e33d6 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:38:59 -0600 Subject: [PATCH 032/401] Update versionbits.cpp --- src/versionbits.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index ab78b02b644e..2882413911c4 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -4,6 +4,7 @@ #include #include +#include ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { @@ -11,6 +12,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* int64_t nTimeStart = BeginTime(params); int64_t nTimeTimeout = EndTime(params); + LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); + // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. if (pindexPrev != nullptr) { pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - ((pindexPrev->nHeight + 1) % nPeriod)); @@ -38,11 +41,13 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* ThresholdState state = cache[pindexPrev]; int nStartHeight{std::numeric_limits::max()}; +/* for (const auto& pair : cache) { if (pair.second == ThresholdState::STARTED && nStartHeight > pair.first->nHeight + 1) { nStartHeight = pair.first->nHeight + 1; } } +*/ // Now walk forward and compute the state of descendants of pindexPrev while (!vToCompute.empty()) { From e5f8007d462e034fa3c871f21c17a1a0640df08e Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:46:09 -0600 Subject: [PATCH 033/401] Update versionbits.cpp --- src/versionbits.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 2882413911c4..cdec9813f966 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -41,6 +41,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* ThresholdState state = cache[pindexPrev]; int nStartHeight{std::numeric_limits::max()}; + + LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); /* for (const auto& pair : cache) { if (pair.second == ThresholdState::STARTED && nStartHeight > pair.first->nHeight + 1) { From fe8bb8e860dee9789e9c7bca541bb3dd607563ec Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:05:48 -0600 Subject: [PATCH 034/401] Update versionbits.cpp --- src/versionbits.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index cdec9813f966..91bba3f2044c 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -9,6 +9,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { int nPeriod = Period(params); + int nThreshold = Threshold(params, 0); int64_t nTimeStart = BeginTime(params); int64_t nTimeTimeout = EndTime(params); @@ -42,8 +43,9 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* int nStartHeight{std::numeric_limits::max()}; - LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); /* + LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); + for (const auto& pair : cache) { if (pair.second == ThresholdState::STARTED && nStartHeight > pair.first->nHeight + 1) { nStartHeight = pair.first->nHeight + 1; @@ -186,6 +188,9 @@ class VersionBitsConditionChecker : public AbstractThresholdConditionChecker { int64_t BeginTime(const Consensus::Params& params) const override { return params.vDeployments[id].nStartTime; } int64_t EndTime(const Consensus::Params& params) const override { return params.vDeployments[id].nTimeout; } int Period(const Consensus::Params& params) const override { return params.vDeployments[id].nWindowSize ? params.vDeployments[id].nWindowSize : params.nMinerConfirmationWindow; } + int Threshold(const Consensus::Params& params, int nAttempt) const override { return params.nRuleChangeActivationThreshold; } + +/* int Threshold(const Consensus::Params& params, int nAttempt) const override { if (params.vDeployments[id].nThresholdStart == 0) { @@ -202,6 +207,7 @@ class VersionBitsConditionChecker : public AbstractThresholdConditionChecker { { return (((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && (pindex->nVersion & Mask(params)) != 0); } +*/ public: explicit VersionBitsConditionChecker(Consensus::DeploymentPos id_) : id(id_) {} From e9f96fa885c264dbbf9c2e6dc9e9e8774acb4d5a Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:07:18 -0600 Subject: [PATCH 035/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 91bba3f2044c..c64e0c8a307a 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -202,12 +202,12 @@ class VersionBitsConditionChecker : public AbstractThresholdConditionChecker { int64_t nThresholdCalc = params.vDeployments[id].nThresholdStart - nAttempt * nAttempt * Period(params) / 100 / params.vDeployments[id].nFalloffCoeff; return std::max(params.vDeployments[id].nThresholdMin, nThresholdCalc); } +*/ bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const override { return (((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && (pindex->nVersion & Mask(params)) != 0); } -*/ public: explicit VersionBitsConditionChecker(Consensus::DeploymentPos id_) : id(id_) {} From 7ee894ed609dd4c2799033fc023dc39f1009761f Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:13:30 -0600 Subject: [PATCH 036/401] Update versionbits.cpp --- src/versionbits.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index c64e0c8a307a..0366bec6aa27 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -83,16 +83,27 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* } pindexCount = pindexCount->pprev; } - assert(nStartHeight > 0 && nStartHeight < std::numeric_limits::max()); + if (count >= nThreshold) { + stateNext = ThresholdState::LOCKED_IN; + } else if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) { + stateNext = ThresholdState::FAILED; + } +/* assert(nStartHeight > 0 && nStartHeight < std::numeric_limits::max()); int nAttempt = (pindexCount->nHeight + 1 - nStartHeight) / nPeriod; if (count >= Threshold(params, nAttempt)) { stateNext = ThresholdState::LOCKED_IN; } +*/ break; } case ThresholdState::LOCKED_IN: { // Always progresses into ACTIVE. - stateNext = ThresholdState::ACTIVE; + // stateNext = ThresholdState::ACTIVE; + + if (pindexPrev->nHeight + 1 >= min_activation_height) { + stateNext = ThresholdState::ACTIVE; + } + break; } case ThresholdState::FAILED: From 91c5ca30d08c4547cd52269618ced60cada65b42 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:16:18 -0600 Subject: [PATCH 037/401] ... --- src/versionbits.cpp | 2 ++ src/versionbits.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 0366bec6aa27..49f55061d5b4 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -12,6 +12,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* int nThreshold = Threshold(params, 0); int64_t nTimeStart = BeginTime(params); int64_t nTimeTimeout = EndTime(params); + int min_activation_height = MinActivationHeight(params); + LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); diff --git a/src/versionbits.h b/src/versionbits.h index cba2bae77703..f11c93229666 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -60,6 +60,8 @@ class AbstractThresholdConditionChecker { virtual int Period(const Consensus::Params& params) const =0; virtual int Threshold(const Consensus::Params& params, int nAttempt) const =0; + virtual int MinActivationHeight(const Consensus::Params& params) const { return 0; } + public: /** Returns the numerical statistics of an in-progress BIP9 softfork in the current period */ BIP9Stats GetStateStatisticsFor(const CBlockIndex* pindex, const Consensus::Params& params, ThresholdConditionCache& cache) const; From f01f7a58147304acb9a8775a633035c031881cbe Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:32:52 -0600 Subject: [PATCH 038/401] Update versionbits.cpp --- src/versionbits.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 49f55061d5b4..f2bf6895933c 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -9,7 +9,6 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { int nPeriod = Period(params); - int nThreshold = Threshold(params, 0); int64_t nTimeStart = BeginTime(params); int64_t nTimeTimeout = EndTime(params); int min_activation_height = MinActivationHeight(params); @@ -44,16 +43,13 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* ThresholdState state = cache[pindexPrev]; int nStartHeight{std::numeric_limits::max()}; - -/* - LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); - for (const auto& pair : cache) { if (pair.second == ThresholdState::STARTED && nStartHeight > pair.first->nHeight + 1) { nStartHeight = pair.first->nHeight + 1; } } -*/ + + LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); // Now walk forward and compute the state of descendants of pindexPrev while (!vToCompute.empty()) { @@ -76,6 +72,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* stateNext = ThresholdState::FAILED; break; } + // We need to count const CBlockIndex* pindexCount = pindexPrev; int count = 0; @@ -85,17 +82,15 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* } pindexCount = pindexCount->pprev; } + + assert(nStartHeight > 0 && nStartHeight < std::numeric_limits::max()); + int nAttempt = (pindexCount->nHeight + 1 - nStartHeight) / nPeriod; + int nThreshold = Threshold(params, nAttempt); if (count >= nThreshold) { stateNext = ThresholdState::LOCKED_IN; } else if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) { stateNext = ThresholdState::FAILED; } -/* assert(nStartHeight > 0 && nStartHeight < std::numeric_limits::max()); - int nAttempt = (pindexCount->nHeight + 1 - nStartHeight) / nPeriod; - if (count >= Threshold(params, nAttempt)) { - stateNext = ThresholdState::LOCKED_IN; - } -*/ break; } case ThresholdState::LOCKED_IN: { From 42a58d6bb6965bfbf9673ecdc7232943761d0b25 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:53:47 -0600 Subject: [PATCH 039/401] Update versionbits.cpp --- src/versionbits.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index f2bf6895933c..d8ac9e39a3d1 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -14,7 +14,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* int min_activation_height = MinActivationHeight(params); - LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); +// LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. if (pindexPrev != nullptr) { @@ -49,7 +49,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* } } - LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); +// LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); // Now walk forward and compute the state of descendants of pindexPrev while (!vToCompute.empty()) { From 44e4cfebecd2c2c5bce4add96ec986890d7cd484 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:18:26 -0600 Subject: [PATCH 040/401] Update validation.cpp --- src/validation.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index cbf4851c401f..391234f1c79d 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1148,11 +1148,14 @@ bool CChainState::IsInitialBlockDownload() const return false; if (fImporting || fReindex) return true; - if (m_chain.Tip() == nullptr) + + CChain& chain{ActiveChain()}; + + if (chain.Tip() == nullptr) return true; - if (m_chain.Tip()->nChainWork < nMinimumChainWork) + if (chain.Tip()->nChainWork < nMinimumChainWork) return true; - if (m_chain.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge)) + if (chain.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge)) return true; LogPrintf("Leaving InitialBlockDownload (latching to false)\n"); m_cached_finished_ibd.store(true, std::memory_order_relaxed); From 02615aeaa1e195ea87803a111291ed8d48aa7cd7 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:35:08 -0600 Subject: [PATCH 041/401] Update chain.h --- src/chain.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/chain.h b/src/chain.h index ae8cd9ec6542..661dba74314c 100644 --- a/src/chain.h +++ b/src/chain.h @@ -454,6 +454,8 @@ class CChain { CChain(const CChain&) = delete; CChain& operator=(const CChain&) = delete; + CChain& ActiveChain() const EXCLUSIVE_LOCKS_REQUIRED(GetMutex()) { return ActiveChainstate().m_chain; } + /** Returns the index entry for the genesis block of this chain, or nullptr if none. */ CBlockIndex *Genesis() const { return vChain.size() > 0 ? vChain[0] : nullptr; From c24ced2dd3a734aa4247fc5ffe7fea75a81a94ac Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:36:24 -0600 Subject: [PATCH 042/401] Revert "Update chain.h" This reverts commit 02615aeaa1e195ea87803a111291ed8d48aa7cd7. --- src/chain.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/chain.h b/src/chain.h index 661dba74314c..ae8cd9ec6542 100644 --- a/src/chain.h +++ b/src/chain.h @@ -454,8 +454,6 @@ class CChain { CChain(const CChain&) = delete; CChain& operator=(const CChain&) = delete; - CChain& ActiveChain() const EXCLUSIVE_LOCKS_REQUIRED(GetMutex()) { return ActiveChainstate().m_chain; } - /** Returns the index entry for the genesis block of this chain, or nullptr if none. */ CBlockIndex *Genesis() const { return vChain.size() > 0 ? vChain[0] : nullptr; From 40589d7e911f834cda9aa4f76a6bf9e3f1f38a99 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:43:05 -0600 Subject: [PATCH 043/401] Revert "Update validation.cpp" This reverts commit 44e4cfebecd2c2c5bce4add96ec986890d7cd484. --- src/validation.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 391234f1c79d..cbf4851c401f 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1148,14 +1148,11 @@ bool CChainState::IsInitialBlockDownload() const return false; if (fImporting || fReindex) return true; - - CChain& chain{ActiveChain()}; - - if (chain.Tip() == nullptr) + if (m_chain.Tip() == nullptr) return true; - if (chain.Tip()->nChainWork < nMinimumChainWork) + if (m_chain.Tip()->nChainWork < nMinimumChainWork) return true; - if (chain.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge)) + if (m_chain.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge)) return true; LogPrintf("Leaving InitialBlockDownload (latching to false)\n"); m_cached_finished_ibd.store(true, std::memory_order_relaxed); From bae48e9336afa6745839a7955fd680b3d09f9713 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:43:21 -0600 Subject: [PATCH 044/401] Revert "Update versionbits.cpp" This reverts commit 42a58d6bb6965bfbf9673ecdc7232943761d0b25. --- src/versionbits.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index d8ac9e39a3d1..f2bf6895933c 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -14,7 +14,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* int min_activation_height = MinActivationHeight(params); -// LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); + LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. if (pindexPrev != nullptr) { @@ -49,7 +49,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* } } -// LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); + LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); // Now walk forward and compute the state of descendants of pindexPrev while (!vToCompute.empty()) { From bbf25ca0c4e1e4db58f5f298cb176d83da0f527a Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:39:11 -0600 Subject: [PATCH 045/401] Update versionbits.cpp --- src/versionbits.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index f2bf6895933c..507ee4197c15 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -196,9 +196,7 @@ class VersionBitsConditionChecker : public AbstractThresholdConditionChecker { int64_t BeginTime(const Consensus::Params& params) const override { return params.vDeployments[id].nStartTime; } int64_t EndTime(const Consensus::Params& params) const override { return params.vDeployments[id].nTimeout; } int Period(const Consensus::Params& params) const override { return params.vDeployments[id].nWindowSize ? params.vDeployments[id].nWindowSize : params.nMinerConfirmationWindow; } - int Threshold(const Consensus::Params& params, int nAttempt) const override { return params.nRuleChangeActivationThreshold; } -/* int Threshold(const Consensus::Params& params, int nAttempt) const override { if (params.vDeployments[id].nThresholdStart == 0) { @@ -210,7 +208,6 @@ class VersionBitsConditionChecker : public AbstractThresholdConditionChecker { int64_t nThresholdCalc = params.vDeployments[id].nThresholdStart - nAttempt * nAttempt * Period(params) / 100 / params.vDeployments[id].nFalloffCoeff; return std::max(params.vDeployments[id].nThresholdMin, nThresholdCalc); } -*/ bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const override { @@ -250,3 +247,17 @@ void VersionBitsCache::Clear() caches[d].clear(); } } + +PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) +{ + + for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { + for (pindex = ::ChainActive().Tip(); pindex && pindex->pprev; pindex = pindex->pprev) { + LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); + ThresholdState stateNext = Threshold(params, pindex->nHeight); + cache[pindex] = stateNext; + } + } + +} + From 76f74914d9f6fe91934ecb2f7c7aa468ed224fd8 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:44:58 -0600 Subject: [PATCH 046/401] Update versionbits.cpp --- src/versionbits.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 507ee4197c15..3a7459004be0 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -5,6 +5,7 @@ #include #include #include +#include ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { @@ -248,13 +249,13 @@ void VersionBitsCache::Clear() } } -PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) +void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) { for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { for (pindex = ::ChainActive().Tip(); pindex && pindex->pprev; pindex = pindex->pprev) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - ThresholdState stateNext = Threshold(params, pindex->nHeight); + ThresholdState stateNext = VersionBitsConditionChecker::Threshold(params, pindex->nHeight); cache[pindex] = stateNext; } } From 12f6b9b9dd53a077cb31f270ef8771e2a99c1002 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:51:07 -0600 Subject: [PATCH 047/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 3a7459004be0..085864c98e98 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { From 39601222bc53a8aa9d39e0dc02a4262cff213b7f Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:01:33 -0600 Subject: [PATCH 048/401] ... --- src/versionbits.cpp | 3 ++- src/versionbits.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 085864c98e98..cb2be12ec712 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -253,9 +253,10 @@ void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params { for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { + LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); for (pindex = ::ChainActive().Tip(); pindex && pindex->pprev; pindex = pindex->pprev) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - ThresholdState stateNext = VersionBitsConditionChecker::Threshold(params, pindex->nHeight); + ThresholdState stateNext = Threshold(params, pindex->nHeight); cache[pindex] = stateNext; } } diff --git a/src/versionbits.h b/src/versionbits.h index f11c93229666..1b2e544ad821 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -86,4 +86,6 @@ BIP9Stats VersionBitsStatistics(const CBlockIndex* pindexPrev, const Consensus:: int VersionBitsStateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); uint32_t VersionBitsMask(const Consensus::Params& params, Consensus::DeploymentPos pos); +void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) + #endif // BITCOIN_VERSIONBITS_H From c83b13255f24aa36cab5d1d2185dfb3a3b13b18d Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:13:07 -0600 Subject: [PATCH 049/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index cb2be12ec712..363912bb5d46 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -2,10 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include #include #include #include -#include ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { From b0fdd6e83e9745252ed454ac8b72658128eb5c2d Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:14:42 -0600 Subject: [PATCH 050/401] Update versionbits.h --- src/versionbits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.h b/src/versionbits.h index 1b2e544ad821..bd5b43761f47 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -86,6 +86,6 @@ BIP9Stats VersionBitsStatistics(const CBlockIndex* pindexPrev, const Consensus:: int VersionBitsStateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); uint32_t VersionBitsMask(const Consensus::Params& params, Consensus::DeploymentPos pos); -void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) +void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); #endif // BITCOIN_VERSIONBITS_H From 68a41f94cec222d0a409d0d13e100e790d8b86fa Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:20:17 -0600 Subject: [PATCH 051/401] Update versionbits.cpp --- src/versionbits.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 363912bb5d46..8163a9eb3450 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -251,12 +251,13 @@ void VersionBitsCache::Clear() void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) { + const VersionBitsConditionChecker test; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); for (pindex = ::ChainActive().Tip(); pindex && pindex->pprev; pindex = pindex->pprev) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - ThresholdState stateNext = Threshold(params, pindex->nHeight); + ThresholdState stateNext = test.Threshold(params, pindex->nHeight); cache[pindex] = stateNext; } } From a045811d4d9f68d8ac9a0b24d2303a110a835cc2 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:21:13 -0600 Subject: [PATCH 052/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 8163a9eb3450..efca71bf39c6 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -251,7 +251,7 @@ void VersionBitsCache::Clear() void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) { - const VersionBitsConditionChecker test; + VersionBitsConditionChecker test; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); From 37a3ac5533b1032c508ab45aaf25daaa0c529cab Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:24:15 -0600 Subject: [PATCH 053/401] Update versionbits.cpp --- src/versionbits.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index efca71bf39c6..b16a24ce3127 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -251,13 +251,25 @@ void VersionBitsCache::Clear() void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) { - VersionBitsConditionChecker test; + + int Threshold(const Consensus::Params& params, int nAttempt) const override + { + if (params.vDeployments[id].nThresholdStart == 0) { + return params.nRuleChangeActivationThreshold; + } + if (params.vDeployments[id].nThresholdMin == 0 || params.vDeployments[id].nFalloffCoeff == 0) { + return params.vDeployments[id].nThresholdStart; + } + int64_t nThresholdCalc = params.vDeployments[id].nThresholdStart - nAttempt * nAttempt * Period(params) / 100 / params.vDeployments[id].nFalloffCoeff; + return std::max(params.vDeployments[id].nThresholdMin, nThresholdCalc); + } + for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); for (pindex = ::ChainActive().Tip(); pindex && pindex->pprev; pindex = pindex->pprev) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - ThresholdState stateNext = test.Threshold(params, pindex->nHeight); + ThresholdState stateNext = Threshold(params, pindex->nHeight); cache[pindex] = stateNext; } } From 180ed9442101c3e516ac3fbc03984d73cf22d675 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:25:54 -0600 Subject: [PATCH 054/401] Update versionbits.cpp --- src/versionbits.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index b16a24ce3127..0e629e093f6d 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -249,11 +249,8 @@ void VersionBitsCache::Clear() } } -void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) +int ThresholdNew(const Consensus::Params& params, int nAttempt) const override { - - int Threshold(const Consensus::Params& params, int nAttempt) const override - { if (params.vDeployments[id].nThresholdStart == 0) { return params.nRuleChangeActivationThreshold; } @@ -262,14 +259,16 @@ void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params } int64_t nThresholdCalc = params.vDeployments[id].nThresholdStart - nAttempt * nAttempt * Period(params) / 100 / params.vDeployments[id].nFalloffCoeff; return std::max(params.vDeployments[id].nThresholdMin, nThresholdCalc); - } +} +void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) +{ for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); for (pindex = ::ChainActive().Tip(); pindex && pindex->pprev; pindex = pindex->pprev) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - ThresholdState stateNext = Threshold(params, pindex->nHeight); + ThresholdState stateNext = ThresholdNew(params, pindex->nHeight); cache[pindex] = stateNext; } } From 82b819a64dc68b8d46240924bb29e7345dd98a87 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:17:42 -0600 Subject: [PATCH 055/401] Update versionbits.cpp --- src/versionbits.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 0e629e093f6d..2ba2e743164a 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -249,8 +249,11 @@ void VersionBitsCache::Clear() } } +/* int ThresholdNew(const Consensus::Params& params, int nAttempt) const override { + const Consensus::DeploymentPos id; + if (params.vDeployments[id].nThresholdStart == 0) { return params.nRuleChangeActivationThreshold; } @@ -260,6 +263,7 @@ int ThresholdNew(const Consensus::Params& params, int nAttempt) const override int64_t nThresholdCalc = params.vDeployments[id].nThresholdStart - nAttempt * nAttempt * Period(params) / 100 / params.vDeployments[id].nFalloffCoeff; return std::max(params.vDeployments[id].nThresholdMin, nThresholdCalc); } +*/ void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) { @@ -268,7 +272,11 @@ void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); for (pindex = ::ChainActive().Tip(); pindex && pindex->pprev; pindex = pindex->pprev) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - ThresholdState stateNext = ThresholdNew(params, pindex->nHeight); + + assert(cache.count(pindexPrev)); + stateNext = cache[pindexPrev]; + +// stateNext = ThresholdNew(params, pindex->nHeight); cache[pindex] = stateNext; } } From 5182a882adc541bdbd073d98c17221af3e613fbc Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:19:04 -0600 Subject: [PATCH 056/401] Update versionbits.cpp --- src/versionbits.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 2ba2e743164a..0dcf4f5d0feb 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -273,8 +273,8 @@ void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params for (pindex = ::ChainActive().Tip(); pindex && pindex->pprev; pindex = pindex->pprev) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - assert(cache.count(pindexPrev)); - stateNext = cache[pindexPrev]; + assert(cache.count(pindex)); + stateNext = cache[pindex]; // stateNext = ThresholdNew(params, pindex->nHeight); cache[pindex] = stateNext; From cf93a712185b8d26af0b703ded9bebc326a7a690 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:24:49 -0600 Subject: [PATCH 057/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 0dcf4f5d0feb..06024e088ac0 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -265,7 +265,7 @@ int ThresholdNew(const Consensus::Params& params, int nAttempt) const override } */ -void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) +void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, ThresholdConditionCache& cache) { for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { From bff10b0a728ae1d7052879f2e6b8698c1fab667c Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:28:02 -0600 Subject: [PATCH 058/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 06024e088ac0..ce05cd7f2f98 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -274,7 +274,7 @@ void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); assert(cache.count(pindex)); - stateNext = cache[pindex]; + ThresholdState stateNext = cache[pindex]; // stateNext = ThresholdNew(params, pindex->nHeight); cache[pindex] = stateNext; From b97322bc1ad70d5f8068d9f9029105c15bb9a1ef Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:01:14 -0600 Subject: [PATCH 059/401] ... --- src/validation.cpp | 5 ++++- src/versionbits.cpp | 3 ++- src/versionbits.h | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index cbf4851c401f..3dc624ebd0b9 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2589,7 +2589,10 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar int nUpgraded = 0; const CBlockIndex* pindex = pindexNew; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { - WarningBitsConditionChecker checker(bit); + + if (!preloaded) PreLoadCacheBits(pindex, warningcache[bi]); + + WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); if (state == ThresholdState::ACTIVE || state == ThresholdState::LOCKED_IN) { const std::string strWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)").translated, bit); diff --git a/src/versionbits.cpp b/src/versionbits.cpp index ce05cd7f2f98..bfc686d3648a 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -265,7 +265,7 @@ int ThresholdNew(const Consensus::Params& params, int nAttempt) const override } */ -void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, ThresholdConditionCache& cache) +void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) { for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { @@ -281,5 +281,6 @@ void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params } } + preloaded = true; } diff --git a/src/versionbits.h b/src/versionbits.h index bd5b43761f47..e72b19ddc43f 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -17,6 +17,9 @@ static const int32_t VERSIONBITS_TOP_MASK = 0xE0000000UL; /** Total bits available for versionbits */ static const int32_t VERSIONBITS_NUM_BITS = 29; +// +bool preloaded = false; + /** BIP 9 defines a finite-state-machine to deploy a softfork in multiple stages. * State transitions happen during retarget period if conditions are met * In case of reorg, transitions can go backward. Without transition, state is @@ -86,6 +89,6 @@ BIP9Stats VersionBitsStatistics(const CBlockIndex* pindexPrev, const Consensus:: int VersionBitsStateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); uint32_t VersionBitsMask(const Consensus::Params& params, Consensus::DeploymentPos pos); -void PreLoadCacheBits(const CBlockIndex* pindex, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); +void PreLoadCacheBits(const CBlockIndex* pindex, VersionBitsCache& cache); #endif // BITCOIN_VERSIONBITS_H From 40e5ad58d29fa4f61c13676d657967043e922710 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:03:09 -0600 Subject: [PATCH 060/401] Update validation.cpp --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 3dc624ebd0b9..f3893c1ee700 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2590,7 +2590,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar const CBlockIndex* pindex = pindexNew; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { - if (!preloaded) PreLoadCacheBits(pindex, warningcache[bi]); + if (!preloaded) PreLoadCacheBits(pindex, warningcache[bit]); WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); From 87aa0c2b42df57a38114837de3d148abe4086ab1 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:08:59 -0600 Subject: [PATCH 061/401] ... --- src/validation.cpp | 2 +- src/versionbits.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index f3893c1ee700..5bfcd85b65c2 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2590,7 +2590,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar const CBlockIndex* pindex = pindexNew; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { - if (!preloaded) PreLoadCacheBits(pindex, warningcache[bit]); + if (!preloaded) PreLoadCacheBits(pindex, versionbitscache); WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); diff --git a/src/versionbits.h b/src/versionbits.h index e72b19ddc43f..baf5eca40452 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -89,6 +89,6 @@ BIP9Stats VersionBitsStatistics(const CBlockIndex* pindexPrev, const Consensus:: int VersionBitsStateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); uint32_t VersionBitsMask(const Consensus::Params& params, Consensus::DeploymentPos pos); -void PreLoadCacheBits(const CBlockIndex* pindex, VersionBitsCache& cache); +void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache); #endif // BITCOIN_VERSIONBITS_H From c29deb4f27483056e384ec89e8882b87cc5cef04 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:12:47 -0600 Subject: [PATCH 062/401] ... --- src/versionbits.cpp | 2 +- src/versionbits.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index bfc686d3648a..3f93a8316e2d 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -265,7 +265,7 @@ int ThresholdNew(const Consensus::Params& params, int nAttempt) const override } */ -void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) +void PreLoadCacheBits(const CBlockIndex* pindex, VersionBitsCache& cache) { for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { diff --git a/src/versionbits.h b/src/versionbits.h index baf5eca40452..e72b19ddc43f 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -89,6 +89,6 @@ BIP9Stats VersionBitsStatistics(const CBlockIndex* pindexPrev, const Consensus:: int VersionBitsStateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); uint32_t VersionBitsMask(const Consensus::Params& params, Consensus::DeploymentPos pos); -void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache); +void PreLoadCacheBits(const CBlockIndex* pindex, VersionBitsCache& cache); #endif // BITCOIN_VERSIONBITS_H From 1f834b5639309ba17e975cc1b3201822aa4d89ab Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:14:45 -0600 Subject: [PATCH 063/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 3f93a8316e2d..bfc686d3648a 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -265,7 +265,7 @@ int ThresholdNew(const Consensus::Params& params, int nAttempt) const override } */ -void PreLoadCacheBits(const CBlockIndex* pindex, VersionBitsCache& cache) +void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) { for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { From 4be211e4ee619615d7e53996c319d896ff0c099d Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:16:30 -0600 Subject: [PATCH 064/401] ... --- src/validation.cpp | 2 +- src/versionbits.cpp | 2 +- src/versionbits.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 5bfcd85b65c2..1debf67366e5 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2590,7 +2590,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar const CBlockIndex* pindex = pindexNew; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { - if (!preloaded) PreLoadCacheBits(pindex, versionbitscache); + if (!preloadedchain) PreLoadCacheBits(pindex, versionbitscache); WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); diff --git a/src/versionbits.cpp b/src/versionbits.cpp index bfc686d3648a..8d63a613b063 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -281,6 +281,6 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) } } - preloaded = true; + preloadedchain = true; } diff --git a/src/versionbits.h b/src/versionbits.h index e72b19ddc43f..b3619b6ca01a 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -18,7 +18,7 @@ static const int32_t VERSIONBITS_TOP_MASK = 0xE0000000UL; static const int32_t VERSIONBITS_NUM_BITS = 29; // -bool preloaded = false; +bool preloadedchain = false; /** BIP 9 defines a finite-state-machine to deploy a softfork in multiple stages. * State transitions happen during retarget period if conditions are met From be35505549199a62354326090c257eb9799ae20c Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:19:55 -0600 Subject: [PATCH 065/401] Update versionbits.h --- src/versionbits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.h b/src/versionbits.h index b3619b6ca01a..9d33f2292d0f 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -18,7 +18,7 @@ static const int32_t VERSIONBITS_TOP_MASK = 0xE0000000UL; static const int32_t VERSIONBITS_NUM_BITS = 29; // -bool preloadedchain = false; +static bool preloadedchain = false; /** BIP 9 defines a finite-state-machine to deploy a softfork in multiple stages. * State transitions happen during retarget period if conditions are met From aef51743decf10ceb718420af5b1fb4cf9a942c2 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:25:47 -0600 Subject: [PATCH 066/401] Update validation.cpp --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 1debf67366e5..754eb7002bfb 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2590,7 +2590,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar const CBlockIndex* pindex = pindexNew; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { - if (!preloadedchain) PreLoadCacheBits(pindex, versionbitscache); + if (!preloadedchain) PreLoadCacheBits(pindex, VersionBitsCache); WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); From 08a4ad3fc694bc4e4638b5382dc2da8338288799 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:28:35 -0600 Subject: [PATCH 067/401] ... --- src/validation.cpp | 2 +- src/versionbits.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 754eb7002bfb..3e6270433cd0 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2590,7 +2590,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar const CBlockIndex* pindex = pindexNew; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { - if (!preloadedchain) PreLoadCacheBits(pindex, VersionBitsCache); + if (!preloadedchain) PreLoadCacheBits(pindex, warningcache[bit]); WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); diff --git a/src/versionbits.h b/src/versionbits.h index 9d33f2292d0f..a229390d8bfa 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -89,6 +89,6 @@ BIP9Stats VersionBitsStatistics(const CBlockIndex* pindexPrev, const Consensus:: int VersionBitsStateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); uint32_t VersionBitsMask(const Consensus::Params& params, Consensus::DeploymentPos pos); -void PreLoadCacheBits(const CBlockIndex* pindex, VersionBitsCache& cache); +void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache); #endif // BITCOIN_VERSIONBITS_H From 6f9bedcdd680aba3fe9dd62d572f64fdee344836 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:39:36 -0600 Subject: [PATCH 068/401] Update versionbits.cpp --- src/versionbits.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 8d63a613b063..996ea8f17bdc 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -270,8 +270,10 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); - for (pindex = ::ChainActive().Tip(); pindex && pindex->pprev; pindex = pindex->pprev) { + int ; + for (int startheight = ::ChainActive().Tip(); startheight < 1; startheight--) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); + pindex = pindexPrev; assert(cache.count(pindex)); ThresholdState stateNext = cache[pindex]; From 438b2e0754f47239ef52a680f3bfa3a309cb2ad3 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:45:02 -0600 Subject: [PATCH 069/401] Update versionbits.cpp --- src/versionbits.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 996ea8f17bdc..17f56d17a6d3 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -270,8 +270,7 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); - int ; - for (int startheight = ::ChainActive().Tip(); startheight < 1; startheight--) { + for (int startheight = 1; startheight < ::ChainActive().Tip(); startheight--) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); pindex = pindexPrev; From c1a8d5bbdebc4da4e55f5f0259490c0f6f2acde8 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:47:45 -0600 Subject: [PATCH 070/401] Update versionbits.cpp --- src/versionbits.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 17f56d17a6d3..b3def4f93af2 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -267,12 +267,13 @@ int ThresholdNew(const Consensus::Params& params, int nAttempt) const override void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) { + int maxtip = pindex->nHeight; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); - for (int startheight = 1; startheight < ::ChainActive().Tip(); startheight--) { + for (int startheight = 1; startheight < maxtip; startheight++) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - pindex = pindexPrev; + pindex = pindex->pNext; assert(cache.count(pindex)); ThresholdState stateNext = cache[pindex]; From 7b4c1f0959a6d3b397f156e828b8588c5064f2f8 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:50:22 -0600 Subject: [PATCH 071/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index b3def4f93af2..74c76da17176 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -273,7 +273,7 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); for (int startheight = 1; startheight < maxtip; startheight++) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - pindex = pindex->pNext; + pindex = pindex->nHeight + 1; assert(cache.count(pindex)); ThresholdState stateNext = cache[pindex]; From e8d4b1751762c2419d07b287ff740dc53ed681dc Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:54:01 -0600 Subject: [PATCH 072/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 74c76da17176..f0f2f30aa220 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -273,7 +273,7 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); for (int startheight = 1; startheight < maxtip; startheight++) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - pindex = pindex->nHeight + 1; + pindex = (pindex->nHeight + 1); assert(cache.count(pindex)); ThresholdState stateNext = cache[pindex]; From 3b4409bdf34c92bbf51ffcf8027bea5b64bb201c Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:59:46 -0600 Subject: [PATCH 073/401] Update versionbits.cpp --- src/versionbits.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index f0f2f30aa220..e41d58f1615c 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -268,12 +268,13 @@ int ThresholdNew(const Consensus::Params& params, int nAttempt) const override void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) { int maxtip = pindex->nHeight; + const CBlockIndex* currentIndex = pindex; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); - for (int startheight = 1; startheight < maxtip; startheight++) { + for (int startheight = maxtip; startheight < 1; startheight--) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - pindex = (pindex->nHeight + 1); + currentIndex = (currentIndex->pprev); assert(cache.count(pindex)); ThresholdState stateNext = cache[pindex]; From 7221e2181e79eabe98c872f8b45011716421f655 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:05:40 -0600 Subject: [PATCH 074/401] Update versionbits.cpp --- src/versionbits.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index e41d58f1615c..8aeb668a9233 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -274,6 +274,7 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); for (int startheight = maxtip; startheight < 1; startheight--) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); + LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip; currentIndex = (currentIndex->pprev); assert(cache.count(pindex)); From 01c4ee5b7a202af95b8074294cfbb91bd11cf541 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:06:34 -0600 Subject: [PATCH 075/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 8aeb668a9233..f2f2cbf80c82 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -274,7 +274,7 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); for (int startheight = maxtip; startheight < 1; startheight--) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip; + LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); currentIndex = (currentIndex->pprev); assert(cache.count(pindex)); From c43a33204a90accd28367b930f4fc9ac8b7a9fbb Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:09:47 -0600 Subject: [PATCH 076/401] Update versionbits.cpp --- src/versionbits.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index f2f2cbf80c82..44112523b124 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -272,6 +272,8 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); + LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); + LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); for (int startheight = maxtip; startheight < 1; startheight--) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); From f5921f3277b4b48539f102c9d2d9bb910135e567 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:16:53 -0600 Subject: [PATCH 077/401] Update versionbits.cpp --- src/versionbits.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 44112523b124..e61a515d919e 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -274,13 +274,13 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); - for (int startheight = maxtip; startheight < 1; startheight--) { + for (int startheight = 1; startheight < maxtip; startheight++) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); - currentIndex = (currentIndex->pprev); + currentIndex = (currentIndex->nHeight + 1); - assert(cache.count(pindex)); - ThresholdState stateNext = cache[pindex]; + assert(cache.count(currentIndex)); + ThresholdState stateNext = cache[currentIndex]; // stateNext = ThresholdNew(params, pindex->nHeight); cache[pindex] = stateNext; From b5ad7e2e7cda1e128fc4df49f5b65e82091c9212 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:42:45 -0600 Subject: [PATCH 078/401] Update versionbits.cpp --- src/versionbits.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index e61a515d919e..1502bf0f4202 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -274,10 +274,11 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); + for (int startheight = 1; startheight < maxtip; startheight++) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); - currentIndex = (currentIndex->nHeight + 1); + currentIndex = (pindex->nHeight + 1); assert(cache.count(currentIndex)); ThresholdState stateNext = cache[currentIndex]; From 00fc8759ebd3a21cf06cf78934ede60b16cb4a71 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:46:01 -0600 Subject: [PATCH 079/401] Update versionbits.cpp --- src/versionbits.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 1502bf0f4202..3d33155db7cb 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -275,12 +275,12 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); - for (int startheight = 1; startheight < maxtip; startheight++) { + for (int startheight = 1; startheight <= maxtip; startheight++) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); - currentIndex = (pindex->nHeight + 1); +// pindex = (pindex->nHeight + 1); - assert(cache.count(currentIndex)); + assert(cache.count(pindex)); ThresholdState stateNext = cache[currentIndex]; // stateNext = ThresholdNew(params, pindex->nHeight); From 8b1f8e6cbbead1915a3e853b4ece083cf17da025 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:49:43 -0600 Subject: [PATCH 080/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 3d33155db7cb..ffb95897e4ee 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -281,7 +281,7 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) // pindex = (pindex->nHeight + 1); assert(cache.count(pindex)); - ThresholdState stateNext = cache[currentIndex]; + ThresholdState stateNext = cache[pindex]; // stateNext = ThresholdNew(params, pindex->nHeight); cache[pindex] = stateNext; From 94f979a7a4affc20d8f88522c83e3eae68a893a3 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:53:19 -0600 Subject: [PATCH 081/401] Update versionbits.cpp --- src/versionbits.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index ffb95897e4ee..f115e3e57b4d 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -281,8 +281,10 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) // pindex = (pindex->nHeight + 1); assert(cache.count(pindex)); + LogPrint(BCLog::BENCHMARK, "past asset"); ThresholdState stateNext = cache[pindex]; - + LogPrint(BCLog::BENCHMARK, "past threshold"); + // stateNext = ThresholdNew(params, pindex->nHeight); cache[pindex] = stateNext; } From b9bdefdf48c657e7d7c80cc7d6a19d074ba12b48 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 08:19:01 -0600 Subject: [PATCH 082/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index f115e3e57b4d..e4fe920339bc 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -280,7 +280,7 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); // pindex = (pindex->nHeight + 1); - assert(cache.count(pindex)); +// assert(cache.count(pindex)); LogPrint(BCLog::BENCHMARK, "past asset"); ThresholdState stateNext = cache[pindex]; LogPrint(BCLog::BENCHMARK, "past threshold"); From 991af939ddd0547accd5083970ee9a144871f0d5 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:19:37 -0600 Subject: [PATCH 083/401] ... --- src/versionbits.cpp | 9 +++++---- src/versionbits.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index e4fe920339bc..6b2c57eeb500 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -265,7 +265,7 @@ int ThresholdNew(const Consensus::Params& params, int nAttempt) const override } */ -void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) +void PreLoadCacheBits(const CBlockIndex* pindex, VersionBitsCache& cache) { int maxtip = pindex->nHeight; const CBlockIndex* currentIndex = pindex; @@ -275,12 +275,13 @@ void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache) LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); - for (int startheight = 1; startheight <= maxtip; startheight++) { - LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); + for (int startheight = maxtip; startheight >= 1; startheight--) { + LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", startheight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); + pindex = pindex->GetAncestor(pindex->nHeight); // pindex = (pindex->nHeight + 1); -// assert(cache.count(pindex)); + assert(cache.count(pindex)); LogPrint(BCLog::BENCHMARK, "past asset"); ThresholdState stateNext = cache[pindex]; LogPrint(BCLog::BENCHMARK, "past threshold"); diff --git a/src/versionbits.h b/src/versionbits.h index a229390d8bfa..9d33f2292d0f 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -89,6 +89,6 @@ BIP9Stats VersionBitsStatistics(const CBlockIndex* pindexPrev, const Consensus:: int VersionBitsStateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); uint32_t VersionBitsMask(const Consensus::Params& params, Consensus::DeploymentPos pos); -void PreLoadCacheBits(const CBlockIndex* pindex, ThresholdConditionCache& cache); +void PreLoadCacheBits(const CBlockIndex* pindex, VersionBitsCache& cache); #endif // BITCOIN_VERSIONBITS_H From 8fa3c3a75fffaafaa9f5efd77fab33cd2bdb766c Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:17:55 -0600 Subject: [PATCH 084/401] Update versionbits.cpp --- src/versionbits.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 6b2c57eeb500..3e0f47f60a71 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -265,16 +265,38 @@ int ThresholdNew(const Consensus::Params& params, int nAttempt) const override } */ -void PreLoadCacheBits(const CBlockIndex* pindex, VersionBitsCache& cache) +void PreLoadCacheBits(const CBlockIndex* pindexPrev, VersionBitsCache& cache) { int maxtip = pindex->nHeight; - const CBlockIndex* currentIndex = pindex; + const CBlockIndex* currentIndex = pindexPrev; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); + // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known + std::vector vToCompute; + while (cache.count(pindexPrev) == 0) { + if (pindexPrev == nullptr) { + // The genesis block is by definition defined. + cache[pindexPrev] = ThresholdState::DEFINED; + break; + } + if (pindexPrev->GetMedianTimePast() < nTimeStart) { + // Optimization: don't recompute down further, as we know every earlier block will be before the start time + cache[pindexPrev] = ThresholdState::DEFINED; + break; + } + vToCompute.push_back(pindexPrev); + assert(cache.count(pindexPrev)); + LogPrint(BCLog::BENCHMARK, "past asset"); + ThresholdState stateNext = cache[pindexPrev]; + LogPrint(BCLog::BENCHMARK, "past threshold"); + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); + } + +/* for (int startheight = maxtip; startheight >= 1; startheight--) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", startheight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); @@ -290,6 +312,7 @@ void PreLoadCacheBits(const CBlockIndex* pindex, VersionBitsCache& cache) cache[pindex] = stateNext; } } +*/ preloadedchain = true; } From 15a3671999dda0adeb0b248a4d4a1f09d274bfa2 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:19:28 -0600 Subject: [PATCH 085/401] Update validation.cpp --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 3e6270433cd0..42e52467da7d 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2590,7 +2590,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar const CBlockIndex* pindex = pindexNew; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { - if (!preloadedchain) PreLoadCacheBits(pindex, warningcache[bit]); + if (!preloadedchain) ThresholdState state = PreLoadCacheBits(pindex, warningcache[bit]); WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); From fb1f2455b5f0235cb0087f1301e0805af48ae01b Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:22:31 -0600 Subject: [PATCH 086/401] Update validation.cpp --- src/validation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/validation.cpp b/src/validation.cpp index 42e52467da7d..603bd5e74481 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2590,8 +2590,11 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar const CBlockIndex* pindex = pindexNew; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { + WarningBitsConditionChecker checker(bit); + if (!preloadedchain) ThresholdState state = PreLoadCacheBits(pindex, warningcache[bit]); +// WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); if (state == ThresholdState::ACTIVE || state == ThresholdState::LOCKED_IN) { From 28e0ed647da7135a5a13ea172e7d8e1f51ad273e Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:44:51 -0600 Subject: [PATCH 087/401] ... --- src/validation.cpp | 5 +- src/versionbits.cpp | 127 ++++++++++++++++++++++++++++++++++++++++++-- src/versionbits.h | 4 ++ 3 files changed, 130 insertions(+), 6 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 603bd5e74481..87858b54fac3 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2592,10 +2592,9 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar WarningBitsConditionChecker checker(bit); - if (!preloadedchain) ThresholdState state = PreLoadCacheBits(pindex, warningcache[bit]); + if (!preloadedchain) ThresholdState state = check.GetStateForCacheBuild(pindex, warningcache[bit]); -// - WarningBitsConditionChecker checker(bit); +// WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); if (state == ThresholdState::ACTIVE || state == ThresholdState::LOCKED_IN) { const std::string strWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)").translated, bit); diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 3e0f47f60a71..162c9645d136 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -116,6 +116,123 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* return state; } +ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const +{ + int nPeriod = Period(params); + int64_t nTimeStart = BeginTime(params); + int64_t nTimeTimeout = EndTime(params); + int min_activation_height = MinActivationHeight(params); + + + LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); + +/* + // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. + if (pindexPrev != nullptr) { + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - ((pindexPrev->nHeight + 1) % nPeriod)); + } +*/ + + // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known + std::vector vToCompute; + while (cache.count(pindexPrev) == 0) { + if (pindexPrev == nullptr) { + // The genesis block is by definition defined. + cache[pindexPrev] = ThresholdState::DEFINED; + break; + } + if (pindexPrev->GetMedianTimePast() < nTimeStart) { + // Optimization: don't recompute down further, as we know every earlier block will be before the start time + cache[pindexPrev] = ThresholdState::DEFINED; + break; + } + vToCompute.push_back(pindexPrev); + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); + + LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); + } + + preloadedchain = true; + + +/* + // At this point, cache[pindexPrev] is known + assert(cache.count(pindexPrev)); + ThresholdState state = cache[pindexPrev]; + + int nStartHeight{std::numeric_limits::max()}; + for (const auto& pair : cache) { + if (pair.second == ThresholdState::STARTED && nStartHeight > pair.first->nHeight + 1) { + nStartHeight = pair.first->nHeight + 1; + } + } + + + // Now walk forward and compute the state of descendants of pindexPrev + while (!vToCompute.empty()) { + ThresholdState stateNext = state; + pindexPrev = vToCompute.back(); + vToCompute.pop_back(); + + switch (state) { + case ThresholdState::DEFINED: { + if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) { + stateNext = ThresholdState::FAILED; + } else if (pindexPrev->GetMedianTimePast() >= nTimeStart) { + stateNext = ThresholdState::STARTED; + nStartHeight = pindexPrev->nHeight + 1; + } + break; + } + case ThresholdState::STARTED: { + if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) { + stateNext = ThresholdState::FAILED; + break; + } + + // We need to count + const CBlockIndex* pindexCount = pindexPrev; + int count = 0; + for (int i = 0; i < nPeriod; i++) { + if (Condition(pindexCount, params)) { + count++; + } + pindexCount = pindexCount->pprev; + } + + assert(nStartHeight > 0 && nStartHeight < std::numeric_limits::max()); + int nAttempt = (pindexCount->nHeight + 1 - nStartHeight) / nPeriod; + int nThreshold = Threshold(params, nAttempt); + if (count >= nThreshold) { + stateNext = ThresholdState::LOCKED_IN; + } else if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) { + stateNext = ThresholdState::FAILED; + } + break; + } + case ThresholdState::LOCKED_IN: { + // Always progresses into ACTIVE. + // stateNext = ThresholdState::ACTIVE; + + if (pindexPrev->nHeight + 1 >= min_activation_height) { + stateNext = ThresholdState::ACTIVE; + } + + break; + } + case ThresholdState::FAILED: + case ThresholdState::ACTIVE: { + // Nothing happens, these are terminal states. + break; + } + } + cache[pindexPrev] = state = stateNext; + } + + return state; +*/ +} + BIP9Stats AbstractThresholdConditionChecker::GetStateStatisticsFor(const CBlockIndex* pindex, const Consensus::Params& params, ThresholdConditionCache& cache) const { BIP9Stats stats = {}; @@ -249,6 +366,11 @@ void VersionBitsCache::Clear() } } +ThresholdState VersionBitsStateBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) +{ + return VersionBitsConditionChecker(pos).GetStateForBuildCache(pindexPrev, params, cache.caches[pos]); +} + /* int ThresholdNew(const Consensus::Params& params, int nAttempt) const override { @@ -265,6 +387,7 @@ int ThresholdNew(const Consensus::Params& params, int nAttempt) const override } */ +/* void PreLoadCacheBits(const CBlockIndex* pindexPrev, VersionBitsCache& cache) { int maxtip = pindex->nHeight; @@ -296,7 +419,6 @@ void PreLoadCacheBits(const CBlockIndex* pindexPrev, VersionBitsCache& cache) pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); } -/* for (int startheight = maxtip; startheight >= 1; startheight--) { LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", startheight); LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); @@ -312,8 +434,7 @@ void PreLoadCacheBits(const CBlockIndex* pindexPrev, VersionBitsCache& cache) cache[pindex] = stateNext; } } -*/ - preloadedchain = true; } +*/ \ No newline at end of file diff --git a/src/versionbits.h b/src/versionbits.h index 9d33f2292d0f..92bc8ea99bbe 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -73,6 +73,8 @@ class AbstractThresholdConditionChecker { ThresholdState GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const; /** Returns the height since when the ThresholdState has started for pindex A based on parent pindexPrev B, all blocks of a period share the same */ int GetStateSinceHeightFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const; + + ThresholdState GetStateForBuildCache(const CBlockIndex* pindexPrev, ThresholdConditionCache& cache) const; }; /** BIP 9 allows multiple softforks to be deployed in parallel. We cache per-period state for every one of them @@ -84,6 +86,8 @@ struct VersionBitsCache void Clear(); }; +ThresholdState VersionBitsStateBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); + ThresholdState VersionBitsState(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); BIP9Stats VersionBitsStatistics(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); int VersionBitsStateSinceHeight(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); From cc9beeb380d612d6e11f37b24688db98814a5557 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:48:42 -0600 Subject: [PATCH 088/401] Update validation.cpp --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 87858b54fac3..3fe0260e36e4 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2592,7 +2592,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar WarningBitsConditionChecker checker(bit); - if (!preloadedchain) ThresholdState state = check.GetStateForCacheBuild(pindex, warningcache[bit]); + if (!preloadedchain) ThresholdState state = checker.GetStateForBuildCache(pindex, chainParams.GetConsensus(), warningcache[bit]); // WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); From daaacbabed265f3a8f84dfb7219668ec47665b6a Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:56:01 -0600 Subject: [PATCH 089/401] Update versionbits.h --- src/versionbits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.h b/src/versionbits.h index 92bc8ea99bbe..ced5b4d7392a 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -74,7 +74,7 @@ class AbstractThresholdConditionChecker { /** Returns the height since when the ThresholdState has started for pindex A based on parent pindexPrev B, all blocks of a period share the same */ int GetStateSinceHeightFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const; - ThresholdState GetStateForBuildCache(const CBlockIndex* pindexPrev, ThresholdConditionCache& cache) const; + ThresholdState GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const; }; /** BIP 9 allows multiple softforks to be deployed in parallel. We cache per-period state for every one of them From af62d703e50528cce07bbfd5bceb9fb413be5b53 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:02:35 -0600 Subject: [PATCH 090/401] Update versionbits.cpp --- src/versionbits.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 162c9645d136..230c6cbb3b19 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -118,13 +118,15 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { + int maxtip = pindex->nHeight; + int nPeriod = Period(params); int64_t nTimeStart = BeginTime(params); int64_t nTimeTimeout = EndTime(params); int min_activation_height = MinActivationHeight(params); - LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); +// LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); /* // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. @@ -135,7 +137,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known std::vector vToCompute; - while (cache.count(pindexPrev) == 0) { + while (cache.count(pindexPrev) != maxtip) { if (pindexPrev == nullptr) { // The genesis block is by definition defined. cache[pindexPrev] = ThresholdState::DEFINED; @@ -150,6 +152,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); + assert(cache.count(pindexPrev)); } preloadedchain = true; From 507e4a4b4fd96e10656b2584b14dbfd3dccc0b49 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:03:22 -0600 Subject: [PATCH 091/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 230c6cbb3b19..979cd5a3373c 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -118,7 +118,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { - int maxtip = pindex->nHeight; + int maxtip = pindexPrev->nHeight; int nPeriod = Period(params); int64_t nTimeStart = BeginTime(params); From b70af4a6687082ab00d2f8cdc10c9402f66c2e5d Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:07:01 -0600 Subject: [PATCH 092/401] Update versionbits.cpp --- src/versionbits.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 979cd5a3373c..f34d33a938dc 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -118,15 +118,13 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { - int maxtip = pindexPrev->nHeight; - int nPeriod = Period(params); int64_t nTimeStart = BeginTime(params); int64_t nTimeTimeout = EndTime(params); int min_activation_height = MinActivationHeight(params); -// LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); + LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); /* // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. @@ -137,17 +135,14 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known std::vector vToCompute; - while (cache.count(pindexPrev) != maxtip) { + while (cache.count(pindexPrev) == 1) { if (pindexPrev == nullptr) { // The genesis block is by definition defined. - cache[pindexPrev] = ThresholdState::DEFINED; - break; - } - if (pindexPrev->GetMedianTimePast() < nTimeStart) { - // Optimization: don't recompute down further, as we know every earlier block will be before the start time - cache[pindexPrev] = ThresholdState::DEFINED; break; } +// if (pindexPrev->GetMedianTimePast() < nTimeStart) { +// break; +// } vToCompute.push_back(pindexPrev); pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); From 5ee72ccb0ba603ca58dc298abcc46fba578d84e1 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:12:13 -0600 Subject: [PATCH 093/401] Update versionbits.cpp --- src/versionbits.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index f34d33a938dc..c701b85bb79c 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -135,7 +135,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known std::vector vToCompute; - while (cache.count(pindexPrev) == 1) { + while (cache.count(pindexPrev) == 0) { if (pindexPrev == nullptr) { // The genesis block is by definition defined. break; @@ -147,6 +147,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); + if (pindexPrev->nHeight == 1) { break; } assert(cache.count(pindexPrev)); } From baf88d5f522a40c05ee0eb6951f3f681058fb8a6 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:19:35 -0600 Subject: [PATCH 094/401] Update versionbits.cpp --- src/versionbits.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index c701b85bb79c..59e5ef780fc0 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -124,7 +124,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB int min_activation_height = MinActivationHeight(params); - LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); +// LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); /* // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. @@ -147,8 +147,11 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); - if (pindexPrev->nHeight == 1) { break; } + assert(cache.count(pindexPrev)); + ThresholdState state = cache[pindexxPrev]; + + if (pindexPrev->nHeight == 1) { break; } } preloadedchain = true; From b56f0ad2ad6109bf430ed6f6a02c751cae5db930 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:20:12 -0600 Subject: [PATCH 095/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 59e5ef780fc0..72d0a8f8dda9 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -149,7 +149,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); assert(cache.count(pindexPrev)); - ThresholdState state = cache[pindexxPrev]; + ThresholdState state = cache[pindexPrev]; if (pindexPrev->nHeight == 1) { break; } } From 8ffac013e1433cb657e73a8917c42a98d6fbe2ec Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:23:09 -0600 Subject: [PATCH 096/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 72d0a8f8dda9..484ec225b418 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -148,7 +148,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); - assert(cache.count(pindexPrev)); +// assert(cache.count(pindexPrev)); ThresholdState state = cache[pindexPrev]; if (pindexPrev->nHeight == 1) { break; } From 723e4c2f432ef1a9ac301031f824412249c5659b Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:28:47 -0600 Subject: [PATCH 097/401] Update versionbits.cpp --- src/versionbits.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 484ec225b418..2462a0c3340e 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -150,7 +150,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // assert(cache.count(pindexPrev)); ThresholdState state = cache[pindexPrev]; - + cache[pindexPrev] = state; + if (pindexPrev->nHeight == 1) { break; } } From f0bfbda32c15f0b454d607386e776c0169734a61 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:34:16 -0600 Subject: [PATCH 098/401] Update versionbits.cpp --- src/versionbits.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 2462a0c3340e..a1c706050d1f 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -135,7 +135,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known std::vector vToCompute; - while (cache.count(pindexPrev) == 0) { + while (!vToCompute.empty()) { if (pindexPrev == nullptr) { // The genesis block is by definition defined. break; @@ -149,8 +149,9 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); // assert(cache.count(pindexPrev)); - ThresholdState state = cache[pindexPrev]; - cache[pindexPrev] = state; + +// ThresholdState state = cache[pindexPrev]; + cache[pindexPrev] = pindexPrev; if (pindexPrev->nHeight == 1) { break; } } From dc61f0dc656b1dcb7a594da49d2db4e40f471a41 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:35:16 -0600 Subject: [PATCH 099/401] Update versionbits.cpp --- src/versionbits.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index a1c706050d1f..8ebd0f1b0526 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -149,9 +149,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); // assert(cache.count(pindexPrev)); - -// ThresholdState state = cache[pindexPrev]; - cache[pindexPrev] = pindexPrev; + ThresholdState state = cache[pindexPrev]; + cache[pindexPrev] = state; if (pindexPrev->nHeight == 1) { break; } } From 40117506db9b2ae724b3ec466ab5ce290561eb59 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:39:20 -0600 Subject: [PATCH 100/401] Update versionbits.cpp --- src/versionbits.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 8ebd0f1b0526..51133a44a73f 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -135,7 +135,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known std::vector vToCompute; - while (!vToCompute.empty()) { + while (cache.count(pindexPrev) == 0) { if (pindexPrev == nullptr) { // The genesis block is by definition defined. break; @@ -149,8 +149,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); // assert(cache.count(pindexPrev)); - ThresholdState state = cache[pindexPrev]; - cache[pindexPrev] = state; +// ThresholdState state = cache[pindexPrev]; +// cache[pindexPrev] = state; if (pindexPrev->nHeight == 1) { break; } } From 73ed902afdc18411a40e86e55e0c36de2bc0a8e2 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:42:35 -0600 Subject: [PATCH 101/401] Update versionbits.cpp --- src/versionbits.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 51133a44a73f..52bddccf561f 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -144,6 +144,9 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // break; // } vToCompute.push_back(pindexPrev); + + if (pindexPrev->nHeight == 1) { break; } + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); @@ -152,7 +155,6 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // ThresholdState state = cache[pindexPrev]; // cache[pindexPrev] = state; - if (pindexPrev->nHeight == 1) { break; } } preloadedchain = true; From 6b4b696406cd092189771516c178f143236e44dc Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:02:19 -0600 Subject: [PATCH 102/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 52bddccf561f..18cfd3a0ad76 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -151,7 +151,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); -// assert(cache.count(pindexPrev)); + assert(cache.count(pindexPrev)); // ThresholdState state = cache[pindexPrev]; // cache[pindexPrev] = state; From 0e8ba70aebcc6853d395a42020e9652e0e45a271 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:05:34 -0600 Subject: [PATCH 103/401] Update versionbits.cpp --- src/versionbits.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 18cfd3a0ad76..ff1b30318099 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -151,9 +151,9 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); - assert(cache.count(pindexPrev)); +// assert(cache.count(pindexPrev)); // ThresholdState state = cache[pindexPrev]; -// cache[pindexPrev] = state; + cache[pindexPrev] = Threshold(params, vToCompute); } From e63a4564a77cd718721a051435412e9e4c383c49 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:56:21 -0600 Subject: [PATCH 104/401] Update versionbits.cpp --- src/versionbits.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index ff1b30318099..4acf7139ea74 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -135,6 +135,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known std::vector vToCompute; + int maxtip = pindex->nHeight; + while (cache.count(pindexPrev) == 0) { if (pindexPrev == nullptr) { // The genesis block is by definition defined. @@ -144,6 +146,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // break; // } vToCompute.push_back(pindexPrev); + maxtip = maxtip -1; if (pindexPrev->nHeight == 1) { break; } @@ -153,7 +156,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // assert(cache.count(pindexPrev)); // ThresholdState state = cache[pindexPrev]; - cache[pindexPrev] = Threshold(params, vToCompute); + cache[pindexPrev] = Threshold(params, maxtip); } From efcd6a99ffffe9416cebe0604de3435532f10885 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:57:37 -0600 Subject: [PATCH 105/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 4acf7139ea74..1cb5f4589f9f 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -135,7 +135,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known std::vector vToCompute; - int maxtip = pindex->nHeight; + int maxtip = pindexPrev->nHeight; while (cache.count(pindexPrev) == 0) { if (pindexPrev == nullptr) { From ede94d30cba9454078ef84434ec98385c9a1c3bb Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:02:27 -0600 Subject: [PATCH 106/401] Update versionbits.cpp --- src/versionbits.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 1cb5f4589f9f..8132e109f589 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -155,8 +155,9 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); // assert(cache.count(pindexPrev)); -// ThresholdState state = cache[pindexPrev]; - cache[pindexPrev] = Threshold(params, maxtip); + ThresholdState state = cache[pindexPrev]; + ThresholdState stateNext = state; + cache[pindexPrev] = state = stateNext; } From 915e527a456b447bb7977663085a93edb40b79e8 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:07:45 -0600 Subject: [PATCH 107/401] Update versionbits.cpp --- src/versionbits.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 8132e109f589..aa64cd6f78aa 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -137,6 +137,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB std::vector vToCompute; int maxtip = pindexPrev->nHeight; + ThresholdState state = cache[pindexPrev]; + while (cache.count(pindexPrev) == 0) { if (pindexPrev == nullptr) { // The genesis block is by definition defined. @@ -146,7 +148,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // break; // } vToCompute.push_back(pindexPrev); - maxtip = maxtip -1; + maxtip = maxtip - 1; if (pindexPrev->nHeight == 1) { break; } @@ -155,7 +157,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); // assert(cache.count(pindexPrev)); - ThresholdState state = cache[pindexPrev]; +// ThresholdState state = cache[pindexPrev]; ThresholdState stateNext = state; cache[pindexPrev] = state = stateNext; From 09bb3a25e40811edcc9a0e121162230245167915 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:13:46 -0600 Subject: [PATCH 108/401] Update versionbits.cpp --- src/versionbits.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index aa64cd6f78aa..f771f8c4a599 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -147,12 +147,12 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // if (pindexPrev->GetMedianTimePast() < nTimeStart) { // break; // } - vToCompute.push_back(pindexPrev); - maxtip = maxtip - 1; + pindexPrev = vToCompute.back(pindexPrev); +// maxtip = maxtip - 1; if (pindexPrev->nHeight == 1) { break; } - pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); +// pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); From 37b19947a90f5f903bab2c81ccec0904322c8f37 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:36:52 -0600 Subject: [PATCH 109/401] Update versionbits.cpp --- src/versionbits.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index f771f8c4a599..7d571f3b675a 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -118,11 +118,6 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { - int nPeriod = Period(params); - int64_t nTimeStart = BeginTime(params); - int64_t nTimeTimeout = EndTime(params); - int min_activation_height = MinActivationHeight(params); - // LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); @@ -137,27 +132,28 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB std::vector vToCompute; int maxtip = pindexPrev->nHeight; - ThresholdState state = cache[pindexPrev]; while (cache.count(pindexPrev) == 0) { - if (pindexPrev == nullptr) { + state = nullptr; + if (pindexPrev == nullptr) { // The genesis block is by definition defined. break; } // if (pindexPrev->GetMedianTimePast() < nTimeStart) { // break; // } - pindexPrev = vToCompute.back(pindexPrev); +// pindexPrev = vToCompute.back(pindexPrev); // maxtip = maxtip - 1; if (pindexPrev->nHeight == 1) { break; } -// pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); // assert(cache.count(pindexPrev)); // ThresholdState state = cache[pindexPrev]; + ThresholdState state = cache[pindexPrev]; ThresholdState stateNext = state; cache[pindexPrev] = state = stateNext; From 2d9626640f6106a8917df5d8ee07149a0384c859 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:38:30 -0600 Subject: [PATCH 110/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 7d571f3b675a..da52af00b45f 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -134,7 +134,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB while (cache.count(pindexPrev) == 0) { - state = nullptr; + ThresholdState state = nullptr; if (pindexPrev == nullptr) { // The genesis block is by definition defined. break; From 9782d26f4d2fb9074f0ec1598292bc9dfddcca7d Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:40:13 -0600 Subject: [PATCH 111/401] Update versionbits.cpp --- src/versionbits.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index da52af00b45f..7ab6f31258b5 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -134,8 +134,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB while (cache.count(pindexPrev) == 0) { - ThresholdState state = nullptr; - if (pindexPrev == nullptr) { + if (pindexPrev == nullptr) { // The genesis block is by definition defined. break; } @@ -147,7 +146,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB if (pindexPrev->nHeight == 1) { break; } - pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); + pindexPrev = pindexPrev->nHeight(pindexPrev->nHeight - 1); LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); From 7e7b4a1044d9100f4b364f9605b91d62b6dc1bce Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:55:10 -0600 Subject: [PATCH 112/401] Update versionbits.cpp --- src/versionbits.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 7ab6f31258b5..e75ca5bd7a4a 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -146,15 +146,16 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB if (pindexPrev->nHeight == 1) { break; } - pindexPrev = pindexPrev->nHeight(pindexPrev->nHeight - 1); + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); // assert(cache.count(pindexPrev)); // ThresholdState state = cache[pindexPrev]; - ThresholdState state = cache[pindexPrev]; - ThresholdState stateNext = state; - cache[pindexPrev] = state = stateNext; +// ThresholdState state = cache[pindexPrev]; +// ThresholdState stateNext = state; + if (pindexPrev->nVersion == 0) { break; } + cache[pindexPrev] = pindexPrev->nVersion; } From 7dbd365b6dac1d692198d83f9912849f6e91564a Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:57:13 -0600 Subject: [PATCH 113/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index e75ca5bd7a4a..983295b3426b 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -155,7 +155,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // ThresholdState state = cache[pindexPrev]; // ThresholdState stateNext = state; if (pindexPrev->nVersion == 0) { break; } - cache[pindexPrev] = pindexPrev->nVersion; + cache[pindexPrev] = pindexPrev; } From 56d4f28078491e17f9e47a0d19ebb761faf0cc21 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:05:21 -0600 Subject: [PATCH 114/401] Update versionbits.cpp --- src/versionbits.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 983295b3426b..9bd827474a04 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -132,12 +132,25 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB std::vector vToCompute; int maxtip = pindexPrev->nHeight; - while (cache.count(pindexPrev) == 0) { if (pindexPrev == nullptr) { // The genesis block is by definition defined. + cache[pindexPrev] = ThresholdState::DEFINED; break; } + vToCompute.push_back(pindexPrev); + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight); + } + + // At this point, cache[pindexPrev] is known + assert(cache.count(pindexPrev)); + ThresholdState state = cache[pindexPrev]; + + while (!vToCompute.empty) { + ThresholdState stateNext = state; + pindexPrev = vToCompute.back(); + vToCompute.pop_back(); + // if (pindexPrev->GetMedianTimePast() < nTimeStart) { // break; // } @@ -146,7 +159,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB if (pindexPrev->nHeight == 1) { break; } - pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); +// pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); @@ -155,7 +168,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // ThresholdState state = cache[pindexPrev]; // ThresholdState stateNext = state; if (pindexPrev->nVersion == 0) { break; } - cache[pindexPrev] = pindexPrev; + cache[pindexPrev] = state; } From 54d1cd5ca18739ebcb28efafb2d667dce13c3f8c Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:06:07 -0600 Subject: [PATCH 115/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 9bd827474a04..9210a833834c 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -146,7 +146,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB assert(cache.count(pindexPrev)); ThresholdState state = cache[pindexPrev]; - while (!vToCompute.empty) { + while (!vToCompute.empty()) { ThresholdState stateNext = state; pindexPrev = vToCompute.back(); vToCompute.pop_back(); From c2fd3246e1e59e0e732eee5bf1198757573c841e Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:17:08 -0600 Subject: [PATCH 116/401] Update versionbits.cpp --- src/versionbits.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 9210a833834c..6272886afbbe 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -133,13 +133,13 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB int maxtip = pindexPrev->nHeight; while (cache.count(pindexPrev) == 0) { - if (pindexPrev == nullptr) { - // The genesis block is by definition defined. - cache[pindexPrev] = ThresholdState::DEFINED; - break; - } +// if (pindexPrev == nullptr) { +// // The genesis block is by definition defined. +// cache[pindexPrev] = ThresholdState::DEFINED; +// break; +// } vToCompute.push_back(pindexPrev); - pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight); + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight) - 1; } // At this point, cache[pindexPrev] is known From 0d22e84f7c8b557ef16b0089907eba544ec6260e Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:20:20 -0600 Subject: [PATCH 117/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 6272886afbbe..c0645e7bb0e6 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -139,7 +139,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // break; // } vToCompute.push_back(pindexPrev); - pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight) - 1; + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); } // At this point, cache[pindexPrev] is known From 32f018f561914375ae799389a608a6a27b86c231 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:26:38 -0600 Subject: [PATCH 118/401] Update versionbits.cpp --- src/versionbits.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index c0645e7bb0e6..8ac422f116c3 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -133,11 +133,11 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB int maxtip = pindexPrev->nHeight; while (cache.count(pindexPrev) == 0) { -// if (pindexPrev == nullptr) { -// // The genesis block is by definition defined. -// cache[pindexPrev] = ThresholdState::DEFINED; -// break; -// } + if (pindexPrev == nullptr) { + // The genesis block is by definition defined. + cache[pindexPrev] = ThresholdState::DEFINED; + break; + } vToCompute.push_back(pindexPrev); pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); } From 804cf0057f9572aaccbe85d3c495bb6c13b1c244 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:29:49 -0600 Subject: [PATCH 119/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 8ac422f116c3..9788c8bfeaed 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -157,7 +157,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // pindexPrev = vToCompute.back(pindexPrev); // maxtip = maxtip - 1; - if (pindexPrev->nHeight == 1) { break; } + if (pindexPrev->nHeight == 0 || or pindex->nHeight == 1) { break; } // pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); From fa7641da63f98265832ebb8e81b2813cb2303e32 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:30:37 -0600 Subject: [PATCH 120/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 9788c8bfeaed..132847c6fdb4 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -157,7 +157,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // pindexPrev = vToCompute.back(pindexPrev); // maxtip = maxtip - 1; - if (pindexPrev->nHeight == 0 || or pindex->nHeight == 1) { break; } + if (pindexPrev->nHeight == 0 || pindex->nHeight == 1) { break; } // pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); From 12599ccd3f6d877660c31703dcb70b4c917fbecc Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:31:34 -0600 Subject: [PATCH 121/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 132847c6fdb4..5d47a8de6cbf 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -157,7 +157,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // pindexPrev = vToCompute.back(pindexPrev); // maxtip = maxtip - 1; - if (pindexPrev->nHeight == 0 || pindex->nHeight == 1) { break; } + if (pindexPrev->nHeight == 0 || pindexPrev->nHeight == 1) { break; } // pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); From 4f17ba28f96a13364cf5cedd6bbf5fca599bd101 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 18:26:33 -0600 Subject: [PATCH 122/401] Update versionbits.cpp --- src/versionbits.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 5d47a8de6cbf..d8e7bc45e5c9 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -139,6 +139,9 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB break; } vToCompute.push_back(pindexPrev); + + LogPrint(BCLog::BENCHMARK, "First Height: %s\n", pindexPrev->nHeight); + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); } @@ -151,6 +154,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = vToCompute.back(); vToCompute.pop_back(); + LogPrint(BCLog::BENCHMARK, "Second Height: %s\n", pindexPrev->nHeight); + // if (pindexPrev->GetMedianTimePast() < nTimeStart) { // break; // } @@ -161,8 +166,6 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); - LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); - // assert(cache.count(pindexPrev)); // ThresholdState state = cache[pindexPrev]; // ThresholdState state = cache[pindexPrev]; From b77fd47591420163dbefc2e576e185e8a232478d Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 18:28:03 -0600 Subject: [PATCH 123/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index d8e7bc45e5c9..e14d1376a8ce 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -177,7 +177,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB preloadedchain = true; - + return true; /* // At this point, cache[pindexPrev] is known assert(cache.count(pindexPrev)); From 97e91aebfa7ef6c3a7f07728d18e838d81a7e71a Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 18:32:27 -0600 Subject: [PATCH 124/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index e14d1376a8ce..83b6af597c4a 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -177,7 +177,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB preloadedchain = true; - return true; + return; /* // At this point, cache[pindexPrev] is known assert(cache.count(pindexPrev)); From d2e3ba46c2905768c71dd1681bc880e7b22efb78 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 18:33:26 -0600 Subject: [PATCH 125/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 83b6af597c4a..7128d7bec66c 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -177,7 +177,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB preloadedchain = true; - return; + return state; /* // At this point, cache[pindexPrev] is known assert(cache.count(pindexPrev)); From b44e213331fdf706e42a06d18fd91239dd6389fd Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 19:14:41 -0600 Subject: [PATCH 126/401] Update validation.cpp --- src/validation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/validation.cpp b/src/validation.cpp index 3fe0260e36e4..0176b521c0da 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2592,6 +2592,9 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar WarningBitsConditionChecker checker(bit); + LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); + + if (!preloadedchain) ThresholdState state = checker.GetStateForBuildCache(pindex, chainParams.GetConsensus(), warningcache[bit]); // WarningBitsConditionChecker checker(bit); From 9ee417c0ba5b15cb2256cd462be8032be4d0630c Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 19:50:31 -0600 Subject: [PATCH 127/401] Update versionbits.cpp --- src/versionbits.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 7128d7bec66c..e3a2c66439a2 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -140,7 +140,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB } vToCompute.push_back(pindexPrev); - LogPrint(BCLog::BENCHMARK, "First Height: %s\n", pindexPrev->nHeight); +// LogPrint(BCLog::BENCHMARK, "First Height: %s\n", pindexPrev->nHeight); pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); } @@ -171,7 +171,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // ThresholdState state = cache[pindexPrev]; // ThresholdState stateNext = state; if (pindexPrev->nVersion == 0) { break; } - cache[pindexPrev] = state; + cache[pindexPrev] = stateNext; } From 783370ce50c7baa52b9e5202f5c2178b91f35631 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 19:51:29 -0600 Subject: [PATCH 128/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index e3a2c66439a2..627003f74a70 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -171,7 +171,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // ThresholdState state = cache[pindexPrev]; // ThresholdState stateNext = state; if (pindexPrev->nVersion == 0) { break; } - cache[pindexPrev] = stateNext; + cache[pindexPrev] = state = stateNext; } From 958e5cecf794f3092fa21d8aa494aac8a3b64144 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:04:41 -0600 Subject: [PATCH 129/401] Update versionbits.cpp --- src/versionbits.cpp | 89 +-------------------------------------------- 1 file changed, 2 insertions(+), 87 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 627003f74a70..c4d1aa525392 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -119,15 +119,6 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { -// LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); - -/* - // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. - if (pindexPrev != nullptr) { - pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - ((pindexPrev->nHeight + 1) % nPeriod)); - } -*/ - // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known std::vector vToCompute; int maxtip = pindexPrev->nHeight; @@ -149,6 +140,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB assert(cache.count(pindexPrev)); ThresholdState state = cache[pindexPrev]; + LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); + while (!vToCompute.empty()) { ThresholdState stateNext = state; pindexPrev = vToCompute.back(); @@ -166,8 +159,6 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); -// assert(cache.count(pindexPrev)); -// ThresholdState state = cache[pindexPrev]; // ThresholdState state = cache[pindexPrev]; // ThresholdState stateNext = state; if (pindexPrev->nVersion == 0) { break; } @@ -178,82 +169,6 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB preloadedchain = true; return state; -/* - // At this point, cache[pindexPrev] is known - assert(cache.count(pindexPrev)); - ThresholdState state = cache[pindexPrev]; - - int nStartHeight{std::numeric_limits::max()}; - for (const auto& pair : cache) { - if (pair.second == ThresholdState::STARTED && nStartHeight > pair.first->nHeight + 1) { - nStartHeight = pair.first->nHeight + 1; - } - } - - - // Now walk forward and compute the state of descendants of pindexPrev - while (!vToCompute.empty()) { - ThresholdState stateNext = state; - pindexPrev = vToCompute.back(); - vToCompute.pop_back(); - - switch (state) { - case ThresholdState::DEFINED: { - if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) { - stateNext = ThresholdState::FAILED; - } else if (pindexPrev->GetMedianTimePast() >= nTimeStart) { - stateNext = ThresholdState::STARTED; - nStartHeight = pindexPrev->nHeight + 1; - } - break; - } - case ThresholdState::STARTED: { - if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) { - stateNext = ThresholdState::FAILED; - break; - } - - // We need to count - const CBlockIndex* pindexCount = pindexPrev; - int count = 0; - for (int i = 0; i < nPeriod; i++) { - if (Condition(pindexCount, params)) { - count++; - } - pindexCount = pindexCount->pprev; - } - - assert(nStartHeight > 0 && nStartHeight < std::numeric_limits::max()); - int nAttempt = (pindexCount->nHeight + 1 - nStartHeight) / nPeriod; - int nThreshold = Threshold(params, nAttempt); - if (count >= nThreshold) { - stateNext = ThresholdState::LOCKED_IN; - } else if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) { - stateNext = ThresholdState::FAILED; - } - break; - } - case ThresholdState::LOCKED_IN: { - // Always progresses into ACTIVE. - // stateNext = ThresholdState::ACTIVE; - - if (pindexPrev->nHeight + 1 >= min_activation_height) { - stateNext = ThresholdState::ACTIVE; - } - - break; - } - case ThresholdState::FAILED: - case ThresholdState::ACTIVE: { - // Nothing happens, these are terminal states. - break; - } - } - cache[pindexPrev] = state = stateNext; - } - - return state; -*/ } BIP9Stats AbstractThresholdConditionChecker::GetStateStatisticsFor(const CBlockIndex* pindex, const Consensus::Params& params, ThresholdConditionCache& cache) const From a4ad21432c6a9a4b04db033753306845afd4616e Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:06:58 -0600 Subject: [PATCH 130/401] Update versionbits.cpp --- src/versionbits.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index c4d1aa525392..c61dc72a2e74 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -136,6 +136,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); } + LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); + // At this point, cache[pindexPrev] is known assert(cache.count(pindexPrev)); ThresholdState state = cache[pindexPrev]; From 5e9ae5361c49b1cfeafc59359a13064f9e6df006 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:09:27 -0600 Subject: [PATCH 131/401] Update versionbits.cpp --- src/versionbits.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index c61dc72a2e74..fd09cb065f48 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -136,6 +136,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); } + LogPrint(BCLog::BENCHMARK, "Height: \n"); LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); // At this point, cache[pindexPrev] is known From a412385466991224e26e3e052179c1ea96b5ccd7 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:14:25 -0600 Subject: [PATCH 132/401] Update versionbits.cpp --- src/versionbits.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index fd09cb065f48..34c5d392ab31 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -137,7 +137,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB } LogPrint(BCLog::BENCHMARK, "Height: \n"); - LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); +// LogPrint(BCLog::BENCHMARK, "Height: %s\n", ); // At this point, cache[pindexPrev] is known assert(cache.count(pindexPrev)); @@ -150,7 +150,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = vToCompute.back(); vToCompute.pop_back(); - LogPrint(BCLog::BENCHMARK, "Second Height: %s\n", pindexPrev->nHeight); + LogPrint(BCLog::BENCHMARK, "Second Height: %s\n", vToCompute->nHeight); // if (pindexPrev->GetMedianTimePast() < nTimeStart) { // break; From d94464151bceef642c5be312c960b292a94399e6 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:14:49 -0600 Subject: [PATCH 133/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 34c5d392ab31..10b33bb97bb2 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -143,7 +143,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB assert(cache.count(pindexPrev)); ThresholdState state = cache[pindexPrev]; - LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); +// LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); while (!vToCompute.empty()) { ThresholdState stateNext = state; From 63f21b2d3bd7153f4d8a0547b8b120ec06cad3b2 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:16:16 -0600 Subject: [PATCH 134/401] Update versionbits.cpp --- src/versionbits.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 10b33bb97bb2..9dca52177ca2 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -150,7 +150,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = vToCompute.back(); vToCompute.pop_back(); - LogPrint(BCLog::BENCHMARK, "Second Height: %s\n", vToCompute->nHeight); + LogPrint(BCLog::BENCHMARK, "Second Height: %s\n"); // if (pindexPrev->GetMedianTimePast() < nTimeStart) { // break; @@ -158,13 +158,13 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // pindexPrev = vToCompute.back(pindexPrev); // maxtip = maxtip - 1; - if (pindexPrev->nHeight == 0 || pindexPrev->nHeight == 1) { break; } +// if (pindexPrev->nHeight == 0 || pindexPrev->nHeight == 1) { break; } // pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); // ThresholdState state = cache[pindexPrev]; // ThresholdState stateNext = state; - if (pindexPrev->nVersion == 0) { break; } +// if (pindexPrev->nVersion == 0) { break; } cache[pindexPrev] = state = stateNext; } From fdd30162746121433cf486535808ec1954a730c7 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:20:08 -0600 Subject: [PATCH 135/401] Update versionbits.cpp --- src/versionbits.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 9dca52177ca2..d7ecec3ec41e 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -145,12 +145,15 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // LogPrint(BCLog::BENCHMARK, "Height: %s\n", pindexPrev->nHeight); - while (!vToCompute.empty()) { + int counter = 1; + + while (!vToCompute.empty()) { ThresholdState stateNext = state; pindexPrev = vToCompute.back(); vToCompute.pop_back(); + counter = counter + 1; - LogPrint(BCLog::BENCHMARK, "Second Height: %s\n"); + LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); // if (pindexPrev->GetMedianTimePast() < nTimeStart) { // break; From 92d1d1bcb67a0de96cb5a0081a2facec3310824f Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:29:21 -0600 Subject: [PATCH 136/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index d7ecec3ec41e..22bfb873df2f 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -153,7 +153,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB vToCompute.pop_back(); counter = counter + 1; - LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); +// LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); // if (pindexPrev->GetMedianTimePast() < nTimeStart) { // break; From 6e450dd6a6554dce5cf0b580d1648ca633a48a2c Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:46:28 -0600 Subject: [PATCH 137/401] Update versionbits.cpp --- src/versionbits.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 22bfb873df2f..503b94285d3c 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -15,7 +15,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* int min_activation_height = MinActivationHeight(params); - LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); +// LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. if (pindexPrev != nullptr) { @@ -50,7 +50,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* } } - LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); +// LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); // Now walk forward and compute the state of descendants of pindexPrev while (!vToCompute.empty()) { @@ -136,7 +136,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); } - LogPrint(BCLog::BENCHMARK, "Height: \n"); +// LogPrint(BCLog::BENCHMARK, "Height: \n"); // LogPrint(BCLog::BENCHMARK, "Height: %s\n", ); // At this point, cache[pindexPrev] is known @@ -155,19 +155,6 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); -// if (pindexPrev->GetMedianTimePast() < nTimeStart) { -// break; -// } -// pindexPrev = vToCompute.back(pindexPrev); -// maxtip = maxtip - 1; - -// if (pindexPrev->nHeight == 0 || pindexPrev->nHeight == 1) { break; } - -// pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); - -// ThresholdState state = cache[pindexPrev]; -// ThresholdState stateNext = state; -// if (pindexPrev->nVersion == 0) { break; } cache[pindexPrev] = state = stateNext; } From aa25e155b2e63c30c8bd9a8c954aedf3840c02cf Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:00:05 -0600 Subject: [PATCH 138/401] ... --- src/validation.cpp | 6 +++++- src/versionbits.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 0176b521c0da..f14990816f07 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2595,7 +2595,11 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); - if (!preloadedchain) ThresholdState state = checker.GetStateForBuildCache(pindex, chainParams.GetConsensus(), warningcache[bit]); + if (!preloadedchain && preloadchaincounter < VERSIONBITS_NUM_BITS) { + ThresholdState state = checker.GetStateForBuildCache(pindex, chainParams.GetConsensus(), warningcache[bit]); + preloadchaincounter = preloadchaincounter + 1; + if (preloadedchain) preloadchaincounter=0; + } // WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); diff --git a/src/versionbits.h b/src/versionbits.h index ced5b4d7392a..658afcf43e1c 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -19,6 +19,7 @@ static const int32_t VERSIONBITS_NUM_BITS = 29; // static bool preloadedchain = false; +static int preloadchaincounter = 0; /** BIP 9 defines a finite-state-machine to deploy a softfork in multiple stages. * State transitions happen during retarget period if conditions are met From d36d9946feadc88eae85228e852d491c5a9debd2 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:20:17 -0600 Subject: [PATCH 139/401] ... --- src/validation.cpp | 3 +-- src/versionbits.cpp | 12 +++++++++--- src/versionbits.h | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index f14990816f07..91f1b713b0f6 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2594,9 +2594,8 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); - if (!preloadedchain && preloadchaincounter < VERSIONBITS_NUM_BITS) { - ThresholdState state = checker.GetStateForBuildCache(pindex, chainParams.GetConsensus(), warningcache[bit]); + ThresholdState state = checker.GetStateForBuildCache(pindex, chainParams.GetConsensus(), warningcache[bit], bit); preloadchaincounter = preloadchaincounter + 1; if (preloadedchain) preloadchaincounter=0; } diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 503b94285d3c..7493c59ba286 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -116,7 +116,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* return state; } -ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const +ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache, int bitIn) const { // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known @@ -129,6 +129,11 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB cache[pindexPrev] = ThresholdState::DEFINED; break; } + if (pindexPrev->GetMedianTimePast() < nTimeStart) { + // Optimization: don't recompute down further, as we know every earlier block will be before the start time + cache[pindexPrev] = ThresholdState::DEFINED; + break; + } vToCompute.push_back(pindexPrev); // LogPrint(BCLog::BENCHMARK, "First Height: %s\n", pindexPrev->nHeight); @@ -155,7 +160,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); - cache[pindexPrev] = state = stateNext; + if (!Condition(pindexPrev, params)) cache[pindexPrev] = state = stateNext; + } @@ -299,7 +305,7 @@ void VersionBitsCache::Clear() ThresholdState VersionBitsStateBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) { - return VersionBitsConditionChecker(pos).GetStateForBuildCache(pindexPrev, params, cache.caches[pos]); + return VersionBitsConditionChecker(pos).GetStateForBuildCache(pindexPrev, params, cache.caches[pos]), pos; } /* diff --git a/src/versionbits.h b/src/versionbits.h index 658afcf43e1c..239f69b2c8d4 100644 --- a/src/versionbits.h +++ b/src/versionbits.h @@ -75,7 +75,7 @@ class AbstractThresholdConditionChecker { /** Returns the height since when the ThresholdState has started for pindex A based on parent pindexPrev B, all blocks of a period share the same */ int GetStateSinceHeightFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const; - ThresholdState GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const; + ThresholdState GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache, int bitIn) const; }; /** BIP 9 allows multiple softforks to be deployed in parallel. We cache per-period state for every one of them From 08eb8ac9982edd7560d7f053ba45b0050e583eb4 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:23:45 -0600 Subject: [PATCH 140/401] Update versionbits.cpp --- src/versionbits.cpp | 70 +-------------------------------------------- 1 file changed, 1 insertion(+), 69 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 7493c59ba286..33993ab7d246 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -305,73 +305,5 @@ void VersionBitsCache::Clear() ThresholdState VersionBitsStateBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) { - return VersionBitsConditionChecker(pos).GetStateForBuildCache(pindexPrev, params, cache.caches[pos]), pos; + return VersionBitsConditionChecker(pos).GetStateForBuildCache(pindexPrev, params, cache.caches[pos], pos); } - -/* -int ThresholdNew(const Consensus::Params& params, int nAttempt) const override -{ - const Consensus::DeploymentPos id; - - if (params.vDeployments[id].nThresholdStart == 0) { - return params.nRuleChangeActivationThreshold; - } - if (params.vDeployments[id].nThresholdMin == 0 || params.vDeployments[id].nFalloffCoeff == 0) { - return params.vDeployments[id].nThresholdStart; - } - int64_t nThresholdCalc = params.vDeployments[id].nThresholdStart - nAttempt * nAttempt * Period(params) / 100 / params.vDeployments[id].nFalloffCoeff; - return std::max(params.vDeployments[id].nThresholdMin, nThresholdCalc); -} -*/ - -/* -void PreLoadCacheBits(const CBlockIndex* pindexPrev, VersionBitsCache& cache) -{ - int maxtip = pindex->nHeight; - const CBlockIndex* currentIndex = pindexPrev; - - for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { - LogPrint(BCLog::BENCHMARK, "bit: %s\n", bit); - LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", pindex->nHeight); - LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); - - // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known - std::vector vToCompute; - while (cache.count(pindexPrev) == 0) { - if (pindexPrev == nullptr) { - // The genesis block is by definition defined. - cache[pindexPrev] = ThresholdState::DEFINED; - break; - } - if (pindexPrev->GetMedianTimePast() < nTimeStart) { - // Optimization: don't recompute down further, as we know every earlier block will be before the start time - cache[pindexPrev] = ThresholdState::DEFINED; - break; - } - vToCompute.push_back(pindexPrev); - assert(cache.count(pindexPrev)); - LogPrint(BCLog::BENCHMARK, "past asset"); - ThresholdState stateNext = cache[pindexPrev]; - LogPrint(BCLog::BENCHMARK, "past threshold"); - pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); - } - - for (int startheight = maxtip; startheight >= 1; startheight--) { - LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", startheight); - LogPrint(BCLog::BENCHMARK, "maxtip: %s\n", maxtip); - pindex = pindex->GetAncestor(pindex->nHeight); -// pindex = (pindex->nHeight + 1); - - assert(cache.count(pindex)); - LogPrint(BCLog::BENCHMARK, "past asset"); - ThresholdState stateNext = cache[pindex]; - LogPrint(BCLog::BENCHMARK, "past threshold"); - -// stateNext = ThresholdNew(params, pindex->nHeight); - cache[pindex] = stateNext; - } - } - preloadedchain = true; -} - -*/ \ No newline at end of file From 3b32eda600e093c620936409fc1369ef0dd50522 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:24:51 -0600 Subject: [PATCH 141/401] Update versionbits.cpp --- src/versionbits.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 33993ab7d246..81ec050ce976 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -119,6 +119,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache, int bitIn) const { + int64_t nTimeStart = BeginTime(params); + // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known std::vector vToCompute; int maxtip = pindexPrev->nHeight; From c675fd61db2cefb50a61e4af7ce7773a8d4c0190 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:27:46 -0600 Subject: [PATCH 142/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 81ec050ce976..4c1eeeda6eb3 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -162,7 +162,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); - if (!Condition(pindexPrev, params)) cache[pindexPrev] = state = stateNext; + if (Condition(pindexPrev, params)) cache[pindexPrev] = state = stateNext; } From 3d250f99f816579c9f6551afa61009ec64fe669c Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:42:58 -0600 Subject: [PATCH 143/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 4c1eeeda6eb3..42b6e23a69d6 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -162,7 +162,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); - if (Condition(pindexPrev, params)) cache[pindexPrev] = state = stateNext; + if (pindexPrev->nVersion >= bitIn) cache[pindexPrev] = state = stateNext; } From 2dd009055c2f6355b7c57a610579993969ae6041 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:43:27 -0600 Subject: [PATCH 144/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 42b6e23a69d6..70d5b9299369 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -162,7 +162,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB // LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); - if (pindexPrev->nVersion >= bitIn) cache[pindexPrev] = state = stateNext; + if (pindexPrev->nVersion == bitIn) cache[pindexPrev] = state = stateNext; } From c797d17721d8b343665a65d0b41c0edc267bcc34 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:53:14 -0600 Subject: [PATCH 145/401] Update versionbits.cpp --- src/versionbits.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 70d5b9299369..41d92b40a385 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -15,7 +15,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* int min_activation_height = MinActivationHeight(params); -// LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); + LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. if (pindexPrev != nullptr) { @@ -50,7 +50,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* } } -// LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); + LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); // Now walk forward and compute the state of descendants of pindexPrev while (!vToCompute.empty()) { @@ -143,7 +143,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); } -// LogPrint(BCLog::BENCHMARK, "Height: \n"); + LogPrint(BCLog::BENCHMARK, "Height: \n"); // LogPrint(BCLog::BENCHMARK, "Height: %s\n", ); // At this point, cache[pindexPrev] is known @@ -160,7 +160,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB vToCompute.pop_back(); counter = counter + 1; -// LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); + LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); if (pindexPrev->nVersion == bitIn) cache[pindexPrev] = state = stateNext; From 4ad95b42c5fb2684d427a33e15d2017af267e560 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:56:16 -0600 Subject: [PATCH 146/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 41d92b40a385..c49a2ccddbc4 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -160,7 +160,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB vToCompute.pop_back(); counter = counter + 1; - LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s\n", pindexPrev->nHeight, counter); + LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s - Bit: %s\n", pindexPrev->nHeight, counter, bit); if (pindexPrev->nVersion == bitIn) cache[pindexPrev] = state = stateNext; From 7cfa611d40fba5b8265415cb2122d0835c78a396 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:56:39 -0600 Subject: [PATCH 147/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index c49a2ccddbc4..8fc1b055a205 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -160,7 +160,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB vToCompute.pop_back(); counter = counter + 1; - LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s - Bit: %s\n", pindexPrev->nHeight, counter, bit); + LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s - Bit: %s\n", pindexPrev->nHeight, counter, bitIn); if (pindexPrev->nVersion == bitIn) cache[pindexPrev] = state = stateNext; From c30af6803b0fe3216ec16feacca5bf2a9293bb06 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 22:04:23 -0600 Subject: [PATCH 148/401] Update versionbits.cpp --- src/versionbits.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 8fc1b055a205..e56b737a6597 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -15,7 +15,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* int min_activation_height = MinActivationHeight(params); - LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); +// LogPrint(BCLog::BENCHMARK, "period: %s\n", nPeriod); // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. if (pindexPrev != nullptr) { @@ -50,7 +50,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* } } - LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); +// LogPrint(BCLog::BENCHMARK, "StartHeight: %s\n", nStartHeight); // Now walk forward and compute the state of descendants of pindexPrev while (!vToCompute.empty()) { From 62b791d31ea6db71bba89b24e291182fd73b7651 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 22:15:54 -0600 Subject: [PATCH 149/401] Update versionbits.cpp --- src/versionbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index e56b737a6597..4a34ce0e21d5 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -160,7 +160,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB vToCompute.pop_back(); counter = counter + 1; - LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s - Bit: %s\n", pindexPrev->nHeight, counter, bitIn); +// LogPrint(BCLog::BENCHMARK, "Second Height: %s - Counter: %s - Bit: %s\n", pindexPrev->nHeight, counter, bitIn); if (pindexPrev->nVersion == bitIn) cache[pindexPrev] = state = stateNext; From 3afa8b34807c52b6bdccd15054f80e5e194ad627 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 16 Jan 2025 22:25:50 -0600 Subject: [PATCH 150/401] ... --- configure.ac | 4 ++-- src/versionbits.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 1ca7e04bec56..6ca311d818eb 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 3) -define(_CLIENT_VERSION_MINOR, 4) -define(_CLIENT_VERSION_REVISION, 9) +define(_CLIENT_VERSION_MINOR, 5) +define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 4a34ce0e21d5..759fafef1cfe 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -143,7 +143,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - 1); } - LogPrint(BCLog::BENCHMARK, "Height: \n"); + LogPrint(BCLog::BENCHMARK, "Height: Start\n"); // LogPrint(BCLog::BENCHMARK, "Height: %s\n", ); // At this point, cache[pindexPrev] is known @@ -167,6 +167,8 @@ ThresholdState AbstractThresholdConditionChecker::GetStateForBuildCache(const CB } + LogPrint(BCLog::BENCHMARK, "Height: End\n"); + preloadedchain = true; return state; From aed0508697318fe1e66ff32616225ad95018bb68 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sat, 8 Mar 2025 10:13:02 -0600 Subject: [PATCH 151/401] Update boost.mk fix boost directory change --- depends/packages/boost.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 5822d2da17c0..061c5ca93bc6 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,6 +1,6 @@ package=boost $(package)_version=1_86_0 -$(package)_download_path=https://archives.boost.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/ +$(package)_download_path=https://archives.boost.io/release/$(subst _,.,$($(package)_version))/source/ $(package)_file_name=boost_$($(package)_version).tar.bz2 $(package)_sha256_hash=1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b #4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 From 226825ec463498769ba7832525d025d11f1fc4fb Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 20 Mar 2025 23:02:33 -0500 Subject: [PATCH 152/401] integrate dsshbls --- configure.ac | 2 +- depends/packages/packages.mk | 2 +- src/Makefile.am | 4 +- .../depends/mimalloc/docs/annotated.html | 116 ++ .../depends/mimalloc/docs/annotated_dup.js | 5 + src/dashbls/depends/mimalloc/docs/bc_s.png | Bin 0 -> 657 bytes src/dashbls/depends/mimalloc/docs/bdwn.png | Bin 0 -> 142 bytes src/dashbls/depends/mimalloc/docs/bench.html | 114 ++ src/dashbls/depends/mimalloc/docs/build.html | 137 ++ .../depends/mimalloc/docs/classes.html | 116 ++ src/dashbls/depends/mimalloc/docs/closed.png | Bin 0 -> 133 bytes src/dashbls/depends/mimalloc/docs/doc.png | Bin 0 -> 858 bytes src/dashbls/depends/mimalloc/docs/doxygen.css | 1793 +++++++++++++++++ src/dashbls/depends/mimalloc/docs/doxygen.png | Bin 0 -> 3777 bytes .../depends/mimalloc/docs/dynsections.js | 121 ++ .../depends/mimalloc/docs/environment.html | 122 ++ .../depends/mimalloc/docs/folderclosed.png | Bin 0 -> 617 bytes .../depends/mimalloc/docs/folderopen.png | Bin 0 -> 687 bytes .../depends/mimalloc/docs/functions.html | 123 ++ .../depends/mimalloc/docs/functions_vars.html | 123 ++ .../depends/mimalloc/docs/group__aligned.html | 465 +++++ .../depends/mimalloc/docs/group__aligned.js | 12 + .../mimalloc/docs/group__analysis.html | 379 ++++ .../depends/mimalloc/docs/group__analysis.js | 15 + ...group__analysis_structmi__heap__area__t.js | 8 + .../depends/mimalloc/docs/group__cpp.html | 393 ++++ .../depends/mimalloc/docs/group__cpp.js | 11 + .../mimalloc/docs/group__extended.html | 1078 ++++++++++ .../depends/mimalloc/docs/group__extended.js | 29 + .../depends/mimalloc/docs/group__heap.html | 1074 ++++++++++ .../depends/mimalloc/docs/group__heap.js | 30 + .../depends/mimalloc/docs/group__malloc.html | 638 ++++++ .../depends/mimalloc/docs/group__malloc.js | 16 + .../depends/mimalloc/docs/group__options.html | 404 ++++ .../depends/mimalloc/docs/group__options.js | 30 + .../depends/mimalloc/docs/group__posix.html | 532 +++++ .../depends/mimalloc/docs/group__posix.js | 17 + .../depends/mimalloc/docs/group__typed.html | 518 +++++ .../depends/mimalloc/docs/group__typed.js | 14 + .../mimalloc/docs/group__zeroinit.html | 591 ++++++ .../depends/mimalloc/docs/group__zeroinit.js | 14 + src/dashbls/depends/mimalloc/docs/index.html | 142 ++ src/dashbls/depends/mimalloc/docs/jquery.js | 35 + .../mimalloc/docs/mimalloc-doc_8h_source.html | 561 ++++++ .../mimalloc/docs/mimalloc-doxygen.css | 49 + .../depends/mimalloc/docs/mimalloc-logo.svg | 161 ++ .../depends/mimalloc/docs/modules.html | 124 ++ src/dashbls/depends/mimalloc/docs/modules.js | 13 + src/dashbls/depends/mimalloc/docs/nav_f.png | Bin 0 -> 170 bytes src/dashbls/depends/mimalloc/docs/nav_g.png | Bin 0 -> 95 bytes src/dashbls/depends/mimalloc/docs/nav_h.png | Bin 0 -> 98 bytes src/dashbls/depends/mimalloc/docs/navtree.css | 146 ++ src/dashbls/depends/mimalloc/docs/navtree.js | 546 +++++ .../depends/mimalloc/docs/navtreedata.js | 51 + .../depends/mimalloc/docs/navtreeindex0.js | 181 ++ src/dashbls/depends/mimalloc/docs/open.png | Bin 0 -> 117 bytes .../depends/mimalloc/docs/overrides.html | 198 ++ src/dashbls/depends/mimalloc/docs/pages.html | 119 ++ src/dashbls/depends/mimalloc/docs/resize.js | 140 ++ .../depends/mimalloc/docs/search/all_0.html | 37 + .../depends/mimalloc/docs/search/all_0.js | 4 + .../depends/mimalloc/docs/search/all_1.html | 37 + .../depends/mimalloc/docs/search/all_1.js | 4 + .../depends/mimalloc/docs/search/all_2.html | 37 + .../depends/mimalloc/docs/search/all_2.js | 7 + .../depends/mimalloc/docs/search/all_3.html | 37 + .../depends/mimalloc/docs/search/all_3.js | 5 + .../depends/mimalloc/docs/search/all_4.html | 37 + .../depends/mimalloc/docs/search/all_4.js | 5 + .../depends/mimalloc/docs/search/all_5.html | 37 + .../depends/mimalloc/docs/search/all_5.js | 5 + .../depends/mimalloc/docs/search/all_6.html | 37 + .../depends/mimalloc/docs/search/all_6.js | 153 ++ .../depends/mimalloc/docs/search/all_7.html | 37 + .../depends/mimalloc/docs/search/all_7.js | 4 + .../depends/mimalloc/docs/search/all_8.html | 37 + .../depends/mimalloc/docs/search/all_8.js | 5 + .../depends/mimalloc/docs/search/all_9.html | 37 + .../depends/mimalloc/docs/search/all_9.js | 5 + .../depends/mimalloc/docs/search/all_a.html | 37 + .../depends/mimalloc/docs/search/all_a.js | 4 + .../depends/mimalloc/docs/search/all_b.html | 37 + .../depends/mimalloc/docs/search/all_b.js | 5 + .../depends/mimalloc/docs/search/all_c.html | 37 + .../depends/mimalloc/docs/search/all_c.js | 4 + .../depends/mimalloc/docs/search/all_d.html | 30 + .../depends/mimalloc/docs/search/all_d.js | 4 + .../mimalloc/docs/search/classes_0.html | 37 + .../depends/mimalloc/docs/search/classes_0.js | 5 + .../depends/mimalloc/docs/search/close.png | Bin 0 -> 273 bytes .../depends/mimalloc/docs/search/enums_0.html | 37 + .../depends/mimalloc/docs/search/enums_0.js | 4 + .../mimalloc/docs/search/enumvalues_0.html | 37 + .../mimalloc/docs/search/enumvalues_0.js | 4 + .../mimalloc/docs/search/enumvalues_1.html | 37 + .../mimalloc/docs/search/enumvalues_1.js | 19 + .../mimalloc/docs/search/functions_0.html | 37 + .../mimalloc/docs/search/functions_0.js | 116 ++ .../mimalloc/docs/search/functions_1.html | 30 + .../mimalloc/docs/search/functions_1.js | 4 + .../mimalloc/docs/search/groups_0.html | 37 + .../depends/mimalloc/docs/search/groups_0.js | 4 + .../mimalloc/docs/search/groups_1.html | 37 + .../depends/mimalloc/docs/search/groups_1.js | 4 + .../mimalloc/docs/search/groups_2.html | 37 + .../depends/mimalloc/docs/search/groups_2.js | 4 + .../mimalloc/docs/search/groups_3.html | 37 + .../depends/mimalloc/docs/search/groups_3.js | 4 + .../mimalloc/docs/search/groups_4.html | 37 + .../depends/mimalloc/docs/search/groups_4.js | 5 + .../mimalloc/docs/search/groups_5.html | 37 + .../depends/mimalloc/docs/search/groups_5.js | 4 + .../mimalloc/docs/search/groups_6.html | 37 + .../depends/mimalloc/docs/search/groups_6.js | 4 + .../mimalloc/docs/search/groups_7.html | 37 + .../depends/mimalloc/docs/search/groups_7.js | 4 + .../mimalloc/docs/search/groups_8.html | 37 + .../depends/mimalloc/docs/search/groups_8.js | 4 + .../depends/mimalloc/docs/search/mag_sel.png | Bin 0 -> 465 bytes .../mimalloc/docs/search/nomatches.html | 13 + .../depends/mimalloc/docs/search/pages_0.html | 37 + .../depends/mimalloc/docs/search/pages_0.js | 4 + .../depends/mimalloc/docs/search/pages_1.html | 37 + .../depends/mimalloc/docs/search/pages_1.js | 4 + .../depends/mimalloc/docs/search/pages_2.html | 37 + .../depends/mimalloc/docs/search/pages_2.js | 4 + .../depends/mimalloc/docs/search/pages_3.html | 37 + .../depends/mimalloc/docs/search/pages_3.js | 4 + .../depends/mimalloc/docs/search/pages_4.html | 37 + .../depends/mimalloc/docs/search/pages_4.js | 4 + .../depends/mimalloc/docs/search/search.css | 273 +++ .../depends/mimalloc/docs/search/search.js | 816 ++++++++ .../depends/mimalloc/docs/search/search_l.png | Bin 0 -> 567 bytes .../depends/mimalloc/docs/search/search_m.png | Bin 0 -> 158 bytes .../depends/mimalloc/docs/search/search_r.png | Bin 0 -> 553 bytes .../mimalloc/docs/search/searchdata.js | 39 + .../mimalloc/docs/search/typedefs_0.html | 37 + .../mimalloc/docs/search/typedefs_0.js | 8 + .../mimalloc/docs/search/typedefs_1.html | 30 + .../mimalloc/docs/search/typedefs_1.js | 4 + .../mimalloc/docs/search/typedefs_2.html | 30 + .../mimalloc/docs/search/typedefs_2.js | 5 + .../mimalloc/docs/search/variables_0.html | 37 + .../mimalloc/docs/search/variables_0.js | 5 + .../mimalloc/docs/search/variables_1.html | 37 + .../mimalloc/docs/search/variables_1.js | 4 + .../mimalloc/docs/search/variables_2.html | 37 + .../mimalloc/docs/search/variables_2.js | 4 + .../mimalloc/docs/search/variables_3.html | 37 + .../mimalloc/docs/search/variables_3.js | 4 + .../depends/mimalloc/docs/splitbar.png | Bin 0 -> 304 bytes .../depends/mimalloc/docs/sync_off.png | Bin 0 -> 851 bytes src/dashbls/depends/mimalloc/docs/sync_on.png | Bin 0 -> 836 bytes src/dashbls/depends/mimalloc/docs/tab_a.png | Bin 0 -> 120 bytes src/dashbls/depends/mimalloc/docs/tab_b.png | Bin 0 -> 180 bytes src/dashbls/depends/mimalloc/docs/tab_h.png | Bin 0 -> 174 bytes src/dashbls/depends/mimalloc/docs/tab_s.png | Bin 0 -> 178 bytes src/dashbls/depends/mimalloc/docs/tabs.css | 61 + src/dashbls/depends/mimalloc/docs/using.html | 155 ++ .../mimalloc-override-test.vcxproj.filters | 22 + .../vs2017/mimalloc-override.vcxproj.filters | 86 + .../mimalloc-test-stress.vcxproj.filters | 22 + .../ide/vs2017/mimalloc-test.vcxproj.filters | 22 + .../ide/vs2017/mimalloc.vcxproj.filters | 92 + .../vs2019/mimalloc-override.vcxproj.filters | 84 + .../ide/vs2019/mimalloc.vcxproj.filters | 87 + 166 files changed, 15226 insertions(+), 4 deletions(-) create mode 100644 src/dashbls/depends/mimalloc/docs/annotated.html create mode 100644 src/dashbls/depends/mimalloc/docs/annotated_dup.js create mode 100644 src/dashbls/depends/mimalloc/docs/bc_s.png create mode 100644 src/dashbls/depends/mimalloc/docs/bdwn.png create mode 100644 src/dashbls/depends/mimalloc/docs/bench.html create mode 100644 src/dashbls/depends/mimalloc/docs/build.html create mode 100644 src/dashbls/depends/mimalloc/docs/classes.html create mode 100644 src/dashbls/depends/mimalloc/docs/closed.png create mode 100644 src/dashbls/depends/mimalloc/docs/doc.png create mode 100644 src/dashbls/depends/mimalloc/docs/doxygen.css create mode 100644 src/dashbls/depends/mimalloc/docs/doxygen.png create mode 100644 src/dashbls/depends/mimalloc/docs/dynsections.js create mode 100644 src/dashbls/depends/mimalloc/docs/environment.html create mode 100644 src/dashbls/depends/mimalloc/docs/folderclosed.png create mode 100644 src/dashbls/depends/mimalloc/docs/folderopen.png create mode 100644 src/dashbls/depends/mimalloc/docs/functions.html create mode 100644 src/dashbls/depends/mimalloc/docs/functions_vars.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__aligned.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__aligned.js create mode 100644 src/dashbls/depends/mimalloc/docs/group__analysis.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__analysis.js create mode 100644 src/dashbls/depends/mimalloc/docs/group__analysis_structmi__heap__area__t.js create mode 100644 src/dashbls/depends/mimalloc/docs/group__cpp.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__cpp.js create mode 100644 src/dashbls/depends/mimalloc/docs/group__extended.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__extended.js create mode 100644 src/dashbls/depends/mimalloc/docs/group__heap.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__heap.js create mode 100644 src/dashbls/depends/mimalloc/docs/group__malloc.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__malloc.js create mode 100644 src/dashbls/depends/mimalloc/docs/group__options.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__options.js create mode 100644 src/dashbls/depends/mimalloc/docs/group__posix.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__posix.js create mode 100644 src/dashbls/depends/mimalloc/docs/group__typed.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__typed.js create mode 100644 src/dashbls/depends/mimalloc/docs/group__zeroinit.html create mode 100644 src/dashbls/depends/mimalloc/docs/group__zeroinit.js create mode 100644 src/dashbls/depends/mimalloc/docs/index.html create mode 100644 src/dashbls/depends/mimalloc/docs/jquery.js create mode 100644 src/dashbls/depends/mimalloc/docs/mimalloc-doc_8h_source.html create mode 100644 src/dashbls/depends/mimalloc/docs/mimalloc-doxygen.css create mode 100644 src/dashbls/depends/mimalloc/docs/mimalloc-logo.svg create mode 100644 src/dashbls/depends/mimalloc/docs/modules.html create mode 100644 src/dashbls/depends/mimalloc/docs/modules.js create mode 100644 src/dashbls/depends/mimalloc/docs/nav_f.png create mode 100644 src/dashbls/depends/mimalloc/docs/nav_g.png create mode 100644 src/dashbls/depends/mimalloc/docs/nav_h.png create mode 100644 src/dashbls/depends/mimalloc/docs/navtree.css create mode 100644 src/dashbls/depends/mimalloc/docs/navtree.js create mode 100644 src/dashbls/depends/mimalloc/docs/navtreedata.js create mode 100644 src/dashbls/depends/mimalloc/docs/navtreeindex0.js create mode 100644 src/dashbls/depends/mimalloc/docs/open.png create mode 100644 src/dashbls/depends/mimalloc/docs/overrides.html create mode 100644 src/dashbls/depends/mimalloc/docs/pages.html create mode 100644 src/dashbls/depends/mimalloc/docs/resize.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_0.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_0.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_1.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_1.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_2.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_2.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_3.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_3.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_4.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_4.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_5.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_5.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_6.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_6.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_7.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_7.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_8.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_8.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_9.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_9.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_a.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_a.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_b.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_b.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_c.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_c.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_d.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/all_d.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/classes_0.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/classes_0.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/close.png create mode 100644 src/dashbls/depends/mimalloc/docs/search/enums_0.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/enums_0.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/enumvalues_0.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/enumvalues_0.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/enumvalues_1.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/enumvalues_1.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/functions_0.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/functions_0.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/functions_1.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/functions_1.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_0.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_0.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_1.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_1.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_2.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_2.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_3.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_3.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_4.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_4.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_5.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_5.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_6.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_6.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_7.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_7.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_8.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/groups_8.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/mag_sel.png create mode 100644 src/dashbls/depends/mimalloc/docs/search/nomatches.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/pages_0.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/pages_0.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/pages_1.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/pages_1.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/pages_2.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/pages_2.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/pages_3.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/pages_3.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/pages_4.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/pages_4.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/search.css create mode 100644 src/dashbls/depends/mimalloc/docs/search/search.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/search_l.png create mode 100644 src/dashbls/depends/mimalloc/docs/search/search_m.png create mode 100644 src/dashbls/depends/mimalloc/docs/search/search_r.png create mode 100644 src/dashbls/depends/mimalloc/docs/search/searchdata.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/typedefs_0.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/typedefs_0.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/typedefs_1.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/typedefs_1.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/typedefs_2.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/typedefs_2.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/variables_0.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/variables_0.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/variables_1.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/variables_1.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/variables_2.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/variables_2.js create mode 100644 src/dashbls/depends/mimalloc/docs/search/variables_3.html create mode 100644 src/dashbls/depends/mimalloc/docs/search/variables_3.js create mode 100644 src/dashbls/depends/mimalloc/docs/splitbar.png create mode 100644 src/dashbls/depends/mimalloc/docs/sync_off.png create mode 100644 src/dashbls/depends/mimalloc/docs/sync_on.png create mode 100644 src/dashbls/depends/mimalloc/docs/tab_a.png create mode 100644 src/dashbls/depends/mimalloc/docs/tab_b.png create mode 100644 src/dashbls/depends/mimalloc/docs/tab_h.png create mode 100644 src/dashbls/depends/mimalloc/docs/tab_s.png create mode 100644 src/dashbls/depends/mimalloc/docs/tabs.css create mode 100644 src/dashbls/depends/mimalloc/docs/using.html create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override-test.vcxproj.filters create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override.vcxproj.filters create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-test-stress.vcxproj.filters create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-test.vcxproj.filters create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc.vcxproj.filters create mode 100644 src/dashbls/depends/mimalloc/ide/vs2019/mimalloc-override.vcxproj.filters create mode 100644 src/dashbls/depends/mimalloc/ide/vs2019/mimalloc.vcxproj.filters diff --git a/configure.ac b/configure.ac index 6ca311d818eb..2ecd276d53e2 100644 --- a/configure.ac +++ b/configure.ac @@ -1023,7 +1023,7 @@ if test "x$use_thread_local" = xyes || { test "x$use_thread_local" = xauto && te *darwin*) # TODO enable thread_local on later versions of Darwin where it is # supported (per https://stackoverflow.com/a/29929949) - AC_MSG_RESULT(no) + AC_MSG_RESULT(yes) ;; *freebsd*) # FreeBSD's implementation of thread_local is also buggy (per diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index dd03119cb903..99832a76c33e 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -1,4 +1,4 @@ -packages:=boost libevent gmp bls-dash backtrace cmake +packages:=boost libevent gmp backtrace cmake qt_packages = qrencode zlib diff --git a/src/Makefile.am b/src/Makefile.am index aec7797e4525..5a850e0e0ee9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -DIST_SUBDIRS = secp256k1 univalue +DIST_SUBDIRS = secp256k1 univalue dashbls AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS) AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS) @@ -46,7 +46,7 @@ BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include BITCOIN_INCLUDES += $(UNIVALUE_CFLAGS) BITCOIN_INCLUDES += -I$(srcdir)/immer -BLS_LIBS=-lbls-dash -lrelic_s +BLS_LIBS=-ldashbls -lrelic_s LIBBITCOIN_SERVER=libscc_server.a LIBBITCOIN_COMMON=libscc_common.a diff --git a/src/dashbls/depends/mimalloc/docs/annotated.html b/src/dashbls/depends/mimalloc/docs/annotated.html new file mode 100644 index 000000000000..f3e392a457a9 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/annotated.html @@ -0,0 +1,116 @@ + + + + + + + +mi-malloc: Data Structures + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + + +
 Cmi_heap_area_tAn area of heap space contains blocks of a single size
 Cmi_stl_allocatorstd::allocator implementation for mimalloc for use in STL containers
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/annotated_dup.js b/src/dashbls/depends/mimalloc/docs/annotated_dup.js new file mode 100644 index 000000000000..67229123d17e --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/annotated_dup.js @@ -0,0 +1,5 @@ +var annotated_dup = +[ + [ "mi_heap_area_t", "group__analysis.html#structmi__heap__area__t", "group__analysis_structmi__heap__area__t" ], + [ "mi_stl_allocator", "group__cpp.html#structmi__stl__allocator", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/bc_s.png b/src/dashbls/depends/mimalloc/docs/bc_s.png new file mode 100644 index 0000000000000000000000000000000000000000..e8fb7361df0aecebbbdf1998e88559dd8d74d600 GIT binary patch literal 657 zcmV;C0&e|@P)2Z5*uSELZGXPAbKZc(oFC#9KMfp?z!LGd*__<1JJpPmkwfy1Yi?N z8yi0XKnB9e^FfNzDm5gj?6li!03ZX(ou5mRB>6fJj{L@JezREkBNI&L&x(F+G88tE z6!oB7EW8;ODEt1|e&@%sljCmVSSCQ(*}Ul02%)`TG)7>{RZ5?}3fk@;pj-AzV`Jg8_J$+{Q%2zI)_tJX(N^NWFX-|;MWQPSg zN~>Mv1>vw(sd)b<5N%WN`;Vzq>Ra{d=eH;^l?DJA7L7*Z%?Z~2tzN5MLGe@y0A!#P z3Zm`t`4srk2^3Ez0RTq%#A2Pu8BC`4D0Z^fNdS;xUaQmHWgU(dVYS%+07m%`7tDnp z`T<2w!~sACgIIRn+xtrag<{76K!zoQ(Rgi)VYYW0jRh2pL;*mCirwX+l}gq1=1$`s znhb}BH?tZI`Er6~e>Hb^dUt?76dLAp-2UR+<@tM34t#;2L^Dow@eqp~m-2*}VWi`4 z(0baTCdu_yv-x5$54faK{MBk>DO}#G?bhDM!PuM3X3^(WYW0GSrVsJvG5{Qb^9UkW zanp);x|aIu0g>C|8AnLb=$D-9w7+)&;0Soc?uVkWLMl7G;^KK2B{<#OHa@;}DxH~f rx;YpnVIE@^acjH#oz5cwfKmPfrlXi_XgDXf00000NkvXXu0mjfJ$f&F literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/bdwn.png b/src/dashbls/depends/mimalloc/docs/bdwn.png new file mode 100644 index 0000000000000000000000000000000000000000..bbbba4e6c24ad6c28f351317762b11beca630e54 GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZP)`@fkP61PbMNvtDDbq{m+~(z z{?RmE_)9=MwGhaw6{(bkg-~;aeiB+NuI!|6-y6tqaZr1ct0nOWc qtrWYiq?OC8|IA@&(kgSJn&A$&$TZK#2Sb1sFnGH9xvX + + + + + + +mi-malloc: Performance + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Performance
+
+
+

We tested mimalloc against many other top allocators over a wide range of benchmarks, ranging from various real world programs to synthetic benchmarks that see how the allocator behaves under more extreme circumstances.

+

In our benchmarks, mimalloc always outperforms all other leading allocators (jemalloc, tcmalloc, Hoard, etc) (Jan 2021), and usually uses less memory (up to 25% more in the worst case). A nice property is that it does consistently well over the wide range of benchmarks.

+

See the Performance section in the mimalloc repository for benchmark results, or the the technical report for detailed benchmark results.

+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/build.html b/src/dashbls/depends/mimalloc/docs/build.html new file mode 100644 index 000000000000..dbcc0d7521be --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/build.html @@ -0,0 +1,137 @@ + + + + + + + +mi-malloc: Building + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Building
+
+
+

Checkout the sources from Github:

git clone https://github.com/microsoft/mimalloc
+

Windows

+

Open ide/vs2019/mimalloc.sln in Visual Studio 2019 and build (or ide/vs2017/mimalloc.sln). The mimalloc project builds a static library (in out/msvc-x64), while the mimalloc-override project builds a DLL for overriding malloc in the entire program.

+

macOS, Linux, BSD, etc.

+

We use cmake1 as the build system:

+
> mkdir -p out/release
+
> cd out/release
+
> cmake ../..
+
> make
+

This builds the library as a shared (dynamic) library (.so or .dylib), a static library (.a), and as a single object file (.o).

+

> sudo make install (install the library and header files in /usr/local/lib and /usr/local/include)

+

You can build the debug version which does many internal checks and maintains detailed statistics as:

+
> mkdir -p out/debug
+
> cd out/debug
+
> cmake -DCMAKE_BUILD_TYPE=Debug ../..
+
> make
+

This will name the shared library as libmimalloc-debug.so.

+

Finally, you can build a secure version that uses guard pages, encrypted free lists, etc, as:

> mkdir -p out/secure
+
> cd out/secure
+
> cmake -DMI_SECURE=ON ../..
+
> make
+

This will name the shared library as libmimalloc-secure.so. Use ccmake2 instead of cmake to see and customize all the available build options.

+

Notes:

    +
  1. Install CMake: sudo apt-get install cmake
  2. +
  3. Install CCMake: sudo apt-get install cmake-curses-gui
  4. +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/classes.html b/src/dashbls/depends/mimalloc/docs/classes.html new file mode 100644 index 000000000000..b744c4d90041 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/classes.html @@ -0,0 +1,116 @@ + + + + + + + +mi-malloc: Data Structure Index + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Data Structure Index
+
+ +
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/closed.png b/src/dashbls/depends/mimalloc/docs/closed.png new file mode 100644 index 0000000000000000000000000000000000000000..5e32501fa57b7c2e7c419f08fde94a485859b9e0 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VKAtX)Ar*{o?{4I6aNu#i$ew-i zz>^CG;x8unP0+A%+o1j5B2ca2LF!#Sma`M)9^`b4e_-=XU4Qnc0|Kue=wAurTUaN| hvi;X9-ilC0^R@_)&CJRzJV0|9JYD@<);T3K0RTieEVlpv literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/doc.png b/src/dashbls/depends/mimalloc/docs/doc.png new file mode 100644 index 0000000000000000000000000000000000000000..5bfc88dd724c75f5585869921aae58846b235b22 GIT binary patch literal 858 zcmV-g1Eu_lP)_>9LGQRd3X1DyXWrifjzV-Y*3POEKO*ltY|3M&`L#3F}*FOLEE&gc?LBK76k*r z#gttN#CoBwHm#9nZ|YsX5OP;+(2G&FaJAaK;CB7}k07{vj&EWwd~vuRI0ydc_vQQl ze$W5DwPmwefMvrDu$(NrfD>RTUtSo^rZXAl{{7E*&dB}mw{P>;%nad31i#-$EE?s> z+FI5&tg!)D;m~y*;32*^KdP^+sU})bKtUu-Fc2W%_v7>VnVy~|UR1=Yx;oB{je`xn zy0WqlzzowZa=BbM9S&ShCw9A?e6N>iVIf+ykQxzArBXDkewr;WJkQvrZ@Kv0Wy_|R zI{4wopY$gxDsYI1-DblfB8H#{tNplozi|T~2h$d*%j5PK`+xcB_hc8d?Af`4ug5Qv zPS2yoig1Y|X%K(>Ib*D!pTFNY;Gv(T0~N61?e=z>H*F*&4i2{^(7U_YyYp2NukEF= zel;cWBB~^>OgasagQbAeB@J@e85&74JUqLGC1@pBWKQ{NxNdw zu1q=uki#RtWaZ%4TZcK?*~yW_AwC%x;K06pjE`Pm|L$Epv!?!j=+Y(tGb{yEHB|;* zUHXPo$t0ccbaNn)Aoq4q!&Knz!h$h;VR6wohZ<#2NpYNbOkJ;~@&C)b2W!&N<2?(L?f?J)07*qoM6N<$f|>}WoB#j- literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/doxygen.css b/src/dashbls/depends/mimalloc/docs/doxygen.css new file mode 100644 index 000000000000..f090ef799cc0 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/doxygen.css @@ -0,0 +1,1793 @@ +/* The standard CSS for doxygen 1.9.1 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #474D4E; + color: #0A0B0B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + border-right: 1px solid #636C6D; + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} +td.navtabHL { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: #A0A0A0; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: black; +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.odd { + background-color: #F0F1F1; +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: #0F1010; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #171919; +} + +a:hover { + text-decoration: underline; +} + +.contents a.qindexHL:visited { + color: #FFFFFF; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #171919; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #171919; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid #90989A; + background-color: #F7F8F8; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + background-color: #F7F8F8; + border: 1px solid #90989A; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #FFFFFF; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #D6D9D9; + font-weight: bold; + border: 1px solid #90989A; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #D6D9D9; + border: 1px solid #90989A; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #DADDDE; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #EDEFEF; + border-left: 2px solid #5B6364; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #5B6364; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #636C6D; +} + +th.dirtab { + background: #D6D9D9; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #1A1D1D; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F2F3F3; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #BBC0C1; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: #171919; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #697273; + border-left: 1px solid #697273; + border-right: 1px solid #697273; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #C4C8C9; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #171919; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #D6D9D9; + border: 1px solid #636C6D; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #697273; + border-left: 1px solid #697273; + border-right: 1px solid #697273; + padding: 6px 0px 6px 0px; + color: #030303; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #BDC2C3; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #697273; + border-left: 1px solid #697273; + border-right: 1px solid #697273; + padding: 6px 10px 2px 10px; + background-color: #F7F8F8; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #353A3B; + border-top:1px solid #212425; + border-left:1px solid #212425; + border-right:1px solid #90989A; + border-bottom:1px solid #90989A; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #5B6364; + border-bottom: 1px solid #5B6364; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #EDEFEF; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #0F1010; +} + +.arrow { + color: #5B6364; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #353A3B; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #050505; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #060606; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #0B0C0C; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #697273; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #697273; + border-bottom: 1px solid #697273; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #697273; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #C4C8C9; + font-size: 90%; + color: #030303; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #697273; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#494F50; + border:solid 1px #8C9596; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#0A0B0B; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #040404; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#2E3233; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#0A0B0B; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F2F3F3; + margin: 0px; + border-bottom: 1px solid #90989A; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #212425; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #4F5657; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#080909; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #E8EAEA; + border: 1px solid #B1B7B8; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #171919; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #060606; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #0B0C0C; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +.DocNodeRTL { + text-align: right; + direction: rtl; +} + +.DocNodeLTR { + text-align: left; + direction: ltr; +} + +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; +} + +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; +} + +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; +} +/* @end */ + +u { + text-decoration: underline; +} + diff --git a/src/dashbls/depends/mimalloc/docs/doxygen.png b/src/dashbls/depends/mimalloc/docs/doxygen.png new file mode 100644 index 0000000000000000000000000000000000000000..c0249e9e9a20cc6cea02889ee04dcca8c773d36a GIT binary patch literal 3777 zcmV;y4nFaTP)P-5Hxsw9`XeR*pWpuXysjI810GPI&ogD)f0|4y=0RJ7jTY%8i)C2%lWa}IN z+6e%Do*Wz;0Kg`-0|Ws7L;58EITERe6vpoo0f^>i0I(vf*qYuti zTzOrbp3pH;Gpd`DF9pik44a2y=iNe9buf9|q_DKMf+5iw)va%yhu+1iS)x+-_6~__mRPaF>=&sNq&!hhvG~{1?w=_oa=t0j#W$z z^$jeS$@z^@{6VM}$FaAdKt-Ts5=g>)mjg7n>jMwO?b@>!{XN{J!#R?&Dj|9w5M=P-8kCG-5`1O1H`eMiS?Gpd> zq$SACT&E)6fd1k&aXw1l?C2ye>KVf4th3k<+) zKk~592|5!6ce?Mstp$a9(BIvZ8~|9->2v2WAz&OD8ycqaH~HLJSoE2h-k7Jxpz{3r zWU?7&Y4h>N{ZLy|ll;4ZgW`7Y+9jQTwEa^oo)=S6{(Xf%#ifr~xL7eq9VzkuIDR}% zm6gt>zuu#sen!1z(X?)9Q3NlF-@n7qDo-0-Qf{27UYWgPh09 z+sjJ?NI&bfSjF^+S0r9uegW34N)`Ukm^%;3pa~Lh{igS@cE$3d;|4<@*+}Z+>K0eH zcaNE0Wl$g%Yu_=`n?557)M_*7ZvtPYqu+f8z_k5_4n<>QqZjcEmb{@uhM?uvEw4_U zIvI`}Jqp0Imo8s{UB=fI5)lD;9-*Nx;k%M=<0;k@inTZ~d4;b$rm>^Pp!RYN&x=|D zPw`>i-{H~MP2xW}Vg#;VyXMaw)~QEN{r)e%0ASjj>(0VLJQomPrYDQpMFhyOX5%K$ zC;Ut^Z1SW@s3NN;2|xNTs=&1}f!x9{AIC5sktA*PbfS<=x>37e*jn?FyInKmsP|2lRw zzK^S`Hou@iI!|7iijT6l@J#sjF`uE@En7BAyp3D3u`YEb4|Hx}zLtE^CJ%42tFvX- zc;p!nG*R`Ac1c_MC5}CM==T<}tJ~}ABi|x=dL-AWh-#!b^vyQ_O#4}d0(F-!2QolH zd;6mJfW*8|S&1nx1lQ4Du}U|;I%ooc*Qk*rgiGe^;-bs@#MJLo)6=m{my<{Gp+-5~ zq|ld?^P;0A8RZMXsH&_CC7C?pdyxOqxP&B3{9^zBm=VVk9vXrh*RMyByih&TQQGqR z>~j;8Nr{Q3R}d0{)2GV0y(ui?5P4)bi)?DVynVDAHf)gik&%%w96!bdb{a8iv?g`s zN{P2wr^8qO_y+*f9`*Fo6swT7B(otsO}GG#PCfK`Sz8u))W!m7-V`rpSvc{} z@8U^b7_20xxeJ-_E?v83d|I#*0L;iJn@q9^7XB-y@ZkiqNTlG0hmdC_mNK29oWfpNo^hwbTWGJCUr8DYj~C1W0cyHhbZ#6{v4$ zkeJQQO#omV>_}fzcPBQt0do~9JjGMeACr9xY8qDJQ;m03Qdcweev)b_g zan{C-s@T|AQ{VRU!()R7Np_bnU(VoUk^MTdFXUxrhw_%kVJl9tCbnt-0Bw<39q&+M zTd@f*sGFmseshja;%&>zL+++5vloRW{W@8ZKKXPz56>c!7Z4;l-T3E& zm0@AiB$*jhxGO)^1(Hk=@q@|#*5tI+aPHk30IVo_<_uiAcrlse&DtF4R;FgGcWg_q zs=6BUqNdl8jxa|_Rx@DmquM0x+g7m}3pvbZxSw*tqQw$FA^vro{Pzh42$s6X4F)WG zGrofUMv;&GvX~sXzEt$39qsMW)Y#}n-=4PWBmy)gY?|VQ=Yy?k!~pTPAvPh&liP!I zLlP2js;snx|99)&-8X&RdH|*!{^C^raUtWCOIM{+aeGO;C^CNY#tq?hbnenclVR~P zB53GSU|cxvAs^82Rs;nFN&Ni$e8|76sxM*D+-TOBy7_~xQX{7rwBEypYv#+^oVeC! zWZ=N(`?E-Xwoz6=dFU6`s-)8$A2S=JzW#&iPcCkdc6BS()>snlu!rd?cI zEd2WW`vZU(sl#3t>QAKo{ZL;`^!)h}?;;g+>-)Epnfh`V9+H8VzH%l0d9)-mGyDA* zvXS=ifPw0TZ@gjVGdpuV9`_#wc|5xcb|PQvuES#6%#<-4h{|n7rv!M?_NCtz>KOd)mWWJN4_co7PgQw;=gv!$(^ms9?YQVUsK0qLifm@g)Wl-ozyT63 z_1$HtC@;@U->^}dM-+!)cI*OAxg5v4WYK~;k`vmSOg5Z+X2iak*k+y_pF9Vnzj(5f zLb@Itp5K%Hs<4O%0JtNG`nLh}%?ztJhBSs=5EDQjw zD3{tp$)SS`4l91btx+8_7Xt>E3cETb1*cDyXOhhrvN@LllqV$yP5}CojL?2bPCwyK zO2r?>jWhH0&DRIANJeOH7I7z$?>G<7hvDVzEu2-HJc;tsf5XkAALeK@mhr@s9id&5 zE-R?1*ecF7ST@w<>j<^XqeN`8si{erK@3phvUknuTJZNg2_VZH5*IG80!RSK-oYWx z&D~x2pdN_Yni_5^vf?&l}TzWY`Z=O0RTq&8`^!Fp_my8!I%9V8z4745O_EYhv8kqh%P z383u+P_U6F#v|lOyckP>cyaLJ)nMah!2vMa+LTlPrX8=D$NKEZ(RftH!H}E~C;5UwkUze;08E?YRn9IhYaFRVTsV7{ig{HyCy?RVw=d*& zc)b~`;TP{hwm1g>up+YQOFvGsdRScw0I)@i=Skff0IWy=h!E7#{}2H94bdDb-fI*8 zJgMJfK0~F$ZMqzsDl6s0_(qN;3Ke-Rt*xuv`}La@8u6;>$^$?fB(uXWWjxVj0QeOt zx4F4F)L#7R^^h~@b^*XWPc#?!_V=YW>h|amZ@OTnE^z+r8KJ#4HZ%wis#|wQxcBdm zlP6A~zM;MgS_!C@7HUf!0iaFVw`&&-_mjc}Hy-tLp%>PpXDnf85dipqK + + + + + + +mi-malloc: Environment Options + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Environment Options
+
+
+

You can set further options either programmatically (using mi_option_set), or via environment variables.

+
    +
  • MIMALLOC_SHOW_STATS=1: show statistics when the program terminates.
  • +
  • MIMALLOC_VERBOSE=1: show verbose messages.
  • +
  • MIMALLOC_SHOW_ERRORS=1: show error and warning messages.
  • +
  • MIMALLOC_PAGE_RESET=0: by default, mimalloc will reset (or purge) OS pages when not in use to signal to the OS that the underlying physical memory can be reused. This can reduce memory fragmentation in long running (server) programs. By setting it to 0 no such page resets will be done which can improve performance for programs that are not long running. As an alternative, the MIMALLOC_RESET_DELAY=<msecs> can be set higher (100ms by default) to make the page reset occur less frequently instead of turning it off completely.
  • +
  • MIMALLOC_LARGE_OS_PAGES=1: use large OS pages (2MiB) when available; for some workloads this can significantly improve performance. Use MIMALLOC_VERBOSE to check if the large OS pages are enabled – usually one needs to explicitly allow large OS pages (as on Windows and Linux). However, sometimes the OS is very slow to reserve contiguous physical memory for large OS pages so use with care on systems that can have fragmented memory (for that reason, we generally recommend to use MIMALLOC_RESERVE_HUGE_OS_PAGES instead when possible).
  • +
  • MIMALLOC_RESERVE_HUGE_OS_PAGES=N: where N is the number of 1GiB huge OS pages. This reserves the huge pages at startup and sometimes this can give a large (latency) performance improvement on big workloads. Usually it is better to not use MIMALLOC_LARGE_OS_PAGES in combination with this setting. Just like large OS pages, use with care as reserving contiguous physical memory can take a long time when memory is fragmented (but reserving the huge pages is done at startup only once). Note that we usually need to explicitly enable huge OS pages (as on Windows and Linux)). With huge OS pages, it may be beneficial to set the setting MIMALLOC_EAGER_COMMIT_DELAY=N (N is 1 by default) to delay the initial N segments (of 4MiB) of a thread to not allocate in the huge OS pages; this prevents threads that are short lived and allocate just a little to take up space in the huge OS page area (which cannot be reset).
  • +
  • MIMALLOC_RESERVE_HUGE_OS_PAGES_AT=N: where N is the numa node. This reserves the huge pages at a specific numa node. (N is -1 by default to reserve huge pages evenly among the given number of numa nodes (or use the available ones as detected))
  • +
+

Use caution when using fork in combination with either large or huge OS pages: on a fork, the OS uses copy-on-write for all pages in the original process including the huge OS pages. When any memory is now written in that area, the OS will copy the entire 1GiB huge page (or 2MiB large page) which can cause the memory usage to grow in big increments.

+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/folderclosed.png b/src/dashbls/depends/mimalloc/docs/folderclosed.png new file mode 100644 index 0000000000000000000000000000000000000000..53b7aa6ae298edbe9de5ec8b3d61a238c2150866 GIT binary patch literal 617 zcmV-v0+#)WP)xPT7;^LX)c zpgs?W0J8h`ogSWTZ#e*P9#jf2c`ImVHeCl_KJ5eBTL5q_IP*<@wE0+l|MnHvTdnj9 zjtiv{9F9im+@*Pv=rMos+NG5hynpw$;L_{&`v9{0_3mzeXXh!dt*+u~qk+bi%ldQg zZV#Q#Ep)qG8arrG0XNsyaHH8Iv=Fod4EOf1xv}y5)QEok{DmY*oh4MgOD=c}!_YdI z9!L7QloC-KL^G`*I zgveM#S1qI_HNyNH0IE=G^1b^H)Wh|48-ZzHDl9FTAd&oD&-1YV@dKmKH5S-fND2for5s^?7k~gyhrRT<_=XwCLn~BckfUhu|K*qvW4FL1t zrm`D5uT@f2_u%m0Aa~BF>U?E07k14&r}5(QG5{1%5_mNjyfHByQ%q45>%OFr`W|>n{Qv)G3m5ncf`~hH?1Xy>00000NkvXXu0mjf DES(-r literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/folderopen.png b/src/dashbls/depends/mimalloc/docs/folderopen.png new file mode 100644 index 0000000000000000000000000000000000000000..92225ee954bb39ac4ad7c736bb91ae06bd7b9a69 GIT binary patch literal 687 zcmV;g0#N;lP)PPDeQBA?IW+}WWq0H}tkMVDfi>CpKL^z)~Wc#_RxdTI*kbQ+070?A|&)0309 zH#39GgZr3$l)+pshc8P@IC1(69UhIDT4<^unM%b6qEWazI^gN_ZrDyZ-5v%vTpn&+ zuotE=RRyJ*uo?$j=T_BJNRq^S zjqRIfz$CzfiiIK?Eafd(k_D+aSSC>VS%StaClta=K#!{>AXP6OJ$Z`y{JSA5vLNSV zWpXMeM<=B0;B^r`O+1PG>MGv9dRZ||rV2RG`uY!8*aY#c1i?lNj2TzNs9d~ui%b<9 zK6ae)!&Kz*fEo9-s&DnXpttDz+8RE*dt1K(wNyfhS)RGRru(M%a$%-q>fU4{;qS!(kE(g-B0mAMpo! zNOvGWcKQ9n-`m?uLVbPYK%}3ri%AZ#m~bRQjzpt#n^rJ-arg=V{4M + + + + + + +mi-malloc: Data Fields + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all struct and union fields with links to the structures/unions they belong to:
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/functions_vars.html b/src/dashbls/depends/mimalloc/docs/functions_vars.html new file mode 100644 index 000000000000..a12ef6226574 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/functions_vars.html @@ -0,0 +1,123 @@ + + + + + + + +mi-malloc: Data Fields - Variables + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__aligned.html b/src/dashbls/depends/mimalloc/docs/group__aligned.html new file mode 100644 index 000000000000..bd11f30f2732 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__aligned.html @@ -0,0 +1,465 @@ + + + + + + + +mi-malloc: Aligned Allocation + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Aligned Allocation
+
+
+ +

Allocating aligned memory blocks. +More...

+ + + + + +

+Macros

#define MI_ALIGNMENT_MAX
 The maximum supported alignment size (currently 1MiB). More...
 
+ + + + + + + + + + + + + + + + + + + +

+Functions

void * mi_malloc_aligned (size_t size, size_t alignment)
 Allocate size bytes aligned by alignment. More...
 
void * mi_zalloc_aligned (size_t size, size_t alignment)
 
void * mi_calloc_aligned (size_t count, size_t size, size_t alignment)
 
void * mi_realloc_aligned (void *p, size_t newsize, size_t alignment)
 
void * mi_malloc_aligned_at (size_t size, size_t alignment, size_t offset)
 Allocate size bytes aligned by alignment at a specified offset. More...
 
void * mi_zalloc_aligned_at (size_t size, size_t alignment, size_t offset)
 
void * mi_calloc_aligned_at (size_t count, size_t size, size_t alignment, size_t offset)
 
void * mi_realloc_aligned_at (void *p, size_t newsize, size_t alignment, size_t offset)
 
+

Detailed Description

+

Allocating aligned memory blocks.

+

Macro Definition Documentation

+ +

◆ MI_ALIGNMENT_MAX

+ +
+
+ + + + +
#define MI_ALIGNMENT_MAX
+
+ +

The maximum supported alignment size (currently 1MiB).

+ +
+
+

Function Documentation

+ +

◆ mi_calloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_calloc_aligned (size_t count,
size_t size,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_calloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_calloc_aligned_at (size_t count,
size_t size,
size_t alignment,
size_t offset 
)
+
+ +
+
+ +

◆ mi_malloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_malloc_aligned (size_t size,
size_t alignment 
)
+
+ +

Allocate size bytes aligned by alignment.

+
Parameters
+ + + +
sizenumber of bytes to allocate.
alignmentthe minimal alignment of the allocated memory. Must be less than MI_ALIGNMENT_MAX.
+
+
+
Returns
pointer to the allocated memory or NULL if out of memory. The returned pointer is aligned by alignment, i.e. (uintptr_t)p % alignment == 0.
+

Returns a unique pointer if called with size 0.

See also
_aligned_malloc (on Windows)
+
+aligned_alloc (on BSD, with switched arguments!)
+
+posix_memalign (on Posix, with switched arguments!)
+
+memalign (on Linux, with switched arguments!)
+ +
+
+ +

◆ mi_malloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_malloc_aligned_at (size_t size,
size_t alignment,
size_t offset 
)
+
+ +

Allocate size bytes aligned by alignment at a specified offset.

+
Parameters
+ + + + +
sizenumber of bytes to allocate.
alignmentthe minimal alignment of the allocated memory at offset.
offsetthe offset that should be aligned.
+
+
+
Returns
pointer to the allocated memory or NULL if out of memory. The returned pointer is aligned by alignment at offset, i.e. ((uintptr_t)p + offset) % alignment == 0.
+

Returns a unique pointer if called with size 0.

See also
_aligned_offset_malloc (on Windows)
+ +
+
+ +

◆ mi_realloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_realloc_aligned (void * p,
size_t newsize,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_realloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_realloc_aligned_at (void * p,
size_t newsize,
size_t alignment,
size_t offset 
)
+
+ +
+
+ +

◆ mi_zalloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_zalloc_aligned (size_t size,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_zalloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_zalloc_aligned_at (size_t size,
size_t alignment,
size_t offset 
)
+
+ +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__aligned.js b/src/dashbls/depends/mimalloc/docs/group__aligned.js new file mode 100644 index 000000000000..06ccb0c370bb --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__aligned.js @@ -0,0 +1,12 @@ +var group__aligned = +[ + [ "MI_ALIGNMENT_MAX", "group__aligned.html#ga83c03016066b438f51a8095e9140be06", null ], + [ "mi_calloc_aligned", "group__aligned.html#ga53dddb4724042a90315b94bc268fb4c9", null ], + [ "mi_calloc_aligned_at", "group__aligned.html#ga08647c4593f3b2eef24a919a73eba3a3", null ], + [ "mi_malloc_aligned", "group__aligned.html#ga68930196751fa2cca9e1fd0d71bade56", null ], + [ "mi_malloc_aligned_at", "group__aligned.html#ga5850da130c936bd77db039dcfbc8295d", null ], + [ "mi_realloc_aligned", "group__aligned.html#ga4028d1cf4aa4c87c880747044a8322ae", null ], + [ "mi_realloc_aligned_at", "group__aligned.html#gaf66a9ae6c6f08bd6be6fb6ea771faffb", null ], + [ "mi_zalloc_aligned", "group__aligned.html#ga0cadbcf5b89a7b6fb171bc8df8734819", null ], + [ "mi_zalloc_aligned_at", "group__aligned.html#ga5f8c2353766db522565e642fafd8a3f8", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/group__analysis.html b/src/dashbls/depends/mimalloc/docs/group__analysis.html new file mode 100644 index 000000000000..883099fe50a7 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__analysis.html @@ -0,0 +1,379 @@ + + + + + + + +mi-malloc: Heap Introspection + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Heap Introspection
+
+
+ +

Inspect the heap at runtime. +More...

+ + + + + +

+Data Structures

struct  mi_heap_area_t
 An area of heap space contains blocks of a single size. More...
 
+ + + + +

+Typedefs

typedef bool() mi_block_visit_fun(const mi_heap_t *heap, const mi_heap_area_t *area, void *block, size_t block_size, void *arg)
 Visitor function passed to mi_heap_visit_blocks() More...
 
+ + + + + + + + + + + + + +

+Functions

bool mi_heap_contains_block (mi_heap_t *heap, const void *p)
 Does a heap contain a pointer to a previously allocated block? More...
 
bool mi_heap_check_owned (mi_heap_t *heap, const void *p)
 Check safely if any pointer is part of a heap. More...
 
bool mi_check_owned (const void *p)
 Check safely if any pointer is part of the default heap of this thread. More...
 
bool mi_heap_visit_blocks (const mi_heap_t *heap, bool visit_all_blocks, mi_block_visit_fun *visitor, void *arg)
 Visit all areas and blocks in a heap. More...
 
+

Detailed Description

+

Inspect the heap at runtime.

+

Data Structure Documentation

+ +

◆ mi_heap_area_t

+ +
+
+ + + + +
struct mi_heap_area_t
+
+

An area of heap space contains blocks of a single size.

+

The bytes in freed blocks are committed - used.

+
+ + + + + + + + + + + + + + + + +
Data Fields
+size_t +block_size +size in bytes of one block
+void * +blocks +start of the area containing heap blocks
+size_t +committed +current committed bytes of this area
+size_t +reserved +bytes reserved for this area
+size_t +used +bytes in use by allocated blocks
+ +
+
+

Typedef Documentation

+ +

◆ mi_block_visit_fun

+ +
+
+ + + + +
typedef bool() mi_block_visit_fun(const mi_heap_t *heap, const mi_heap_area_t *area, void *block, size_t block_size, void *arg)
+
+ +

Visitor function passed to mi_heap_visit_blocks()

+
Returns
true if ok, false to stop visiting (i.e. break)
+

This function is always first called for every area with block as a NULL pointer. If visit_all_blocks was true, the function is then called for every allocated block in that area.

+ +
+
+

Function Documentation

+ +

◆ mi_check_owned()

+ +
+
+ + + + + + + + +
bool mi_check_owned (const void * p)
+
+ +

Check safely if any pointer is part of the default heap of this thread.

+
Parameters
+ + +
pAny pointer – not required to be previously allocated by us.
+
+
+
Returns
true if p points to a block in default heap of this thread.
+

Note: expensive function, linear in the pages in the heap.

See also
mi_heap_contains_block()
+
+mi_heap_get_default()
+ +
+
+ +

◆ mi_heap_check_owned()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool mi_heap_check_owned (mi_heap_theap,
const void * p 
)
+
+ +

Check safely if any pointer is part of a heap.

+
Parameters
+ + + +
heapThe heap.
pAny pointer – not required to be previously allocated by us.
+
+
+
Returns
true if p points to a block in heap.
+

Note: expensive function, linear in the pages in the heap.

See also
mi_heap_contains_block()
+
+mi_heap_get_default()
+ +
+
+ +

◆ mi_heap_contains_block()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool mi_heap_contains_block (mi_heap_theap,
const void * p 
)
+
+ +

Does a heap contain a pointer to a previously allocated block?

+
Parameters
+ + + +
heapThe heap.
pPointer to a previously allocated block (in any heap)– cannot be some random pointer!
+
+
+
Returns
true if the block pointed to by p is in the heap.
+
See also
mi_heap_check_owned()
+ +
+
+ +

◆ mi_heap_visit_blocks()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool mi_heap_visit_blocks (const mi_heap_theap,
bool visit_all_blocks,
mi_block_visit_funvisitor,
void * arg 
)
+
+ +

Visit all areas and blocks in a heap.

+
Parameters
+ + + + + +
heapThe heap to visit.
visit_all_blocksIf true visits all allocated blocks, otherwise visitor is only called for every heap area.
visitorThis function is called for every area in the heap (with block as NULL). If visit_all_blocks is true, visitor is also called for every allocated block in every area (with block!=NULL). return false from this function to stop visiting early.
argExtra argument passed to visitor.
+
+
+
Returns
true if all areas and blocks were visited.
+ +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__analysis.js b/src/dashbls/depends/mimalloc/docs/group__analysis.js new file mode 100644 index 000000000000..351783628ddf --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__analysis.js @@ -0,0 +1,15 @@ +var group__analysis = +[ + [ "mi_heap_area_t", "group__analysis.html#structmi__heap__area__t", [ + [ "block_size", "group__analysis.html#a332a6c14d736a99699d5453a1cb04b41", null ], + [ "blocks", "group__analysis.html#ae0085e6e1cf059a4eb7767e30e9991b8", null ], + [ "committed", "group__analysis.html#ab47526df656d8837ec3e97f11b83f835", null ], + [ "reserved", "group__analysis.html#ae848a3e6840414891035423948ca0383", null ], + [ "used", "group__analysis.html#ab820302c5cd0df133eb8e51650a008b4", null ] + ] ], + [ "mi_block_visit_fun", "group__analysis.html#gadfa01e2900f0e5d515ad5506b26f6d65", null ], + [ "mi_check_owned", "group__analysis.html#ga628c237489c2679af84a4d0d143b3dd5", null ], + [ "mi_heap_check_owned", "group__analysis.html#ga0d67c1789faaa15ff366c024fcaf6377", null ], + [ "mi_heap_contains_block", "group__analysis.html#gaa862aa8ed8d57d84cae41fc1022d71af", null ], + [ "mi_heap_visit_blocks", "group__analysis.html#ga70c46687dc6e9dc98b232b02646f8bed", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/group__analysis_structmi__heap__area__t.js b/src/dashbls/depends/mimalloc/docs/group__analysis_structmi__heap__area__t.js new file mode 100644 index 000000000000..2dbabc5cde17 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__analysis_structmi__heap__area__t.js @@ -0,0 +1,8 @@ +var group__analysis_structmi__heap__area__t = +[ + [ "block_size", "group__analysis.html#a332a6c14d736a99699d5453a1cb04b41", null ], + [ "blocks", "group__analysis.html#ae0085e6e1cf059a4eb7767e30e9991b8", null ], + [ "committed", "group__analysis.html#ab47526df656d8837ec3e97f11b83f835", null ], + [ "reserved", "group__analysis.html#ae848a3e6840414891035423948ca0383", null ], + [ "used", "group__analysis.html#ab820302c5cd0df133eb8e51650a008b4", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/group__cpp.html b/src/dashbls/depends/mimalloc/docs/group__cpp.html new file mode 100644 index 000000000000..e81179feb643 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__cpp.html @@ -0,0 +1,393 @@ + + + + + + + +mi-malloc: C++ wrappers + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
C++ wrappers
+
+
+ +

mi_ prefixed implementations of various allocation functions that use C++ semantics on out-of-memory, generally calling std::get_new_handler and raising a std::bad_alloc exception on failure. +More...

+ + + + + +

+Data Structures

struct  mi_stl_allocator< T >
 std::allocator implementation for mimalloc for use in STL containers. More...
 
+ + + + + + + + + + + + + + + + + + + + + + +

+Functions

void * mi_new (std::size_t n) noexcept(false)
 like mi_malloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception on failure. More...
 
void * mi_new_n (size_t count, size_t size) noexcept(false)
 like mi_mallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception on failure. More...
 
void * mi_new_aligned (std::size_t n, std::align_val_t alignment) noexcept(false)
 like mi_malloc_aligned(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception on failure. More...
 
void * mi_new_nothrow (size_t n)
 like mi_malloc, but when out of memory, use std::get_new_handler but return NULL on failure. More...
 
void * mi_new_aligned_nothrow (size_t n, size_t alignment)
 like mi_malloc_aligned, but when out of memory, use std::get_new_handler but return NULL on failure. More...
 
void * mi_new_realloc (void *p, size_t newsize)
 like mi_realloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception on failure. More...
 
void * mi_new_reallocn (void *p, size_t newcount, size_t size)
 like mi_reallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception on failure. More...
 
+

Detailed Description

+

mi_ prefixed implementations of various allocation functions that use C++ semantics on out-of-memory, generally calling std::get_new_handler and raising a std::bad_alloc exception on failure.

+

Note: use the mimalloc-new-delete.h header to override the new and delete operators globally. The wrappers here are mostly for convience for library writers that need to interface with mimalloc from C++.

+

Data Structure Documentation

+ +

◆ mi_stl_allocator

+ +
+
+ + + + +
struct mi_stl_allocator
+
+

template<class T>
+struct mi_stl_allocator< T >

+ +

std::allocator implementation for mimalloc for use in STL containers.

+

For example:

std::vector<int, mi_stl_allocator<int> > vec;
+
vec.push_back(1);
+
vec.pop_back();
+
+
+
+

Function Documentation

+ +

◆ mi_new()

+ +
+
+ + + + + +
+ + + + + + + + +
void* mi_new (std::size_t n)
+
+noexcept
+
+ +

like mi_malloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception on failure.

+ +
+
+ +

◆ mi_new_aligned()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void* mi_new_aligned (std::size_t n,
std::align_val_t alignment 
)
+
+noexcept
+
+ +

like mi_malloc_aligned(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception on failure.

+ +
+
+ +

◆ mi_new_aligned_nothrow()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_new_aligned_nothrow (size_t n,
size_t alignment 
)
+
+ +

like mi_malloc_aligned, but when out of memory, use std::get_new_handler but return NULL on failure.

+ +
+
+ +

◆ mi_new_n()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void* mi_new_n (size_t count,
size_t size 
)
+
+noexcept
+
+ +

like mi_mallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception on failure.

+ +
+
+ +

◆ mi_new_nothrow()

+ +
+
+ + + + + + + + +
void* mi_new_nothrow (size_t n)
+
+ +

like mi_malloc, but when out of memory, use std::get_new_handler but return NULL on failure.

+ +
+
+ +

◆ mi_new_realloc()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_new_realloc (void * p,
size_t newsize 
)
+
+ +

like mi_realloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception on failure.

+ +
+
+ +

◆ mi_new_reallocn()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_new_reallocn (void * p,
size_t newcount,
size_t size 
)
+
+ +

like mi_reallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception on failure.

+ +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__cpp.js b/src/dashbls/depends/mimalloc/docs/group__cpp.js new file mode 100644 index 000000000000..207066468529 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__cpp.js @@ -0,0 +1,11 @@ +var group__cpp = +[ + [ "mi_stl_allocator", "group__cpp.html#structmi__stl__allocator", null ], + [ "mi_new", "group__cpp.html#gaad048a9fce3d02c5909cd05c6ec24545", null ], + [ "mi_new_aligned", "group__cpp.html#gaef2c2bdb4f70857902d3c8903ac095f3", null ], + [ "mi_new_aligned_nothrow", "group__cpp.html#gab5e29558926d934c3f1cae8c815f942c", null ], + [ "mi_new_n", "group__cpp.html#gae7bc4f56cd57ed3359060ff4f38bda81", null ], + [ "mi_new_nothrow", "group__cpp.html#gaeaded64eda71ed6b1d569d3e723abc4a", null ], + [ "mi_new_realloc", "group__cpp.html#gaab78a32f55149e9fbf432d5288e38e1e", null ], + [ "mi_new_reallocn", "group__cpp.html#ga756f4b2bc6a7ecd0a90baea8e90c7907", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/group__extended.html b/src/dashbls/depends/mimalloc/docs/group__extended.html new file mode 100644 index 000000000000..e54991180272 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__extended.html @@ -0,0 +1,1078 @@ + + + + + + + +mi-malloc: Extended Functions + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Extended Functions
+
+
+ +

Extended functionality. +More...

+ + + + + +

+Macros

#define MI_SMALL_SIZE_MAX
 Maximum size allowed for small allocations in mi_malloc_small and mi_zalloc_small (usually 128*sizeof(void*) (= 1KB on 64-bit systems)) More...
 
+ + + + + + + + + + +

+Typedefs

typedef void() mi_deferred_free_fun(bool force, unsigned long long heartbeat, void *arg)
 Type of deferred free functions. More...
 
typedef void() mi_output_fun(const char *msg, void *arg)
 Type of output functions. More...
 
typedef void() mi_error_fun(int err, void *arg)
 Type of error callback functions. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void * mi_malloc_small (size_t size)
 Allocate a small object. More...
 
void * mi_zalloc_small (size_t size)
 Allocate a zero initialized small object. More...
 
size_t mi_usable_size (void *p)
 Return the available bytes in a memory block. More...
 
size_t mi_good_size (size_t size)
 Return the used allocation size. More...
 
void mi_collect (bool force)
 Eagerly free memory. More...
 
void mi_stats_print (void *out)
 Deprecated. More...
 
void mi_stats_print_out (mi_output_fun *out, void *arg)
 Print the main statistics. More...
 
void mi_stats_reset (void)
 Reset statistics. More...
 
void mi_stats_merge (void)
 Merge thread local statistics with the main statistics and reset. More...
 
void mi_thread_init (void)
 Initialize mimalloc on a thread. More...
 
void mi_thread_done (void)
 Uninitialize mimalloc on a thread. More...
 
void mi_thread_stats_print_out (mi_output_fun *out, void *arg)
 Print out heap statistics for this thread. More...
 
void mi_register_deferred_free (mi_deferred_free_fun *deferred_free, void *arg)
 Register a deferred free function. More...
 
void mi_register_output (mi_output_fun *out, void *arg)
 Register an output function. More...
 
void mi_register_error (mi_error_fun *errfun, void *arg)
 Register an error callback function. More...
 
bool mi_is_in_heap_region (const void *p)
 Is a pointer part of our heap? More...
 
int mi_reserve_os_memory (size_t size, bool commit, bool allow_large)
 Reserve OS memory for use by mimalloc. More...
 
bool mi_manage_os_memory (void *start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node)
 Manage a particular memory area for use by mimalloc. More...
 
int mi_reserve_huge_os_pages_interleave (size_t pages, size_t numa_nodes, size_t timeout_msecs)
 Reserve pages of huge OS pages (1GiB) evenly divided over numa_nodes nodes, but stops after at most timeout_msecs seconds. More...
 
int mi_reserve_huge_os_pages_at (size_t pages, int numa_node, size_t timeout_msecs)
 Reserve pages of huge OS pages (1GiB) at a specific numa_node, but stops after at most timeout_msecs seconds. More...
 
bool mi_is_redirected ()
 Is the C runtime malloc API redirected? More...
 
void mi_process_info (size_t *elapsed_msecs, size_t *user_msecs, size_t *system_msecs, size_t *current_rss, size_t *peak_rss, size_t *current_commit, size_t *peak_commit, size_t *page_faults)
 Return process information (time and memory usage). More...
 
+

Detailed Description

+

Extended functionality.

+

Macro Definition Documentation

+ +

◆ MI_SMALL_SIZE_MAX

+ +
+
+ + + + +
#define MI_SMALL_SIZE_MAX
+
+ +

Maximum size allowed for small allocations in mi_malloc_small and mi_zalloc_small (usually 128*sizeof(void*) (= 1KB on 64-bit systems))

+ +
+
+

Typedef Documentation

+ +

◆ mi_deferred_free_fun

+ +
+
+ + + + +
typedef void() mi_deferred_free_fun(bool force, unsigned long long heartbeat, void *arg)
+
+ +

Type of deferred free functions.

+
Parameters
+ + + + +
forceIf true all outstanding items should be freed.
heartbeatA monotonically increasing count.
argArgument that was passed at registration to hold extra state.
+
+
+
See also
mi_register_deferred_free
+ +
+
+ +

◆ mi_error_fun

+ +
+
+ + + + +
typedef void() mi_error_fun(int err, void *arg)
+
+ +

Type of error callback functions.

+
Parameters
+ + + +
errError code (see mi_register_error() for a complete list).
argArgument that was passed at registration to hold extra state.
+
+
+
See also
mi_register_error()
+ +
+
+ +

◆ mi_output_fun

+ +
+
+ + + + +
typedef void() mi_output_fun(const char *msg, void *arg)
+
+ +

Type of output functions.

+
Parameters
+ + + +
msgMessage to output.
argArgument that was passed at registration to hold extra state.
+
+
+
See also
mi_register_output()
+ +
+
+

Function Documentation

+ +

◆ mi_collect()

+ +
+
+ + + + + + + + +
void mi_collect (bool force)
+
+ +

Eagerly free memory.

+
Parameters
+ + +
forceIf true, aggressively return memory to the OS (can be expensive!)
+
+
+

Regular code should not have to call this function. It can be beneficial in very narrow circumstances; in particular, when a long running thread allocates a lot of blocks that are freed by other threads it may improve resource usage by calling this every once in a while.

+ +
+
+ +

◆ mi_good_size()

+ +
+
+ + + + + + + + +
size_t mi_good_size (size_t size)
+
+ +

Return the used allocation size.

+
Parameters
+ + +
sizeThe minimal required size in bytes.
+
+
+
Returns
the size n that will be allocated, where n >= size.
+

Generally, mi_usable_size(mi_malloc(size)) == mi_good_size(size). This can be used to reduce internal wasted space when allocating buffers for example.

+
See also
mi_usable_size()
+ +
+
+ +

◆ mi_is_in_heap_region()

+ +
+
+ + + + + + + + +
bool mi_is_in_heap_region (const void * p)
+
+ +

Is a pointer part of our heap?

+
Parameters
+ + +
pThe pointer to check.
+
+
+
Returns
true if this is a pointer into our heap. This function is relatively fast.
+ +
+
+ +

◆ mi_is_redirected()

+ +
+
+ + + + + + + +
bool mi_is_redirected ()
+
+ +

Is the C runtime malloc API redirected?

+
Returns
true if all malloc API calls are redirected to mimalloc.
+

Currenty only used on Windows.

+ +
+
+ +

◆ mi_malloc_small()

+ +
+
+ + + + + + + + +
void* mi_malloc_small (size_t size)
+
+ +

Allocate a small object.

+
Parameters
+ + +
sizeThe size in bytes, can be at most MI_SMALL_SIZE_MAX.
+
+
+
Returns
a pointer to newly allocated memory of at least size bytes, or NULL if out of memory. This function is meant for use in run-time systems for best performance and does not check if size was indeed small – use with care!
+ +
+
+ +

◆ mi_manage_os_memory()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool mi_manage_os_memory (void * start,
size_t size,
bool is_committed,
bool is_large,
bool is_zero,
int numa_node 
)
+
+ +

Manage a particular memory area for use by mimalloc.

+

This is just like mi_reserve_os_memory except that the area should already be allocated in some manner and available for use my mimalloc.

Parameters
+ + + + + + + +
startStart of the memory area
sizeThe size of the memory area.
commitIs the area already committed?
is_largeDoes it consist of large OS pages? Set this to true as well for memory that should not be decommitted or protected (like rdma etc.)
is_zeroDoes the area consists of zero's?
numa_nodePossible associated numa node or -1.
+
+
+
Returns
true if successful, and false on error.
+ +
+
+ +

◆ mi_process_info()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mi_process_info (size_t * elapsed_msecs,
size_t * user_msecs,
size_t * system_msecs,
size_t * current_rss,
size_t * peak_rss,
size_t * current_commit,
size_t * peak_commit,
size_t * page_faults 
)
+
+ +

Return process information (time and memory usage).

+
Parameters
+ + + + + + + + + +
elapsed_msecsOptional. Elapsed wall-clock time of the process in milli-seconds.
user_msecsOptional. User time in milli-seconds (as the sum over all threads).
system_msecsOptional. System time in milli-seconds.
current_rssOptional. Current working set size (touched pages).
peak_rssOptional. Peak working set size (touched pages).
current_commitOptional. Current committed memory (backed by the page file).
peak_commitOptional. Peak committed memory (backed by the page file).
page_faultsOptional. Count of hard page faults.
+
+
+

The current_rss is precise on Windows and MacOSX; other systems estimate this using current_commit. The commit is precise on Windows but estimated on other systems as the amount of read/write accessible memory reserved by mimalloc.

+ +
+
+ +

◆ mi_register_deferred_free()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_register_deferred_free (mi_deferred_free_fundeferred_free,
void * arg 
)
+
+ +

Register a deferred free function.

+
Parameters
+ + + +
deferred_freeAddress of a deferred free-ing function or NULL to unregister.
argArgument that will be passed on to the deferred free function.
+
+
+

Some runtime systems use deferred free-ing, for example when using reference counting to limit the worst case free time. Such systems can register (re-entrant) deferred free function to free more memory on demand. When the force parameter is true all possible memory should be freed. The per-thread heartbeat parameter is monotonically increasing and guaranteed to be deterministic if the program allocates deterministically. The deferred_free function is guaranteed to be called deterministically after some number of allocations (regardless of freeing or available free memory). At most one deferred_free function can be active.

+ +
+
+ +

◆ mi_register_error()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_register_error (mi_error_funerrfun,
void * arg 
)
+
+ +

Register an error callback function.

+
Parameters
+ + + +
errfunThe error function that is called on an error (use NULL for default)
argExtra argument that will be passed on to the error function.
+
+
+

The errfun function is called on an error in mimalloc after emitting an error message (through the output function). It as always legal to just return from the errfun function in which case allocation functions generally return NULL or ignore the condition. The default function only calls abort() when compiled in secure mode with an EFAULT error. The possible error codes are:

    +
  • EAGAIN: Double free was detected (only in debug and secure mode).
  • +
  • EFAULT: Corrupted free list or meta-data was detected (only in debug and secure mode).
  • +
  • ENOMEM: Not enough memory available to satisfy the request.
  • +
  • EOVERFLOW: Too large a request, for example in mi_calloc(), the count and size parameters are too large.
  • +
  • EINVAL: Trying to free or re-allocate an invalid pointer.
  • +
+ +
+
+ +

◆ mi_register_output()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_register_output (mi_output_funout,
void * arg 
)
+
+ +

Register an output function.

+
Parameters
+ + + +
outThe output function, use NULL to output to stderr.
argArgument that will be passed on to the output function.
+
+
+

The out function is called to output any information from mimalloc, like verbose or warning messages.

+ +
+
+ +

◆ mi_reserve_huge_os_pages_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int mi_reserve_huge_os_pages_at (size_t pages,
int numa_node,
size_t timeout_msecs 
)
+
+ +

Reserve pages of huge OS pages (1GiB) at a specific numa_node, but stops after at most timeout_msecs seconds.

+
Parameters
+ + + + +
pagesThe number of 1GiB pages to reserve.
numa_nodeThe NUMA node where the memory is reserved (start at 0).
timeout_msecsMaximum number of milli-seconds to try reserving, or 0 for no timeout.
+
+
+
Returns
0 if successfull, ENOMEM if running out of memory, or ETIMEDOUT if timed out.
+

The reserved memory is used by mimalloc to satisfy allocations. May quit before timeout_msecs are expired if it estimates it will take more than 1.5 times timeout_msecs. The time limit is needed because on some operating systems it can take a long time to reserve contiguous memory if the physical memory is fragmented.

+ +
+
+ +

◆ mi_reserve_huge_os_pages_interleave()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int mi_reserve_huge_os_pages_interleave (size_t pages,
size_t numa_nodes,
size_t timeout_msecs 
)
+
+ +

Reserve pages of huge OS pages (1GiB) evenly divided over numa_nodes nodes, but stops after at most timeout_msecs seconds.

+
Parameters
+ + + + +
pagesThe number of 1GiB pages to reserve.
numa_nodesThe number of nodes do evenly divide the pages over, or 0 for using the actual number of NUMA nodes.
timeout_msecsMaximum number of milli-seconds to try reserving, or 0 for no timeout.
+
+
+
Returns
0 if successfull, ENOMEM if running out of memory, or ETIMEDOUT if timed out.
+

The reserved memory is used by mimalloc to satisfy allocations. May quit before timeout_msecs are expired if it estimates it will take more than 1.5 times timeout_msecs. The time limit is needed because on some operating systems it can take a long time to reserve contiguous memory if the physical memory is fragmented.

+ +
+
+ +

◆ mi_reserve_os_memory()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int mi_reserve_os_memory (size_t size,
bool commit,
bool allow_large 
)
+
+ +

Reserve OS memory for use by mimalloc.

+

Reserved areas are used before allocating from the OS again. By reserving a large area upfront, allocation can be more efficient, and can be better managed on systems without mmap/VirtualAlloc (like WASM for example).

Parameters
+ + + + +
sizeThe size to reserve.
commitCommit the memory upfront.
allow_largeAllow large OS pages (2MiB) to be used?
+
+
+
Returns
0 if successful, and an error code otherwise (e.g. ENOMEM).
+ +
+
+ +

◆ mi_stats_merge()

+ +
+
+ + + + + + + + +
void mi_stats_merge (void )
+
+ +

Merge thread local statistics with the main statistics and reset.

+ +
+
+ +

◆ mi_stats_print()

+ +
+
+ + + + + + + + +
void mi_stats_print (void * out)
+
+ +

Deprecated.

+
Parameters
+ + +
outIgnored, outputs to the registered output function or stderr by default.
+
+
+

Most detailed when using a debug build.

+ +
+
+ +

◆ mi_stats_print_out()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_stats_print_out (mi_output_funout,
void * arg 
)
+
+ +

Print the main statistics.

+
Parameters
+ + + +
outAn output function or NULL for the default.
argOptional argument passed to out (if not NULL)
+
+
+

Most detailed when using a debug build.

+ +
+
+ +

◆ mi_stats_reset()

+ +
+
+ + + + + + + + +
void mi_stats_reset (void )
+
+ +

Reset statistics.

+ +
+
+ +

◆ mi_thread_done()

+ +
+
+ + + + + + + + +
void mi_thread_done (void )
+
+ +

Uninitialize mimalloc on a thread.

+

Should not be used as on most systems (pthreads, windows) this is done automatically. Ensures that any memory that is not freed yet (but will be freed by other threads in the future) is properly handled.

+ +
+
+ +

◆ mi_thread_init()

+ +
+
+ + + + + + + + +
void mi_thread_init (void )
+
+ +

Initialize mimalloc on a thread.

+

Should not be used as on most systems (pthreads, windows) this is done automatically.

+ +
+
+ +

◆ mi_thread_stats_print_out()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_thread_stats_print_out (mi_output_funout,
void * arg 
)
+
+ +

Print out heap statistics for this thread.

+
Parameters
+ + + +
outAn output function or NULL for the default.
argOptional argument passed to out (if not NULL)
+
+
+

Most detailed when using a debug build.

+ +
+
+ +

◆ mi_usable_size()

+ +
+
+ + + + + + + + +
size_t mi_usable_size (void * p)
+
+ +

Return the available bytes in a memory block.

+
Parameters
+ + +
pPointer to previously allocated memory (or NULL)
+
+
+
Returns
Returns the available bytes in the memory block, or 0 if p was NULL.
+

The returned size can be used to call mi_expand successfully. The returned size is always at least equal to the allocated size of p, and, in the current design, should be less than 16.7% more.

+
See also
_msize (Windows)
+
+malloc_usable_size (Linux)
+
+mi_good_size()
+ +
+
+ +

◆ mi_zalloc_small()

+ +
+
+ + + + + + + + +
void* mi_zalloc_small (size_t size)
+
+ +

Allocate a zero initialized small object.

+
Parameters
+ + +
sizeThe size in bytes, can be at most MI_SMALL_SIZE_MAX.
+
+
+
Returns
a pointer to newly allocated zero-initialized memory of at least size bytes, or NULL if out of memory. This function is meant for use in run-time systems for best performance and does not check if size was indeed small – use with care!
+ +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__extended.js b/src/dashbls/depends/mimalloc/docs/group__extended.js new file mode 100644 index 000000000000..c217aaca76b6 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__extended.js @@ -0,0 +1,29 @@ +var group__extended = +[ + [ "MI_SMALL_SIZE_MAX", "group__extended.html#ga1ea64283508718d9d645c38efc2f4305", null ], + [ "mi_deferred_free_fun", "group__extended.html#ga299dae78d25ce112e384a98b7309c5be", null ], + [ "mi_error_fun", "group__extended.html#ga251d369cda3f1c2a955c555486ed90e5", null ], + [ "mi_output_fun", "group__extended.html#gad823d23444a4b77a40f66bf075a98a0c", null ], + [ "mi_collect", "group__extended.html#ga421430e2226d7d468529cec457396756", null ], + [ "mi_good_size", "group__extended.html#gac057927cd06c854b45fe7847e921bd47", null ], + [ "mi_is_in_heap_region", "group__extended.html#ga5f071b10d4df1c3658e04e7fd67a94e6", null ], + [ "mi_is_redirected", "group__extended.html#gaad25050b19f30cd79397b227e0157a3f", null ], + [ "mi_malloc_small", "group__extended.html#ga7136c2e55cb22c98ecf95d08d6debb99", null ], + [ "mi_manage_os_memory", "group__extended.html#ga4c6486a1fdcd7a423b5f25fe4be8e0cf", null ], + [ "mi_process_info", "group__extended.html#ga7d862c2affd5790381da14eb102a364d", null ], + [ "mi_register_deferred_free", "group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece", null ], + [ "mi_register_error", "group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45", null ], + [ "mi_register_output", "group__extended.html#gae5b17ff027cd2150b43a33040250cf3f", null ], + [ "mi_reserve_huge_os_pages_at", "group__extended.html#ga7795a13d20087447281858d2c771cca1", null ], + [ "mi_reserve_huge_os_pages_interleave", "group__extended.html#ga3132f521fb756fc0e8ec0b74fb58df50", null ], + [ "mi_reserve_os_memory", "group__extended.html#ga00ec3324b6b2591c7fe3677baa30a767", null ], + [ "mi_stats_merge", "group__extended.html#ga854b1de8cb067c7316286c28b2fcd3d1", null ], + [ "mi_stats_print", "group__extended.html#ga2d126e5c62d3badc35445e5d84166df2", null ], + [ "mi_stats_print_out", "group__extended.html#ga537f13b299ddf801e49a5a94fde02c79", null ], + [ "mi_stats_reset", "group__extended.html#ga3bb8468b8cfcc6e2a61d98aee85c5f99", null ], + [ "mi_thread_done", "group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf", null ], + [ "mi_thread_init", "group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17", null ], + [ "mi_thread_stats_print_out", "group__extended.html#gab1dac8476c46cb9eecab767eb40c1525", null ], + [ "mi_usable_size", "group__extended.html#ga089c859d9eddc5f9b4bd946cd53cebee", null ], + [ "mi_zalloc_small", "group__extended.html#ga220f29f40a44404b0061c15bc1c31152", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/group__heap.html b/src/dashbls/depends/mimalloc/docs/group__heap.html new file mode 100644 index 000000000000..0f21ea42c122 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__heap.html @@ -0,0 +1,1074 @@ + + + + + + + +mi-malloc: Heap Allocation + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Heap Allocation
+
+
+ +

First-class heaps that can be destroyed in one go. +More...

+ + + + + +

+Typedefs

typedef struct mi_heap_s mi_heap_t
 Type of first-class heaps. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

mi_heap_tmi_heap_new ()
 Create a new heap that can be used for allocation. More...
 
void mi_heap_delete (mi_heap_t *heap)
 Delete a previously allocated heap. More...
 
void mi_heap_destroy (mi_heap_t *heap)
 Destroy a heap, freeing all its still allocated blocks. More...
 
mi_heap_tmi_heap_set_default (mi_heap_t *heap)
 Set the default heap to use for mi_malloc() et al. More...
 
mi_heap_tmi_heap_get_default ()
 Get the default heap that is used for mi_malloc() et al. More...
 
mi_heap_tmi_heap_get_backing ()
 Get the backing heap. More...
 
void mi_heap_collect (mi_heap_t *heap, bool force)
 Release outstanding resources in a specific heap. More...
 
void * mi_heap_malloc (mi_heap_t *heap, size_t size)
 Allocate in a specific heap. More...
 
void * mi_heap_malloc_small (mi_heap_t *heap, size_t size)
 Allocate a small object in a specific heap. More...
 
void * mi_heap_zalloc (mi_heap_t *heap, size_t size)
 Allocate zero-initialized in a specific heap. More...
 
void * mi_heap_calloc (mi_heap_t *heap, size_t count, size_t size)
 Allocate count zero-initialized elements in a specific heap. More...
 
void * mi_heap_mallocn (mi_heap_t *heap, size_t count, size_t size)
 Allocate count elements in a specific heap. More...
 
char * mi_heap_strdup (mi_heap_t *heap, const char *s)
 Duplicate a string in a specific heap. More...
 
char * mi_heap_strndup (mi_heap_t *heap, const char *s, size_t n)
 Duplicate a string of at most length n in a specific heap. More...
 
char * mi_heap_realpath (mi_heap_t *heap, const char *fname, char *resolved_name)
 Resolve a file path name using a specific heap to allocate the result. More...
 
void * mi_heap_realloc (mi_heap_t *heap, void *p, size_t newsize)
 
void * mi_heap_reallocn (mi_heap_t *heap, void *p, size_t count, size_t size)
 
void * mi_heap_reallocf (mi_heap_t *heap, void *p, size_t newsize)
 
void * mi_heap_malloc_aligned (mi_heap_t *heap, size_t size, size_t alignment)
 
void * mi_heap_malloc_aligned_at (mi_heap_t *heap, size_t size, size_t alignment, size_t offset)
 
void * mi_heap_zalloc_aligned (mi_heap_t *heap, size_t size, size_t alignment)
 
void * mi_heap_zalloc_aligned_at (mi_heap_t *heap, size_t size, size_t alignment, size_t offset)
 
void * mi_heap_calloc_aligned (mi_heap_t *heap, size_t count, size_t size, size_t alignment)
 
void * mi_heap_calloc_aligned_at (mi_heap_t *heap, size_t count, size_t size, size_t alignment, size_t offset)
 
void * mi_heap_realloc_aligned (mi_heap_t *heap, void *p, size_t newsize, size_t alignment)
 
void * mi_heap_realloc_aligned_at (mi_heap_t *heap, void *p, size_t newsize, size_t alignment, size_t offset)
 
+

Detailed Description

+

First-class heaps that can be destroyed in one go.

+

Typedef Documentation

+ +

◆ mi_heap_t

+ +
+
+ + + + +
typedef struct mi_heap_s mi_heap_t
+
+ +

Type of first-class heaps.

+

A heap can only be used for (re)allocation in the thread that created this heap! Any allocated blocks can be freed by any other thread though.

+ +
+
+

Function Documentation

+ +

◆ mi_heap_calloc()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_calloc (mi_heap_theap,
size_t count,
size_t size 
)
+
+ +

Allocate count zero-initialized elements in a specific heap.

+
See also
mi_calloc()
+ +
+
+ +

◆ mi_heap_calloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_calloc_aligned (mi_heap_theap,
size_t count,
size_t size,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_heap_calloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_calloc_aligned_at (mi_heap_theap,
size_t count,
size_t size,
size_t alignment,
size_t offset 
)
+
+ +
+
+ +

◆ mi_heap_collect()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_heap_collect (mi_heap_theap,
bool force 
)
+
+ +

Release outstanding resources in a specific heap.

+ +
+
+ +

◆ mi_heap_delete()

+ +
+
+ + + + + + + + +
void mi_heap_delete (mi_heap_theap)
+
+ +

Delete a previously allocated heap.

+

This will release resources and migrate any still allocated blocks in this heap (efficienty) to the default heap.

+

If heap is the default heap, the default heap is set to the backing heap.

+ +
+
+ +

◆ mi_heap_destroy()

+ +
+
+ + + + + + + + +
void mi_heap_destroy (mi_heap_theap)
+
+ +

Destroy a heap, freeing all its still allocated blocks.

+

Use with care as this will free all blocks still allocated in the heap. However, this can be a very efficient way to free all heap memory in one go.

+

If heap is the default heap, the default heap is set to the backing heap.

+ +
+
+ +

◆ mi_heap_get_backing()

+ +
+
+ + + + + + + +
mi_heap_t* mi_heap_get_backing ()
+
+ +

Get the backing heap.

+

The backing heap is the initial default heap for a thread and always available for allocations. It cannot be destroyed or deleted except by exiting the thread.

+ +
+
+ +

◆ mi_heap_get_default()

+ +
+
+ + + + + + + +
mi_heap_t* mi_heap_get_default ()
+
+ +

Get the default heap that is used for mi_malloc() et al.

+
Returns
The current default heap.
+ +
+
+ +

◆ mi_heap_malloc()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_heap_malloc (mi_heap_theap,
size_t size 
)
+
+ +

Allocate in a specific heap.

+
See also
mi_malloc()
+ +
+
+ +

◆ mi_heap_malloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_malloc_aligned (mi_heap_theap,
size_t size,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_heap_malloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_malloc_aligned_at (mi_heap_theap,
size_t size,
size_t alignment,
size_t offset 
)
+
+ +
+
+ +

◆ mi_heap_malloc_small()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_heap_malloc_small (mi_heap_theap,
size_t size 
)
+
+ +

Allocate a small object in a specific heap.

+

size must be smaller or equal to MI_SMALL_SIZE_MAX().

See also
mi_malloc()
+ +
+
+ +

◆ mi_heap_mallocn()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_mallocn (mi_heap_theap,
size_t count,
size_t size 
)
+
+ +

Allocate count elements in a specific heap.

+
See also
mi_mallocn()
+ +
+
+ +

◆ mi_heap_new()

+ +
+
+ + + + + + + +
mi_heap_t* mi_heap_new ()
+
+ +

Create a new heap that can be used for allocation.

+ +
+
+ +

◆ mi_heap_realloc()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_realloc (mi_heap_theap,
void * p,
size_t newsize 
)
+
+ +
+
+ +

◆ mi_heap_realloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_realloc_aligned (mi_heap_theap,
void * p,
size_t newsize,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_heap_realloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_realloc_aligned_at (mi_heap_theap,
void * p,
size_t newsize,
size_t alignment,
size_t offset 
)
+
+ +
+
+ +

◆ mi_heap_reallocf()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_reallocf (mi_heap_theap,
void * p,
size_t newsize 
)
+
+ +
+
+ +

◆ mi_heap_reallocn()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_reallocn (mi_heap_theap,
void * p,
size_t count,
size_t size 
)
+
+ +
+
+ +

◆ mi_heap_realpath()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
char* mi_heap_realpath (mi_heap_theap,
const char * fname,
char * resolved_name 
)
+
+ +

Resolve a file path name using a specific heap to allocate the result.

+
See also
mi_realpath()
+ +
+
+ +

◆ mi_heap_set_default()

+ +
+
+ + + + + + + + +
mi_heap_t* mi_heap_set_default (mi_heap_theap)
+
+ +

Set the default heap to use for mi_malloc() et al.

+
Parameters
+ + +
heapThe new default heap.
+
+
+
Returns
The previous default heap.
+ +
+
+ +

◆ mi_heap_strdup()

+ +
+
+ + + + + + + + + + + + + + + + + + +
char* mi_heap_strdup (mi_heap_theap,
const char * s 
)
+
+ +

Duplicate a string in a specific heap.

+
See also
mi_strdup()
+ +
+
+ +

◆ mi_heap_strndup()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
char* mi_heap_strndup (mi_heap_theap,
const char * s,
size_t n 
)
+
+ +

Duplicate a string of at most length n in a specific heap.

+
See also
mi_strndup()
+ +
+
+ +

◆ mi_heap_zalloc()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_heap_zalloc (mi_heap_theap,
size_t size 
)
+
+ +

Allocate zero-initialized in a specific heap.

+
See also
mi_zalloc()
+ +
+
+ +

◆ mi_heap_zalloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_zalloc_aligned (mi_heap_theap,
size_t size,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_heap_zalloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_zalloc_aligned_at (mi_heap_theap,
size_t size,
size_t alignment,
size_t offset 
)
+
+ +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__heap.js b/src/dashbls/depends/mimalloc/docs/group__heap.js new file mode 100644 index 000000000000..13d13778865b --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__heap.js @@ -0,0 +1,30 @@ +var group__heap = +[ + [ "mi_heap_t", "group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2", null ], + [ "mi_heap_calloc", "group__heap.html#gaa6702b3c48e9e53e50e81b36f5011d55", null ], + [ "mi_heap_calloc_aligned", "group__heap.html#ga4af03a6e2b93fae77424d93f889705c3", null ], + [ "mi_heap_calloc_aligned_at", "group__heap.html#ga08ca6419a5c057a4d965868998eef487", null ], + [ "mi_heap_collect", "group__heap.html#ga7922f7495cde30b1984d0e6072419298", null ], + [ "mi_heap_delete", "group__heap.html#ga2ab1af8d438819b55319c7ef51d1e409", null ], + [ "mi_heap_destroy", "group__heap.html#ga9f9c0844edb9717f4feacd79116b8e0d", null ], + [ "mi_heap_get_backing", "group__heap.html#ga5d03fbe062ffcf38f0f417fd968357fc", null ], + [ "mi_heap_get_default", "group__heap.html#ga8db4cbb87314a989a9a187464d6b5e05", null ], + [ "mi_heap_malloc", "group__heap.html#ga9cbed01e42c0647907295de92c3fa296", null ], + [ "mi_heap_malloc_aligned", "group__heap.html#gab5b87e1805306f70df38789fcfcf6653", null ], + [ "mi_heap_malloc_aligned_at", "group__heap.html#ga23acd7680fb0976dde3783254c6c874b", null ], + [ "mi_heap_malloc_small", "group__heap.html#gaa1a1c7a1f4da6826b5a25b70ef878368", null ], + [ "mi_heap_mallocn", "group__heap.html#ga851da6c43fe0b71c1376cee8aef90db0", null ], + [ "mi_heap_new", "group__heap.html#ga766f672ba56f2fbfeb9d9dbb0b7f6b11", null ], + [ "mi_heap_realloc", "group__heap.html#gaaef3395f66be48f37bdc8322509c5d81", null ], + [ "mi_heap_realloc_aligned", "group__heap.html#gafc603b696bd14cae6da28658f950d98c", null ], + [ "mi_heap_realloc_aligned_at", "group__heap.html#gaf96c788a1bf553fe2d371de9365e047c", null ], + [ "mi_heap_reallocf", "group__heap.html#ga4a21070eb4e7cce018133c8d5f4b0527", null ], + [ "mi_heap_reallocn", "group__heap.html#gac74e94ad9b0c9b57c1c4d88b8825b7a8", null ], + [ "mi_heap_realpath", "group__heap.html#ga00e95ba1e01acac3cfd95bb7a357a6f0", null ], + [ "mi_heap_set_default", "group__heap.html#gab8631ec88c8d26641b68b5d25dcd4422", null ], + [ "mi_heap_strdup", "group__heap.html#ga139d6b09dbf50c3c2523d0f4d1cfdeb5", null ], + [ "mi_heap_strndup", "group__heap.html#ga8e3dbd46650dd26573cf307a2c8f1f5a", null ], + [ "mi_heap_zalloc", "group__heap.html#ga903104592c8ed53417a3762da6241133", null ], + [ "mi_heap_zalloc_aligned", "group__heap.html#gaa450a59c6c7ae5fdbd1c2b80a8329ef0", null ], + [ "mi_heap_zalloc_aligned_at", "group__heap.html#ga45fb43a62776fbebbdf1edd99b527954", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/group__malloc.html b/src/dashbls/depends/mimalloc/docs/group__malloc.html new file mode 100644 index 000000000000..2dc16656728f --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__malloc.html @@ -0,0 +1,638 @@ + + + + + + + +mi-malloc: Basic Allocation + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Basic Allocation
+
+
+ +

The basic allocation interface. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void mi_free (void *p)
 Free previously allocated memory. More...
 
void * mi_malloc (size_t size)
 Allocate size bytes. More...
 
void * mi_zalloc (size_t size)
 Allocate zero-initialized size bytes. More...
 
void * mi_calloc (size_t count, size_t size)
 Allocate zero-initialized count elements of size bytes. More...
 
void * mi_realloc (void *p, size_t newsize)
 Re-allocate memory to newsize bytes. More...
 
void * mi_recalloc (void *p, size_t count, size_t size)
 Re-allocate memory to count elements of size bytes, with extra memory initialized to zero. More...
 
void * mi_expand (void *p, size_t newsize)
 Try to re-allocate memory to newsize bytes in place. More...
 
void * mi_mallocn (size_t count, size_t size)
 Allocate count elements of size bytes. More...
 
void * mi_reallocn (void *p, size_t count, size_t size)
 Re-allocate memory to count elements of size bytes. More...
 
void * mi_reallocf (void *p, size_t newsize)
 Re-allocate memory to newsize bytes,. More...
 
char * mi_strdup (const char *s)
 Allocate and duplicate a string. More...
 
char * mi_strndup (const char *s, size_t n)
 Allocate and duplicate a string up to n bytes. More...
 
char * mi_realpath (const char *fname, char *resolved_name)
 Resolve a file path name. More...
 
+

Detailed Description

+

The basic allocation interface.

+

Function Documentation

+ +

◆ mi_calloc()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_calloc (size_t count,
size_t size 
)
+
+ +

Allocate zero-initialized count elements of size bytes.

+
Parameters
+ + + +
countnumber of elements.
sizesize of each element.
+
+
+
Returns
pointer to the allocated memory of size*count bytes, or NULL if either out of memory or when count*size overflows.
+

Returns a unique pointer if called with either size or count of 0.

See also
mi_zalloc()
+ +
+
+ +

◆ mi_expand()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_expand (void * p,
size_t newsize 
)
+
+ +

Try to re-allocate memory to newsize bytes in place.

+
Parameters
+ + + +
ppointer to previously allocated memory (or NULL).
newsizethe new required size in bytes.
+
+
+
Returns
pointer to the re-allocated memory of newsize bytes (always equal to p), or NULL if either out of memory or if the memory could not be expanded in place. If NULL is returned, the pointer p is not freed. Otherwise the original pointer is returned as the reallocated result since it fits in-place with the new size. If newsize is larger than the original size allocated for p, the bytes after size are uninitialized.
+ +
+
+ +

◆ mi_free()

+ +
+
+ + + + + + + + +
void mi_free (void * p)
+
+ +

Free previously allocated memory.

+

The pointer p must have been allocated before (or be NULL).

Parameters
+ + +
ppointer to free, or NULL.
+
+
+ +
+
+ +

◆ mi_malloc()

+ +
+
+ + + + + + + + +
void* mi_malloc (size_t size)
+
+ +

Allocate size bytes.

+
Parameters
+ + +
sizenumber of bytes to allocate.
+
+
+
Returns
pointer to the allocated memory or NULL if out of memory. Returns a unique pointer if called with size 0.
+ +
+
+ +

◆ mi_mallocn()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_mallocn (size_t count,
size_t size 
)
+
+ +

Allocate count elements of size bytes.

+
Parameters
+ + + +
countThe number of elements.
sizeThe size of each element.
+
+
+
Returns
A pointer to a block of count * size bytes, or NULL if out of memory or if count * size overflows.
+

If there is no overflow, it behaves exactly like mi_malloc(p,count*size).

See also
mi_calloc()
+
+mi_zallocn()
+ +
+
+ +

◆ mi_realloc()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_realloc (void * p,
size_t newsize 
)
+
+ +

Re-allocate memory to newsize bytes.

+
Parameters
+ + + +
ppointer to previously allocated memory (or NULL).
newsizethe new required size in bytes.
+
+
+
Returns
pointer to the re-allocated memory of newsize bytes, or NULL if out of memory. If NULL is returned, the pointer p is not freed. Otherwise the original pointer is either freed or returned as the reallocated result (in case it fits in-place with the new size). If the pointer p is NULL, it behaves as mi_malloc(newsize). If newsize is larger than the original size allocated for p, the bytes after size are uninitialized.
+ +
+
+ +

◆ mi_reallocf()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_reallocf (void * p,
size_t newsize 
)
+
+ +

Re-allocate memory to newsize bytes,.

+
Parameters
+ + + +
ppointer to previously allocated memory (or NULL).
newsizethe new required size in bytes.
+
+
+
Returns
pointer to the re-allocated memory of newsize bytes, or NULL if out of memory.
+

In contrast to mi_realloc(), if NULL is returned, the original pointer p is freed (if it was not NULL itself). Otherwise the original pointer is either freed or returned as the reallocated result (in case it fits in-place with the new size). If the pointer p is NULL, it behaves as mi_malloc(newsize). If newsize is larger than the original size allocated for p, the bytes after size are uninitialized.

+
See also
reallocf (on BSD)
+ +
+
+ +

◆ mi_reallocn()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_reallocn (void * p,
size_t count,
size_t size 
)
+
+ +

Re-allocate memory to count elements of size bytes.

+
Parameters
+ + + + +
pPointer to a previously allocated block (or NULL).
countThe number of elements.
sizeThe size of each element.
+
+
+
Returns
A pointer to a re-allocated block of count * size bytes, or NULL if out of memory or if count * size overflows.
+

If there is no overflow, it behaves exactly like mi_realloc(p,count*size).

See also
reallocarray() (on BSD)
+ +
+
+ +

◆ mi_realpath()

+ +
+
+ + + + + + + + + + + + + + + + + + +
char* mi_realpath (const char * fname,
char * resolved_name 
)
+
+ +

Resolve a file path name.

+
Parameters
+ + + +
fnameFile name.
resolved_nameShould be NULL (but can also point to a buffer of at least PATH_MAX bytes).
+
+
+
Returns
If successful a pointer to the resolved absolute file name, or NULL on failure (with errno set to the error code).
+

If resolved_name was NULL, the returned result should be freed with mi_free().

+

Replacement for the standard realpath() such that mi_free() can be used on the returned result (if resolved_name was NULL).

+ +
+
+ +

◆ mi_recalloc()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void * mi_recalloc (void * p,
size_t count,
size_t size 
)
+
+ +

Re-allocate memory to count elements of size bytes, with extra memory initialized to zero.

+
Parameters
+ + + + +
pPointer to a previously allocated block (or NULL).
countThe number of elements.
sizeThe size of each element.
+
+
+
Returns
A pointer to a re-allocated block of count * size bytes, or NULL if out of memory or if count * size overflows.
+

If there is no overflow, it behaves exactly like mi_rezalloc(p,count*size).

See also
mi_reallocn()
+
+recallocarray() (on BSD).
+ +
+
+ +

◆ mi_strdup()

+ +
+
+ + + + + + + + +
char* mi_strdup (const char * s)
+
+ +

Allocate and duplicate a string.

+
Parameters
+ + +
sstring to duplicate (or NULL).
+
+
+
Returns
a pointer to newly allocated memory initialized to string s, or NULL if either out of memory or if s is NULL.
+

Replacement for the standard strdup() such that mi_free() can be used on the returned result.

+ +
+
+ +

◆ mi_strndup()

+ +
+
+ + + + + + + + + + + + + + + + + + +
char* mi_strndup (const char * s,
size_t n 
)
+
+ +

Allocate and duplicate a string up to n bytes.

+
Parameters
+ + + +
sstring to duplicate (or NULL).
nmaximum number of bytes to copy (excluding the terminating zero).
+
+
+
Returns
a pointer to newly allocated memory initialized to string s up to the first n bytes (and always zero terminated), or NULL if either out of memory or if s is NULL.
+

Replacement for the standard strndup() such that mi_free() can be used on the returned result.

+ +
+
+ +

◆ mi_zalloc()

+ +
+
+ + + + + + + + +
void* mi_zalloc (size_t size)
+
+ +

Allocate zero-initialized size bytes.

+
Parameters
+ + +
sizeThe size in bytes.
+
+
+
Returns
Pointer to newly allocated zero initialized memory, or NULL if out of memory.
+ +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__malloc.js b/src/dashbls/depends/mimalloc/docs/group__malloc.js new file mode 100644 index 000000000000..7293ffafd19a --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__malloc.js @@ -0,0 +1,16 @@ +var group__malloc = +[ + [ "mi_calloc", "group__malloc.html#ga97fedb4f7107c592fd7f0f0a8949a57d", null ], + [ "mi_expand", "group__malloc.html#gaaee66a1d483c3e28f585525fb96707e4", null ], + [ "mi_free", "group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95", null ], + [ "mi_malloc", "group__malloc.html#ga3406e8b168bc74c8637b11571a6da83a", null ], + [ "mi_mallocn", "group__malloc.html#ga0b05e2bf0f73e7401ae08597ff782ac6", null ], + [ "mi_realloc", "group__malloc.html#gaf11eb497da57bdfb2de65eb191c69db6", null ], + [ "mi_reallocf", "group__malloc.html#gafe68ac7c5e24a65cd55c9d6b152211a0", null ], + [ "mi_reallocn", "group__malloc.html#ga61d57b4144ba24fba5c1e9b956d13853", null ], + [ "mi_realpath", "group__malloc.html#ga08cec32dd5bbe7da91c78d19f1b5bebe", null ], + [ "mi_recalloc", "group__malloc.html#ga23a0fbb452b5dce8e31fab1a1958cacc", null ], + [ "mi_strdup", "group__malloc.html#gac7cffe13f1f458ed16789488bf92b9b2", null ], + [ "mi_strndup", "group__malloc.html#gaaabf971c2571891433477e2d21a35266", null ], + [ "mi_zalloc", "group__malloc.html#gafdd9d8bb2986e668ba9884f28af38000", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/group__options.html b/src/dashbls/depends/mimalloc/docs/group__options.html new file mode 100644 index 000000000000..f92905d42f51 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__options.html @@ -0,0 +1,404 @@ + + + + + + + +mi-malloc: Runtime Options + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Runtime Options
+
+
+ +

Set runtime behavior. +More...

+ + + + + +

+Enumerations

enum  mi_option_t {
+  mi_option_show_errors +, mi_option_show_stats +, mi_option_verbose +, mi_option_eager_commit +,
+  mi_option_eager_region_commit +, mi_option_large_os_pages +, mi_option_reserve_huge_os_pages +, mi_option_reserve_huge_os_pages_at +,
+  mi_option_segment_cache +, mi_option_page_reset +, mi_option_segment_reset +, mi_option_reset_delay +,
+  mi_option_use_numa_nodes +, mi_option_reset_decommits +, mi_option_eager_commit_delay +, mi_option_os_tag +,
+  _mi_option_last +
+ }
 Runtime options. More...
 
+ + + + + + + + + + + + + + + + + +

+Functions

bool mi_option_is_enabled (mi_option_t option)
 
void mi_option_enable (mi_option_t option)
 
void mi_option_disable (mi_option_t option)
 
void mi_option_set_enabled (mi_option_t option, bool enable)
 
void mi_option_set_enabled_default (mi_option_t option, bool enable)
 
long mi_option_get (mi_option_t option)
 
void mi_option_set (mi_option_t option, long value)
 
void mi_option_set_default (mi_option_t option, long value)
 
+

Detailed Description

+

Set runtime behavior.

+

Enumeration Type Documentation

+ +

◆ mi_option_t

+ +
+
+ + + + +
enum mi_option_t
+
+ +

Runtime options.

+ + + + + + + + + + + + + + + + + + +
Enumerator
mi_option_show_errors 

Print error messages to stderr.

+
mi_option_show_stats 

Print statistics to stderr when the program is done.

+
mi_option_verbose 

Print verbose messages to stderr.

+
mi_option_eager_commit 

Eagerly commit segments (4MiB) (enabled by default).

+
mi_option_eager_region_commit 

Eagerly commit large (256MiB) memory regions (enabled by default, except on Windows)

+
mi_option_large_os_pages 

Use large OS pages (2MiB in size) if possible.

+
mi_option_reserve_huge_os_pages 

The number of huge OS pages (1GiB in size) to reserve at the start of the program.

+
mi_option_reserve_huge_os_pages_at 

Reserve huge OS pages at node N.

+
mi_option_segment_cache 

The number of segments per thread to keep cached.

+
mi_option_page_reset 

Reset page memory after mi_option_reset_delay milliseconds when it becomes free.

+
mi_option_segment_reset 

Experimental.

+
mi_option_reset_delay 

Delay in milli-seconds before resetting a page (100ms by default)

+
mi_option_use_numa_nodes 

Pretend there are at most N NUMA nodes.

+
mi_option_reset_decommits 

Experimental.

+
mi_option_eager_commit_delay 

Experimental.

+
mi_option_os_tag 

OS tag to assign to mimalloc'd memory.

+
_mi_option_last 
+ +
+
+

Function Documentation

+ +

◆ mi_option_disable()

+ +
+
+ + + + + + + + +
void mi_option_disable (mi_option_t option)
+
+ +
+
+ +

◆ mi_option_enable()

+ +
+
+ + + + + + + + +
void mi_option_enable (mi_option_t option)
+
+ +
+
+ +

◆ mi_option_get()

+ +
+
+ + + + + + + + +
long mi_option_get (mi_option_t option)
+
+ +
+
+ +

◆ mi_option_is_enabled()

+ +
+
+ + + + + + + + +
bool mi_option_is_enabled (mi_option_t option)
+
+ +
+
+ +

◆ mi_option_set()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_option_set (mi_option_t option,
long value 
)
+
+ +
+
+ +

◆ mi_option_set_default()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_option_set_default (mi_option_t option,
long value 
)
+
+ +
+
+ +

◆ mi_option_set_enabled()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_option_set_enabled (mi_option_t option,
bool enable 
)
+
+ +
+
+ +

◆ mi_option_set_enabled_default()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_option_set_enabled_default (mi_option_t option,
bool enable 
)
+
+ +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__options.js b/src/dashbls/depends/mimalloc/docs/group__options.js new file mode 100644 index 000000000000..c8836cdc1c0d --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__options.js @@ -0,0 +1,30 @@ +var group__options = +[ + [ "mi_option_t", "group__options.html#gafebf7ed116adb38ae5218bc3ce06884c", [ + [ "mi_option_show_errors", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafbf4822e5c00732c5984b32a032837f0", null ], + [ "mi_option_show_stats", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0957ef73b2550764b4840edf48422fda", null ], + [ "mi_option_verbose", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca7c8b7bf5281c581bad64f5daa6442777", null ], + [ "mi_option_eager_commit", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca1e8de72c93da7ff22d91e1e27b52ac2b", null ], + [ "mi_option_eager_region_commit", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca32ce97ece29f69e82579679cf8a307ad", null ], + [ "mi_option_large_os_pages", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4192d491200d0055df0554d4cf65054e", null ], + [ "mi_option_reserve_huge_os_pages", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caca7ed041be3b0b9d0b82432c7bf41af2", null ], + [ "mi_option_reserve_huge_os_pages_at", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caa13e7926d4339d2aa6fbf61d4473fd5c", null ], + [ "mi_option_segment_cache", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca2ecbe7ef32f5c84de3739aa4f0b805a1", null ], + [ "mi_option_page_reset", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cada854dd272c66342f18a93ee254a2968", null ], + [ "mi_option_segment_reset", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafb121d30d87591850d5410ccc3a95c6d", null ], + [ "mi_option_reset_delay", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca154fe170131d5212cff57e22b99523c5", null ], + [ "mi_option_use_numa_nodes", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0ac33a18f6b659fcfaf44efb0bab1b74", null ], + [ "mi_option_reset_decommits", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cac81ee965b130fa81238913a3c239d536", null ], + [ "mi_option_eager_commit_delay", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca17a190c25be381142d87e0468c4c068c", null ], + [ "mi_option_os_tag", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4b74ae2a69e445de6c2361b73c1d14bf", null ], + [ "_mi_option_last", "group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca5b4357b74be0d87568036c32eb1a2e4a", null ] + ] ], + [ "mi_option_disable", "group__options.html#gaebf6ff707a2e688ebb1a2296ca564054", null ], + [ "mi_option_enable", "group__options.html#ga04180ae41b0d601421dd62ced40ca050", null ], + [ "mi_option_get", "group__options.html#ga7e8af195cc81d3fa64ccf2662caa565a", null ], + [ "mi_option_is_enabled", "group__options.html#ga459ad98f18b3fc9275474807fe0ca188", null ], + [ "mi_option_set", "group__options.html#gaf84921c32375e25754dc2ee6a911fa60", null ], + [ "mi_option_set_default", "group__options.html#ga7ef623e440e6e5545cb08c94e71e4b90", null ], + [ "mi_option_set_enabled", "group__options.html#ga9a13d05fcb77489cb06d4d017ebd8bed", null ], + [ "mi_option_set_enabled_default", "group__options.html#ga65518b69ec5d32336b50e07f74b3f629", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/group__posix.html b/src/dashbls/depends/mimalloc/docs/group__posix.html new file mode 100644 index 000000000000..539f7ec68300 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__posix.html @@ -0,0 +1,532 @@ + + + + + + + +mi-malloc: Posix + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Posix
+
+
+ +

mi_ prefixed implementations of various Posix, Unix, and C++ allocation functions. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

size_t mi_malloc_size (const void *p)
 
size_t mi_malloc_usable_size (const void *p)
 
void mi_cfree (void *p)
 Just as free but also checks if the pointer p belongs to our heap. More...
 
int mi_posix_memalign (void **p, size_t alignment, size_t size)
 
int mi__posix_memalign (void **p, size_t alignment, size_t size)
 
void * mi_memalign (size_t alignment, size_t size)
 
void * mi_valloc (size_t size)
 
void * mi_pvalloc (size_t size)
 
void * mi_aligned_alloc (size_t alignment, size_t size)
 
void * mi_reallocarray (void *p, size_t count, size_t size)
 Correspond s to reallocarray in FreeBSD. More...
 
int mi_reallocarr (void *p, size_t count, size_t size)
 Corresponds to reallocarr in NetBSD. More...
 
void mi_free_size (void *p, size_t size)
 
void mi_free_size_aligned (void *p, size_t size, size_t alignment)
 
void mi_free_aligned (void *p, size_t alignment)
 
+

Detailed Description

+

mi_ prefixed implementations of various Posix, Unix, and C++ allocation functions.

+

Defined for convenience as all redirect to the regular mimalloc API.

+

Function Documentation

+ +

◆ mi__posix_memalign()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int mi__posix_memalign (void ** p,
size_t alignment,
size_t size 
)
+
+ +
+
+ +

◆ mi_aligned_alloc()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_aligned_alloc (size_t alignment,
size_t size 
)
+
+ +
+
+ +

◆ mi_cfree()

+ +
+
+ + + + + + + + +
void mi_cfree (void * p)
+
+ +

Just as free but also checks if the pointer p belongs to our heap.

+ +
+
+ +

◆ mi_free_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_free_aligned (void * p,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_free_size()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mi_free_size (void * p,
size_t size 
)
+
+ +
+
+ +

◆ mi_free_size_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mi_free_size_aligned (void * p,
size_t size,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_malloc_size()

+ +
+
+ + + + + + + + +
size_t mi_malloc_size (const void * p)
+
+ +
+
+ +

◆ mi_malloc_usable_size()

+ +
+
+ + + + + + + + +
size_t mi_malloc_usable_size (const void * p)
+
+ +
+
+ +

◆ mi_memalign()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_memalign (size_t alignment,
size_t size 
)
+
+ +
+
+ +

◆ mi_posix_memalign()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int mi_posix_memalign (void ** p,
size_t alignment,
size_t size 
)
+
+ +
+
+ +

◆ mi_pvalloc()

+ +
+
+ + + + + + + + +
void* mi_pvalloc (size_t size)
+
+ +
+
+ +

◆ mi_reallocarr()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int mi_reallocarr (void * p,
size_t count,
size_t size 
)
+
+ +

Corresponds to reallocarr in NetBSD.

+ +
+
+ +

◆ mi_reallocarray()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_reallocarray (void * p,
size_t count,
size_t size 
)
+
+ +

Correspond s to reallocarray in FreeBSD.

+ +
+
+ +

◆ mi_valloc()

+ +
+
+ + + + + + + + +
void* mi_valloc (size_t size)
+
+ +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__posix.js b/src/dashbls/depends/mimalloc/docs/group__posix.js new file mode 100644 index 000000000000..50c248c80dac --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__posix.js @@ -0,0 +1,17 @@ +var group__posix = +[ + [ "mi__posix_memalign", "group__posix.html#gad5a69c8fea96aa2b7a7c818c2130090a", null ], + [ "mi_aligned_alloc", "group__posix.html#ga1326d2e4388630b5f81ca7206318b8e5", null ], + [ "mi_cfree", "group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7", null ], + [ "mi_free_aligned", "group__posix.html#ga0d28d5cf61e6bfbb18c63092939fe5c9", null ], + [ "mi_free_size", "group__posix.html#gae01389eedab8d67341ff52e2aad80ebb", null ], + [ "mi_free_size_aligned", "group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc", null ], + [ "mi_malloc_size", "group__posix.html#ga4531c9e775bb3ae12db57c1ba8a5d7de", null ], + [ "mi_malloc_usable_size", "group__posix.html#ga06d07cf357bbac5c73ba5d0c0c421e17", null ], + [ "mi_memalign", "group__posix.html#gaab7fa71ea93b96873f5d9883db57d40e", null ], + [ "mi_posix_memalign", "group__posix.html#gacff84f226ba9feb2031b8992e5579447", null ], + [ "mi_pvalloc", "group__posix.html#gaeb325c39b887d3b90d85d1eb1712fb1e", null ], + [ "mi_reallocarr", "group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5", null ], + [ "mi_reallocarray", "group__posix.html#ga48fad8648a2f1dab9c87ea9448a52088", null ], + [ "mi_valloc", "group__posix.html#ga73baaf5951f5165ba0763d0c06b6a93b", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/group__typed.html b/src/dashbls/depends/mimalloc/docs/group__typed.html new file mode 100644 index 000000000000..c19c7f4adbb7 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__typed.html @@ -0,0 +1,518 @@ + + + + + + + +mi-malloc: Typed Macros + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Typed Macros
+
+
+ +

Typed allocation macros. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define mi_malloc_tp(tp)
 Allocate a block of type tp. More...
 
#define mi_zalloc_tp(tp)
 Allocate a zero-initialized block of type tp. More...
 
#define mi_calloc_tp(tp, count)
 Allocate count zero-initialized blocks of type tp. More...
 
#define mi_mallocn_tp(tp, count)
 Allocate count blocks of type tp. More...
 
#define mi_reallocn_tp(p, tp, count)
 Re-allocate to count blocks of type tp. More...
 
#define mi_heap_malloc_tp(hp, tp)
 Allocate a block of type tp in a heap hp. More...
 
#define mi_heap_zalloc_tp(hp, tp)
 Allocate a zero-initialized block of type tp in a heap hp. More...
 
#define mi_heap_calloc_tp(hp, tp, count)
 Allocate count zero-initialized blocks of type tp in a heap hp. More...
 
#define mi_heap_mallocn_tp(hp, tp, count)
 Allocate count blocks of type tp in a heap hp. More...
 
#define mi_heap_reallocn_tp(hp, p, tp, count)
 Re-allocate to count blocks of type tp in a heap hp. More...
 
#define mi_heap_recalloc_tp(hp, p, tp, count)
 Re-allocate to count zero initialized blocks of type tp in a heap hp. More...
 
+

Detailed Description

+

Typed allocation macros.

+

For example:

int* p = mi_malloc_tp(int)
+
#define mi_malloc_tp(tp)
Allocate a block of type tp.
Definition: mimalloc-doc.h:692
+

Macro Definition Documentation

+ +

◆ mi_calloc_tp

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define mi_calloc_tp( tp,
 count 
)
+
+ +

Allocate count zero-initialized blocks of type tp.

+ +
+
+ +

◆ mi_heap_calloc_tp

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
#define mi_heap_calloc_tp( hp,
 tp,
 count 
)
+
+ +

Allocate count zero-initialized blocks of type tp in a heap hp.

+ +
+
+ +

◆ mi_heap_malloc_tp

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define mi_heap_malloc_tp( hp,
 tp 
)
+
+ +

Allocate a block of type tp in a heap hp.

+ +
+
+ +

◆ mi_heap_mallocn_tp

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
#define mi_heap_mallocn_tp( hp,
 tp,
 count 
)
+
+ +

Allocate count blocks of type tp in a heap hp.

+ +
+
+ +

◆ mi_heap_reallocn_tp

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define mi_heap_reallocn_tp( hp,
 p,
 tp,
 count 
)
+
+ +

Re-allocate to count blocks of type tp in a heap hp.

+ +
+
+ +

◆ mi_heap_recalloc_tp

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define mi_heap_recalloc_tp( hp,
 p,
 tp,
 count 
)
+
+ +

Re-allocate to count zero initialized blocks of type tp in a heap hp.

+ +
+
+ +

◆ mi_heap_zalloc_tp

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define mi_heap_zalloc_tp( hp,
 tp 
)
+
+ +

Allocate a zero-initialized block of type tp in a heap hp.

+ +
+
+ +

◆ mi_malloc_tp

+ +
+
+ + + + + + + + +
#define mi_malloc_tp( tp)
+
+ +

Allocate a block of type tp.

+
Parameters
+ + +
tpThe type of the block to allocate.
+
+
+
Returns
A pointer to an object of type tp, or NULL if out of memory.
+

Example:

int* p = mi_malloc_tp(int)
+
See also
mi_malloc()
+ +
+
+ +

◆ mi_mallocn_tp

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define mi_mallocn_tp( tp,
 count 
)
+
+ +

Allocate count blocks of type tp.

+ +
+
+ +

◆ mi_reallocn_tp

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
#define mi_reallocn_tp( p,
 tp,
 count 
)
+
+ +

Re-allocate to count blocks of type tp.

+ +
+
+ +

◆ mi_zalloc_tp

+ +
+
+ + + + + + + + +
#define mi_zalloc_tp( tp)
+
+ +

Allocate a zero-initialized block of type tp.

+ +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__typed.js b/src/dashbls/depends/mimalloc/docs/group__typed.js new file mode 100644 index 000000000000..c6be55d8c4b4 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__typed.js @@ -0,0 +1,14 @@ +var group__typed = +[ + [ "mi_calloc_tp", "group__typed.html#gae80c47c9d4cab10961fff1a8ac98fc07", null ], + [ "mi_heap_calloc_tp", "group__typed.html#ga4e5d1f1707c90e5f55e023ac5f45fe74", null ], + [ "mi_heap_malloc_tp", "group__typed.html#ga653bcb24ac495bc19940ecd6898f9cd7", null ], + [ "mi_heap_mallocn_tp", "group__typed.html#ga6b75cb9c4b9c647661d0924552dc6e83", null ], + [ "mi_heap_reallocn_tp", "group__typed.html#gaf213d5422ec35e7f6caad827c79bc948", null ], + [ "mi_heap_recalloc_tp", "group__typed.html#ga3e50a1600958fcaf1a7f3560c9174f9e", null ], + [ "mi_heap_zalloc_tp", "group__typed.html#gad6e87e86e994aa14416ae9b5d4c188fe", null ], + [ "mi_malloc_tp", "group__typed.html#ga0619a62c5fd886f1016030abe91f0557", null ], + [ "mi_mallocn_tp", "group__typed.html#gae5cb6e0fafc9f23169c5622e077afe8b", null ], + [ "mi_reallocn_tp", "group__typed.html#ga1158b49a55dfa81f58a4426a7578f523", null ], + [ "mi_zalloc_tp", "group__typed.html#gac77a61bdaf680a803785fe307820b48c", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/group__zeroinit.html b/src/dashbls/depends/mimalloc/docs/group__zeroinit.html new file mode 100644 index 000000000000..329a7739d207 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__zeroinit.html @@ -0,0 +1,591 @@ + + + + + + + +mi-malloc: Zero initialized re-allocation + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Zero initialized re-allocation
+
+
+ +

The zero-initialized re-allocations are only valid on memory that was originally allocated with zero initialization too. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void * mi_rezalloc (void *p, size_t newsize)
 
void * mi_rezalloc_aligned (void *p, size_t newsize, size_t alignment)
 
void * mi_rezalloc_aligned_at (void *p, size_t newsize, size_t alignment, size_t offset)
 
void * mi_recalloc_aligned (void *p, size_t newcount, size_t size, size_t alignment)
 
void * mi_recalloc_aligned_at (void *p, size_t newcount, size_t size, size_t alignment, size_t offset)
 
void * mi_heap_rezalloc (mi_heap_t *heap, void *p, size_t newsize)
 
void * mi_heap_recalloc (mi_heap_t *heap, void *p, size_t newcount, size_t size)
 
void * mi_heap_rezalloc_aligned (mi_heap_t *heap, void *p, size_t newsize, size_t alignment)
 
void * mi_heap_rezalloc_aligned_at (mi_heap_t *heap, void *p, size_t newsize, size_t alignment, size_t offset)
 
void * mi_heap_recalloc_aligned (mi_heap_t *heap, void *p, size_t newcount, size_t size, size_t alignment)
 
void * mi_heap_recalloc_aligned_at (mi_heap_t *heap, void *p, size_t newcount, size_t size, size_t alignment, size_t offset)
 
+

Detailed Description

+

The zero-initialized re-allocations are only valid on memory that was originally allocated with zero initialization too.

+

e.g. mi_calloc, mi_zalloc, mi_zalloc_aligned etc. see https://github.com/microsoft/mimalloc/issues/63#issuecomment-508272992

+

Function Documentation

+ +

◆ mi_heap_recalloc()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_recalloc (mi_heap_theap,
void * p,
size_t newcount,
size_t size 
)
+
+ +
+
+ +

◆ mi_heap_recalloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_recalloc_aligned (mi_heap_theap,
void * p,
size_t newcount,
size_t size,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_heap_recalloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_recalloc_aligned_at (mi_heap_theap,
void * p,
size_t newcount,
size_t size,
size_t alignment,
size_t offset 
)
+
+ +
+
+ +

◆ mi_heap_rezalloc()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_rezalloc (mi_heap_theap,
void * p,
size_t newsize 
)
+
+ +
+
+ +

◆ mi_heap_rezalloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_rezalloc_aligned (mi_heap_theap,
void * p,
size_t newsize,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_heap_rezalloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_heap_rezalloc_aligned_at (mi_heap_theap,
void * p,
size_t newsize,
size_t alignment,
size_t offset 
)
+
+ +
+
+ +

◆ mi_recalloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_recalloc_aligned (void * p,
size_t newcount,
size_t size,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_recalloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_recalloc_aligned_at (void * p,
size_t newcount,
size_t size,
size_t alignment,
size_t offset 
)
+
+ +
+
+ +

◆ mi_rezalloc()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* mi_rezalloc (void * p,
size_t newsize 
)
+
+ +
+
+ +

◆ mi_rezalloc_aligned()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_rezalloc_aligned (void * p,
size_t newsize,
size_t alignment 
)
+
+ +
+
+ +

◆ mi_rezalloc_aligned_at()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void* mi_rezalloc_aligned_at (void * p,
size_t newsize,
size_t alignment,
size_t offset 
)
+
+ +
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/group__zeroinit.js b/src/dashbls/depends/mimalloc/docs/group__zeroinit.js new file mode 100644 index 000000000000..b9297d2123f8 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/group__zeroinit.js @@ -0,0 +1,14 @@ +var group__zeroinit = +[ + [ "mi_heap_recalloc", "group__zeroinit.html#ga8648c5fbb22a80f0262859099f06dfbd", null ], + [ "mi_heap_recalloc_aligned", "group__zeroinit.html#ga9f3f999396c8f77ca5e80e7b40ac29e3", null ], + [ "mi_heap_recalloc_aligned_at", "group__zeroinit.html#ga496452c96f1de8c500be9fddf52edaf7", null ], + [ "mi_heap_rezalloc", "group__zeroinit.html#gacfad83f14eb5d6a42a497a898e19fc76", null ], + [ "mi_heap_rezalloc_aligned", "group__zeroinit.html#ga375fa8a611c51905e592d5d467c49664", null ], + [ "mi_heap_rezalloc_aligned_at", "group__zeroinit.html#gac90da54fa7e5d10bdc97ce0b51dce2eb", null ], + [ "mi_recalloc_aligned", "group__zeroinit.html#ga3e7e5c291acf1c7fd7ffd9914a9f945f", null ], + [ "mi_recalloc_aligned_at", "group__zeroinit.html#ga4ff5e92ad73585418a072c9d059e5cf9", null ], + [ "mi_rezalloc", "group__zeroinit.html#ga8c292e142110229a2980b37ab036dbc6", null ], + [ "mi_rezalloc_aligned", "group__zeroinit.html#gacd71a7bce96aab38ae6de17af2eb2cf0", null ], + [ "mi_rezalloc_aligned_at", "group__zeroinit.html#gae8b358c417e61d5307da002702b0a8e1", null ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/index.html b/src/dashbls/depends/mimalloc/docs/index.html new file mode 100644 index 000000000000..2ea91215ea9e --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/index.html @@ -0,0 +1,142 @@ + + + + + + + +mi-malloc: Main Page + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mi-malloc Documentation
+
+
+

This is the API documentation of the mimalloc allocator (pronounced "me-malloc") – a general purpose allocator with excellent performance characteristics. Initially developed by Daan Leijen for the run-time systems of the Koka and Lean languages.

+

It is a drop-in replacement for malloc and can be used in other programs without code changes, for example, on Unix you can use it as:

> LD_PRELOAD=/usr/bin/libmimalloc.so myprogram
+

Notable aspects of the design include:

+
    +
  • small and consistent: the library is about 8k LOC using simple and consistent data structures. This makes it very suitable to integrate and adapt in other projects. For runtime systems it provides hooks for a monotonic heartbeat and deferred freeing (for bounded worst-case times with reference counting).
  • +
  • free list sharding: instead of one big free list (per size class) we have many smaller lists per "mimalloc page" which reduces fragmentation and increases locality – things that are allocated close in time get allocated close in memory. (A mimalloc page contains blocks of one size class and is usually 64KiB on a 64-bit system).
  • +
  • free list multi-sharding: the big idea! Not only do we shard the free list per mimalloc page, but for each page we have multiple free lists. In particular, there is one list for thread-local free operations, and another one for concurrent free operations. Free-ing from another thread can now be a single CAS without needing sophisticated coordination between threads. Since there will be thousands of separate free lists, contention is naturally distributed over the heap, and the chance of contending on a single location will be low – this is quite similar to randomized algorithms like skip lists where adding a random oracle removes the need for a more complex algorithm.
  • +
  • eager page reset: when a "page" becomes empty (with increased chance due to free list sharding) the memory is marked to the OS as unused ("reset" or "purged") reducing (real) memory pressure and fragmentation, especially in long running programs.
  • +
  • secure: mimalloc can be build in secure mode, adding guard pages, randomized allocation, encrypted free lists, etc. to protect against various heap vulnerabilities. The performance penalty is only around 5% on average over our benchmarks.
  • +
  • first-class heaps: efficiently create and use multiple heaps to allocate across different regions. A heap can be destroyed at once instead of deallocating each object separately.
  • +
  • bounded: it does not suffer from blowup [1], has bounded worst-case allocation times (wcat), bounded space overhead (~0.2% meta-data, with at most 12.5% waste in allocation sizes), and has no internal points of contention using only atomic operations.
  • +
  • fast: In our benchmarks (see below), mimalloc outperforms all other leading allocators (jemalloc, tcmalloc, Hoard, etc), and usually uses less memory (up to 25% more in the worst case). A nice property is that it does consistently well over a wide range of benchmarks.
  • +
+

You can read more on the design of mimalloc in the technical report which also has detailed benchmark results.

+

Further information:

+ +
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/jquery.js b/src/dashbls/depends/mimalloc/docs/jquery.js new file mode 100644 index 000000000000..103c32d79b74 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/jquery.js @@ -0,0 +1,35 @@ +/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** + * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler + * Licensed under MIT + * @author Ariel Flesler + * @version 2.1.2 + */ +;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/mimalloc-doc_8h_source.html b/src/dashbls/depends/mimalloc/docs/mimalloc-doc_8h_source.html new file mode 100644 index 000000000000..8935de8a8890 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/mimalloc-doc_8h_source.html @@ -0,0 +1,561 @@ + + + + + + + +mi-malloc: mimalloc-doc.h Source File + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
mimalloc-doc.h
+
+
+
1 /* ----------------------------------------------------------------------------
+
2 Copyright (c) 2018-2021, Microsoft Research, Daan Leijen
+
3 This is free software; you can redistribute it and/or modify it under the
+
4 terms of the MIT license. A copy of the license can be found in the file
+
5 "LICENSE" at the root of this distribution.
+
6 -----------------------------------------------------------------------------*/
+
7 
+
8 #error "documentation file only!"
+
9 
+
10 
+
94 
+
95 
+
99 void mi_free(void* p);
+
100 
+
105 void* mi_malloc(size_t size);
+
106 
+
111 void* mi_zalloc(size_t size);
+
112 
+
122 void* mi_calloc(size_t count, size_t size);
+
123 
+
136 void* mi_realloc(void* p, size_t newsize);
+
137 
+
148 void* mi_recalloc(void* p, size_t count, size_t size);
+
149 
+
163 void* mi_expand(void* p, size_t newsize);
+
164 
+
174 void* mi_mallocn(size_t count, size_t size);
+
175 
+
185 void* mi_reallocn(void* p, size_t count, size_t size);
+
186 
+
203 void* mi_reallocf(void* p, size_t newsize);
+
204 
+
205 
+
214 char* mi_strdup(const char* s);
+
215 
+
225 char* mi_strndup(const char* s, size_t n);
+
226 
+
239 char* mi_realpath(const char* fname, char* resolved_name);
+
240 
+
242 
+
243 // ------------------------------------------------------
+
244 // Extended functionality
+
245 // ------------------------------------------------------
+
246 
+
250 
+
253 #define MI_SMALL_SIZE_MAX (128*sizeof(void*))
+
254 
+
262 void* mi_malloc_small(size_t size);
+
263 
+
271 void* mi_zalloc_small(size_t size);
+
272 
+
287 size_t mi_usable_size(void* p);
+
288 
+
298 size_t mi_good_size(size_t size);
+
299 
+
307 void mi_collect(bool force);
+
308 
+
313 void mi_stats_print(void* out);
+
314 
+
320 void mi_stats_print_out(mi_output_fun* out, void* arg);
+
321 
+
323 void mi_stats_reset(void);
+
324 
+
326 void mi_stats_merge(void);
+
327 
+
331 void mi_thread_init(void);
+
332 
+
337 void mi_thread_done(void);
+
338 
+ +
345 
+
352 typedef void (mi_deferred_free_fun)(bool force, unsigned long long heartbeat, void* arg);
+
353 
+
369 void mi_register_deferred_free(mi_deferred_free_fun* deferred_free, void* arg);
+
370 
+
376 typedef void (mi_output_fun)(const char* msg, void* arg);
+
377 
+
384 void mi_register_output(mi_output_fun* out, void* arg);
+
385 
+
391 typedef void (mi_error_fun)(int err, void* arg);
+
392 
+
408 void mi_register_error(mi_error_fun* errfun, void* arg);
+
409 
+
414 bool mi_is_in_heap_region(const void* p);
+
415 
+
424 int mi_reserve_os_memory(size_t size, bool commit, bool allow_large);
+
425 
+
437 bool mi_manage_os_memory(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node);
+
438 
+
451 int mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs);
+
452 
+
465 int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs);
+
466 
+
467 
+ +
473 
+
487 void mi_process_info(size_t* elapsed_msecs, size_t* user_msecs, size_t* system_msecs, size_t* current_rss, size_t* peak_rss, size_t* current_commit, size_t* peak_commit, size_t* page_faults);
+
488 
+
490 
+
491 // ------------------------------------------------------
+
492 // Aligned allocation
+
493 // ------------------------------------------------------
+
494 
+
500 
+
502 #define MI_ALIGNMENT_MAX (1024*1024UL)
+
503 
+
516 void* mi_malloc_aligned(size_t size, size_t alignment);
+
517 void* mi_zalloc_aligned(size_t size, size_t alignment);
+
518 void* mi_calloc_aligned(size_t count, size_t size, size_t alignment);
+
519 void* mi_realloc_aligned(void* p, size_t newsize, size_t alignment);
+
520 
+
531 void* mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset);
+
532 void* mi_zalloc_aligned_at(size_t size, size_t alignment, size_t offset);
+
533 void* mi_calloc_aligned_at(size_t count, size_t size, size_t alignment, size_t offset);
+
534 void* mi_realloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset);
+
535 
+
537 
+
543 
+
548 struct mi_heap_s;
+
549 
+
554 typedef struct mi_heap_s mi_heap_t;
+
555 
+ +
558 
+ +
567 
+ +
576 
+ +
581 
+ +
585 
+ +
592 
+
594 void mi_heap_collect(mi_heap_t* heap, bool force);
+
595 
+
598 void* mi_heap_malloc(mi_heap_t* heap, size_t size);
+
599 
+
603 void* mi_heap_malloc_small(mi_heap_t* heap, size_t size);
+
604 
+
607 void* mi_heap_zalloc(mi_heap_t* heap, size_t size);
+
608 
+
611 void* mi_heap_calloc(mi_heap_t* heap, size_t count, size_t size);
+
612 
+
615 void* mi_heap_mallocn(mi_heap_t* heap, size_t count, size_t size);
+
616 
+
619 char* mi_heap_strdup(mi_heap_t* heap, const char* s);
+
620 
+
623 char* mi_heap_strndup(mi_heap_t* heap, const char* s, size_t n);
+
624 
+
627 char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name);
+
628 
+
629 void* mi_heap_realloc(mi_heap_t* heap, void* p, size_t newsize);
+
630 void* mi_heap_reallocn(mi_heap_t* heap, void* p, size_t count, size_t size);
+
631 void* mi_heap_reallocf(mi_heap_t* heap, void* p, size_t newsize);
+
632 
+
633 void* mi_heap_malloc_aligned(mi_heap_t* heap, size_t size, size_t alignment);
+
634 void* mi_heap_malloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset);
+
635 void* mi_heap_zalloc_aligned(mi_heap_t* heap, size_t size, size_t alignment);
+
636 void* mi_heap_zalloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset);
+
637 void* mi_heap_calloc_aligned(mi_heap_t* heap, size_t count, size_t size, size_t alignment);
+
638 void* mi_heap_calloc_aligned_at(mi_heap_t* heap, size_t count, size_t size, size_t alignment, size_t offset);
+
639 void* mi_heap_realloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment);
+
640 void* mi_heap_realloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset);
+
641 
+
643 
+
644 
+
653 
+
654 void* mi_rezalloc(void* p, size_t newsize);
+
655 void* mi_recalloc(void* p, size_t newcount, size_t size) ;
+
656 
+
657 void* mi_rezalloc_aligned(void* p, size_t newsize, size_t alignment);
+
658 void* mi_rezalloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset);
+
659 void* mi_recalloc_aligned(void* p, size_t newcount, size_t size, size_t alignment);
+
660 void* mi_recalloc_aligned_at(void* p, size_t newcount, size_t size, size_t alignment, size_t offset);
+
661 
+
662 void* mi_heap_rezalloc(mi_heap_t* heap, void* p, size_t newsize);
+
663 void* mi_heap_recalloc(mi_heap_t* heap, void* p, size_t newcount, size_t size);
+
664 
+
665 void* mi_heap_rezalloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment);
+
666 void* mi_heap_rezalloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset);
+
667 void* mi_heap_recalloc_aligned(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment);
+
668 void* mi_heap_recalloc_aligned_at(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment, size_t offset);
+
669 
+
671 
+
680 
+
692 #define mi_malloc_tp(tp) ((tp*)mi_malloc(sizeof(tp)))
+
693 
+
695 #define mi_zalloc_tp(tp) ((tp*)mi_zalloc(sizeof(tp)))
+
696 
+
698 #define mi_calloc_tp(tp,count) ((tp*)mi_calloc(count,sizeof(tp)))
+
699 
+
701 #define mi_mallocn_tp(tp,count) ((tp*)mi_mallocn(count,sizeof(tp)))
+
702 
+
704 #define mi_reallocn_tp(p,tp,count) ((tp*)mi_reallocn(p,count,sizeof(tp)))
+
705 
+
707 #define mi_heap_malloc_tp(hp,tp) ((tp*)mi_heap_malloc(hp,sizeof(tp)))
+
708 
+
710 #define mi_heap_zalloc_tp(hp,tp) ((tp*)mi_heap_zalloc(hp,sizeof(tp)))
+
711 
+
713 #define mi_heap_calloc_tp(hp,tp,count) ((tp*)mi_heap_calloc(hp,count,sizeof(tp)))
+
714 
+
716 #define mi_heap_mallocn_tp(hp,tp,count) ((tp*)mi_heap_mallocn(hp,count,sizeof(tp)))
+
717 
+
719 #define mi_heap_reallocn_tp(hp,p,tp,count) ((tp*)mi_heap_reallocn(p,count,sizeof(tp)))
+
720 
+
722 #define mi_heap_recalloc_tp(hp,p,tp,count) ((tp*)mi_heap_recalloc(p,count,sizeof(tp)))
+
723 
+
725 
+
731 
+
738 bool mi_heap_contains_block(mi_heap_t* heap, const void* p);
+
739 
+
748 bool mi_heap_check_owned(mi_heap_t* heap, const void* p);
+
749 
+
757 bool mi_check_owned(const void* p);
+
758 
+
761 typedef struct mi_heap_area_s {
+
762  void* blocks;
+
763  size_t reserved;
+
764  size_t committed;
+
765  size_t used;
+
766  size_t block_size;
+ +
768 
+
776 typedef bool (mi_block_visit_fun)(const mi_heap_t* heap, const mi_heap_area_t* area, void* block, size_t block_size, void* arg);
+
777 
+
789 bool mi_heap_visit_blocks(const mi_heap_t* heap, bool visit_all_blocks, mi_block_visit_fun* visitor, void* arg);
+
790 
+
792 
+
798 
+
800 typedef enum mi_option_e {
+
801  // stable options
+ + + +
805  // the following options are experimental
+ + + + + + + + + + + + + + + +
821 
+
822 
+ + + +
826 void mi_option_set_enabled(mi_option_t option, bool enable);
+
827 void mi_option_set_enabled_default(mi_option_t option, bool enable);
+
828 
+ +
830 void mi_option_set(mi_option_t option, long value);
+
831 void mi_option_set_default(mi_option_t option, long value);
+
832 
+
833 
+
835 
+
842 
+
843 void* mi_recalloc(void* p, size_t count, size_t size);
+
844 size_t mi_malloc_size(const void* p);
+
845 size_t mi_malloc_usable_size(const void *p);
+
846 
+
848 void mi_cfree(void* p);
+
849 
+
850 int mi_posix_memalign(void** p, size_t alignment, size_t size);
+
851 int mi__posix_memalign(void** p, size_t alignment, size_t size);
+
852 void* mi_memalign(size_t alignment, size_t size);
+
853 void* mi_valloc(size_t size);
+
854 
+
855 void* mi_pvalloc(size_t size);
+
856 void* mi_aligned_alloc(size_t alignment, size_t size);
+
857 
+
860 void* mi_reallocarray(void* p, size_t count, size_t size);
+
861 
+
863 int mi_reallocarr(void* p, size_t count, size_t size);
+
864 
+
865 void mi_free_size(void* p, size_t size);
+
866 void mi_free_size_aligned(void* p, size_t size, size_t alignment);
+
867 void mi_free_aligned(void* p, size_t alignment);
+
868 
+
870 
+
883 
+
885 void* mi_new(std::size_t n) noexcept(false);
+
886 
+
888 void* mi_new_n(size_t count, size_t size) noexcept(false);
+
889 
+
891 void* mi_new_aligned(std::size_t n, std::align_val_t alignment) noexcept(false);
+
892 
+
894 void* mi_new_nothrow(size_t n);
+
895 
+
897 void* mi_new_aligned_nothrow(size_t n, size_t alignment);
+
898 
+
900 void* mi_new_realloc(void* p, size_t newsize);
+
901 
+
903 void* mi_new_reallocn(void* p, size_t newcount, size_t size);
+
904 
+
912 template<class T> struct mi_stl_allocator { }
+
913 
+
915 
+
void * mi_calloc_aligned_at(size_t count, size_t size, size_t alignment, size_t offset)
+
void * mi_zalloc_aligned(size_t size, size_t alignment)
+
void * mi_realloc_aligned(void *p, size_t newsize, size_t alignment)
+
void * mi_calloc_aligned(size_t count, size_t size, size_t alignment)
+
void * mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset)
Allocate size bytes aligned by alignment at a specified offset.
+
void * mi_zalloc_aligned_at(size_t size, size_t alignment, size_t offset)
+
void * mi_malloc_aligned(size_t size, size_t alignment)
Allocate size bytes aligned by alignment.
+
void * mi_realloc_aligned_at(void *p, size_t newsize, size_t alignment, size_t offset)
+
size_t block_size
size in bytes of one block
Definition: mimalloc-doc.h:766
+
size_t committed
current committed bytes of this area
Definition: mimalloc-doc.h:764
+
size_t used
bytes in use by allocated blocks
Definition: mimalloc-doc.h:765
+
void * blocks
start of the area containing heap blocks
Definition: mimalloc-doc.h:762
+
size_t reserved
bytes reserved for this area
Definition: mimalloc-doc.h:763
+
bool mi_heap_check_owned(mi_heap_t *heap, const void *p)
Check safely if any pointer is part of a heap.
+
bool mi_check_owned(const void *p)
Check safely if any pointer is part of the default heap of this thread.
+
bool mi_heap_visit_blocks(const mi_heap_t *heap, bool visit_all_blocks, mi_block_visit_fun *visitor, void *arg)
Visit all areas and blocks in a heap.
+
bool mi_heap_contains_block(mi_heap_t *heap, const void *p)
Does a heap contain a pointer to a previously allocated block?
+
bool() mi_block_visit_fun(const mi_heap_t *heap, const mi_heap_area_t *area, void *block, size_t block_size, void *arg)
Visitor function passed to mi_heap_visit_blocks()
Definition: mimalloc-doc.h:776
+
An area of heap space contains blocks of a single size.
Definition: mimalloc-doc.h:761
+
void * mi_new_reallocn(void *p, size_t newcount, size_t size)
like mi_reallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc excepti...
+
void * mi_new_realloc(void *p, size_t newsize)
like mi_realloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exceptio...
+
void * mi_new(std::size_t n) noexcept(false)
like mi_malloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception...
+
void * mi_new_aligned_nothrow(size_t n, size_t alignment)
like mi_malloc_aligned, but when out of memory, use std::get_new_handler but return NULL on failure.
+
void * mi_new_n(size_t count, size_t size) noexcept(false)
like mi_mallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exceptio...
+
void * mi_new_nothrow(size_t n)
like mi_malloc, but when out of memory, use std::get_new_handler but return NULL on failure.
+
void * mi_new_aligned(std::size_t n, std::align_val_t alignment) noexcept(false)
like mi_malloc_aligned(), but when out of memory, use std::get_new_handler and raise std::bad_alloc e...
+
std::allocator implementation for mimalloc for use in STL containers.
Definition: mimalloc-doc.h:912
+
int mi_reserve_os_memory(size_t size, bool commit, bool allow_large)
Reserve OS memory for use by mimalloc.
+
size_t mi_usable_size(void *p)
Return the available bytes in a memory block.
+
void mi_thread_done(void)
Uninitialize mimalloc on a thread.
+
void * mi_zalloc_small(size_t size)
Allocate a zero initialized small object.
+
void() mi_error_fun(int err, void *arg)
Type of error callback functions.
Definition: mimalloc-doc.h:391
+
void() mi_deferred_free_fun(bool force, unsigned long long heartbeat, void *arg)
Type of deferred free functions.
Definition: mimalloc-doc.h:352
+
void mi_stats_print(void *out)
Deprecated.
+
int mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs)
Reserve pages of huge OS pages (1GiB) evenly divided over numa_nodes nodes, but stops after at most t...
+
void mi_register_deferred_free(mi_deferred_free_fun *deferred_free, void *arg)
Register a deferred free function.
+
void mi_stats_reset(void)
Reset statistics.
+
void mi_collect(bool force)
Eagerly free memory.
+
bool mi_manage_os_memory(void *start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node)
Manage a particular memory area for use by mimalloc.
+
void mi_stats_print_out(mi_output_fun *out, void *arg)
Print the main statistics.
+
bool mi_is_in_heap_region(const void *p)
Is a pointer part of our heap?
+
void * mi_malloc_small(size_t size)
Allocate a small object.
+
int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs)
Reserve pages of huge OS pages (1GiB) at a specific numa_node, but stops after at most timeout_msecs ...
+
void mi_process_info(size_t *elapsed_msecs, size_t *user_msecs, size_t *system_msecs, size_t *current_rss, size_t *peak_rss, size_t *current_commit, size_t *peak_commit, size_t *page_faults)
Return process information (time and memory usage).
+
void mi_stats_merge(void)
Merge thread local statistics with the main statistics and reset.
+
void mi_register_error(mi_error_fun *errfun, void *arg)
Register an error callback function.
+
bool mi_is_redirected()
Is the C runtime malloc API redirected?
+
void mi_thread_stats_print_out(mi_output_fun *out, void *arg)
Print out heap statistics for this thread.
+
size_t mi_good_size(size_t size)
Return the used allocation size.
+
void() mi_output_fun(const char *msg, void *arg)
Type of output functions.
Definition: mimalloc-doc.h:376
+
void mi_register_output(mi_output_fun *out, void *arg)
Register an output function.
+
void mi_thread_init(void)
Initialize mimalloc on a thread.
+
char * mi_heap_realpath(mi_heap_t *heap, const char *fname, char *resolved_name)
Resolve a file path name using a specific heap to allocate the result.
+
void * mi_heap_calloc_aligned_at(mi_heap_t *heap, size_t count, size_t size, size_t alignment, size_t offset)
+
char * mi_heap_strdup(mi_heap_t *heap, const char *s)
Duplicate a string in a specific heap.
+
void * mi_heap_malloc_aligned_at(mi_heap_t *heap, size_t size, size_t alignment, size_t offset)
+
void mi_heap_delete(mi_heap_t *heap)
Delete a previously allocated heap.
+
struct mi_heap_s mi_heap_t
Type of first-class heaps.
Definition: mimalloc-doc.h:554
+
void * mi_heap_zalloc_aligned_at(mi_heap_t *heap, size_t size, size_t alignment, size_t offset)
+
void * mi_heap_reallocf(mi_heap_t *heap, void *p, size_t newsize)
+
void * mi_heap_calloc_aligned(mi_heap_t *heap, size_t count, size_t size, size_t alignment)
+
mi_heap_t * mi_heap_get_backing()
Get the backing heap.
+
mi_heap_t * mi_heap_new()
Create a new heap that can be used for allocation.
+
void mi_heap_collect(mi_heap_t *heap, bool force)
Release outstanding resources in a specific heap.
+
void * mi_heap_mallocn(mi_heap_t *heap, size_t count, size_t size)
Allocate count elements in a specific heap.
+
mi_heap_t * mi_heap_get_default()
Get the default heap that is used for mi_malloc() et al.
+
char * mi_heap_strndup(mi_heap_t *heap, const char *s, size_t n)
Duplicate a string of at most length n in a specific heap.
+
void * mi_heap_zalloc(mi_heap_t *heap, size_t size)
Allocate zero-initialized in a specific heap.
+
void * mi_heap_malloc(mi_heap_t *heap, size_t size)
Allocate in a specific heap.
+
void mi_heap_destroy(mi_heap_t *heap)
Destroy a heap, freeing all its still allocated blocks.
+
void * mi_heap_malloc_small(mi_heap_t *heap, size_t size)
Allocate a small object in a specific heap.
+
void * mi_heap_zalloc_aligned(mi_heap_t *heap, size_t size, size_t alignment)
+
void * mi_heap_calloc(mi_heap_t *heap, size_t count, size_t size)
Allocate count zero-initialized elements in a specific heap.
+
void * mi_heap_realloc(mi_heap_t *heap, void *p, size_t newsize)
+
void * mi_heap_malloc_aligned(mi_heap_t *heap, size_t size, size_t alignment)
+
mi_heap_t * mi_heap_set_default(mi_heap_t *heap)
Set the default heap to use for mi_malloc() et al.
+
void * mi_heap_reallocn(mi_heap_t *heap, void *p, size_t count, size_t size)
+
void * mi_heap_realloc_aligned_at(mi_heap_t *heap, void *p, size_t newsize, size_t alignment, size_t offset)
+
void * mi_heap_realloc_aligned(mi_heap_t *heap, void *p, size_t newsize, size_t alignment)
+
char * mi_realpath(const char *fname, char *resolved_name)
Resolve a file path name.
+
void * mi_mallocn(size_t count, size_t size)
Allocate count elements of size bytes.
+
void * mi_recalloc(void *p, size_t count, size_t size)
Re-allocate memory to count elements of size bytes, with extra memory initialized to zero.
+
void * mi_malloc(size_t size)
Allocate size bytes.
+
void * mi_reallocn(void *p, size_t count, size_t size)
Re-allocate memory to count elements of size bytes.
+
void * mi_calloc(size_t count, size_t size)
Allocate zero-initialized count elements of size bytes.
+
char * mi_strndup(const char *s, size_t n)
Allocate and duplicate a string up to n bytes.
+
void * mi_expand(void *p, size_t newsize)
Try to re-allocate memory to newsize bytes in place.
+
char * mi_strdup(const char *s)
Allocate and duplicate a string.
+
void * mi_realloc(void *p, size_t newsize)
Re-allocate memory to newsize bytes.
+
void mi_free(void *p)
Free previously allocated memory.
+
void * mi_zalloc(size_t size)
Allocate zero-initialized size bytes.
+
void * mi_reallocf(void *p, size_t newsize)
Re-allocate memory to newsize bytes,.
+
void mi_option_enable(mi_option_t option)
+
bool mi_option_is_enabled(mi_option_t option)
+
void mi_option_set_enabled_default(mi_option_t option, bool enable)
+
long mi_option_get(mi_option_t option)
+
void mi_option_set_default(mi_option_t option, long value)
+
void mi_option_set_enabled(mi_option_t option, bool enable)
+
void mi_option_disable(mi_option_t option)
+
void mi_option_set(mi_option_t option, long value)
+
mi_option_t
Runtime options.
Definition: mimalloc-doc.h:800
+
@ mi_option_show_stats
Print statistics to stderr when the program is done.
Definition: mimalloc-doc.h:803
+
@ mi_option_use_numa_nodes
Pretend there are at most N NUMA nodes.
Definition: mimalloc-doc.h:815
+
@ mi_option_reset_delay
Delay in milli-seconds before resetting a page (100ms by default)
Definition: mimalloc-doc.h:814
+
@ mi_option_eager_commit_delay
Experimental.
Definition: mimalloc-doc.h:817
+
@ mi_option_eager_commit
Eagerly commit segments (4MiB) (enabled by default).
Definition: mimalloc-doc.h:806
+
@ mi_option_segment_cache
The number of segments per thread to keep cached.
Definition: mimalloc-doc.h:811
+
@ mi_option_eager_region_commit
Eagerly commit large (256MiB) memory regions (enabled by default, except on Windows)
Definition: mimalloc-doc.h:807
+
@ mi_option_large_os_pages
Use large OS pages (2MiB in size) if possible.
Definition: mimalloc-doc.h:808
+
@ mi_option_os_tag
OS tag to assign to mimalloc'd memory.
Definition: mimalloc-doc.h:818
+
@ _mi_option_last
Definition: mimalloc-doc.h:819
+
@ mi_option_verbose
Print verbose messages to stderr.
Definition: mimalloc-doc.h:804
+
@ mi_option_reserve_huge_os_pages_at
Reserve huge OS pages at node N.
Definition: mimalloc-doc.h:810
+
@ mi_option_reset_decommits
Experimental.
Definition: mimalloc-doc.h:816
+
@ mi_option_reserve_huge_os_pages
The number of huge OS pages (1GiB in size) to reserve at the start of the program.
Definition: mimalloc-doc.h:809
+
@ mi_option_page_reset
Reset page memory after mi_option_reset_delay milliseconds when it becomes free.
Definition: mimalloc-doc.h:812
+
@ mi_option_segment_reset
Experimental.
Definition: mimalloc-doc.h:813
+
@ mi_option_show_errors
Print error messages to stderr.
Definition: mimalloc-doc.h:802
+
size_t mi_malloc_usable_size(const void *p)
+
void mi_free_aligned(void *p, size_t alignment)
+
void * mi_aligned_alloc(size_t alignment, size_t size)
+
size_t mi_malloc_size(const void *p)
+
void * mi_reallocarray(void *p, size_t count, size_t size)
Correspond s to reallocarray in FreeBSD.
+
void mi_cfree(void *p)
Just as free but also checks if the pointer p belongs to our heap.
+
void mi_free_size_aligned(void *p, size_t size, size_t alignment)
+
void * mi_valloc(size_t size)
+
int mi_reallocarr(void *p, size_t count, size_t size)
Corresponds to reallocarr in NetBSD.
+
void * mi_memalign(size_t alignment, size_t size)
+
int mi_posix_memalign(void **p, size_t alignment, size_t size)
+
int mi__posix_memalign(void **p, size_t alignment, size_t size)
+
void mi_free_size(void *p, size_t size)
+
void * mi_pvalloc(size_t size)
+
void * mi_heap_rezalloc_aligned(mi_heap_t *heap, void *p, size_t newsize, size_t alignment)
+
void * mi_recalloc_aligned(void *p, size_t newcount, size_t size, size_t alignment)
+
void * mi_heap_recalloc_aligned_at(mi_heap_t *heap, void *p, size_t newcount, size_t size, size_t alignment, size_t offset)
+
void * mi_recalloc_aligned_at(void *p, size_t newcount, size_t size, size_t alignment, size_t offset)
+
void * mi_heap_recalloc(mi_heap_t *heap, void *p, size_t newcount, size_t size)
+
void * mi_rezalloc(void *p, size_t newsize)
+
void * mi_heap_recalloc_aligned(mi_heap_t *heap, void *p, size_t newcount, size_t size, size_t alignment)
+
void * mi_heap_rezalloc_aligned_at(mi_heap_t *heap, void *p, size_t newsize, size_t alignment, size_t offset)
+
void * mi_rezalloc_aligned(void *p, size_t newsize, size_t alignment)
+
void * mi_heap_rezalloc(mi_heap_t *heap, void *p, size_t newsize)
+
void * mi_rezalloc_aligned_at(void *p, size_t newsize, size_t alignment, size_t offset)
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/mimalloc-doxygen.css b/src/dashbls/depends/mimalloc/docs/mimalloc-doxygen.css new file mode 100644 index 000000000000..b24f5643268f --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/mimalloc-doxygen.css @@ -0,0 +1,49 @@ +#projectlogo img { + padding: 1ex; +} +tt, code, kbd, samp, div.memproto, div.fragment, div.line, table.memname { + font-family: Consolas, Monaco, Inconsolata, "Courier New", monospace; +} +.image img, .textblock img { + max-width: 99%; + max-height: 350px; +} +table.memname, .memname{ + font-weight: bold; +} +code { + background-color: #EEE; + padding: 0ex 0.25ex; +} +body { + margin: 1ex 1ex 0ex 1ex; + border: 1px solid black; +} +.contents table, .contents div, .contents p, .contents dl { + font-size: 16px; + line-height: 1.44; +} +body #nav-tree .label { + font-size: 14px; +} +a{ + text-decoration: underline; +} +#side-nav { + margin-left: 1ex; + border-left: 1px solid black; +} +#nav-tree { + padding-left: 1ex; +} +#nav-path { + display: none; +} +div.fragment { + background-color: #EEE; + padding: 0.25ex 0.5ex; + border-color: black; +} +#nav-sync img { + display: none; +} diff --git a/src/dashbls/depends/mimalloc/docs/mimalloc-logo.svg b/src/dashbls/depends/mimalloc/docs/mimalloc-logo.svg new file mode 100644 index 000000000000..672c7e41ac13 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/mimalloc-logo.svg @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/dashbls/depends/mimalloc/docs/modules.html b/src/dashbls/depends/mimalloc/docs/modules.html new file mode 100644 index 000000000000..7457cb9fd23f --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/modules.html @@ -0,0 +1,124 @@ + + + + + + + +mi-malloc: Modules + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Modules
+
+
+
Here is a list of all modules:
+ + + + + + + + + + + +
 Basic AllocationThe basic allocation interface
 Extended FunctionsExtended functionality
 Aligned AllocationAllocating aligned memory blocks
 Heap AllocationFirst-class heaps that can be destroyed in one go
 Zero initialized re-allocationThe zero-initialized re-allocations are only valid on memory that was originally allocated with zero initialization too
 Typed MacrosTyped allocation macros
 Heap IntrospectionInspect the heap at runtime
 Runtime OptionsSet runtime behavior
 Posixmi_ prefixed implementations of various Posix, Unix, and C++ allocation functions
 C++ wrappersmi_ prefixed implementations of various allocation functions that use C++ semantics on out-of-memory, generally calling std::get_new_handler and raising a std::bad_alloc exception on failure
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/modules.js b/src/dashbls/depends/mimalloc/docs/modules.js new file mode 100644 index 000000000000..b2c2a2249a8b --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/modules.js @@ -0,0 +1,13 @@ +var modules = +[ + [ "Basic Allocation", "group__malloc.html", "group__malloc" ], + [ "Extended Functions", "group__extended.html", "group__extended" ], + [ "Aligned Allocation", "group__aligned.html", "group__aligned" ], + [ "Heap Allocation", "group__heap.html", "group__heap" ], + [ "Zero initialized re-allocation", "group__zeroinit.html", "group__zeroinit" ], + [ "Typed Macros", "group__typed.html", "group__typed" ], + [ "Heap Introspection", "group__analysis.html", "group__analysis" ], + [ "Runtime Options", "group__options.html", "group__options" ], + [ "Posix", "group__posix.html", "group__posix" ], + [ "C++ wrappers", "group__cpp.html", "group__cpp" ] +]; \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/docs/nav_f.png b/src/dashbls/depends/mimalloc/docs/nav_f.png new file mode 100644 index 0000000000000000000000000000000000000000..cbfef42971c02cbb567d442288beaea7846aed80 GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI`!2~2XGqLUlQiYx_jv*C{Z|6GlH5rJw?B8R& z=|b*)wz1~t?r17iS5u2in6$mZxR|5zo%QW+3)X1w6bU+aWJ+FXFjDnS*rqE8e;9c50s88ocGXx3W_G$8#6`dpl%STs?0u|8H+-+^+=L Vy4zM_9ze?(JYD@<);T3K0RSUpLL&eG literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/nav_g.png b/src/dashbls/depends/mimalloc/docs/nav_g.png new file mode 100644 index 0000000000000000000000000000000000000000..2093a237a94f6c83e19ec6e5fd42f7ddabdafa81 GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^j6lrB!3HFm1ilyoDK$?Q$B+ufw|5PB85lU25BhtE tr?otc=hd~V+ws&_A@j8Fiv!KF$B+ufw|5WnGB|KBIWnil vE&3bY=ytO7VD=3yC!u&Tj{FaMzc)oQ@8@PI$gua?2h!!~>gTe~DWM4fIzAf1 literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/navtree.css b/src/dashbls/depends/mimalloc/docs/navtree.css new file mode 100644 index 000000000000..046366ca230a --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/navtree.css @@ -0,0 +1,146 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 180px; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:url("splitbar.png"); + background-size:100%; + background-repeat:repeat-y; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F2F3F3; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/src/dashbls/depends/mimalloc/docs/navtree.js b/src/dashbls/depends/mimalloc/docs/navtree.js new file mode 100644 index 000000000000..1e272d31d4aa --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/navtree.js @@ -0,0 +1,546 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +var navTreeSubIndices = new Array(); +var arrowDown = '▼'; +var arrowRight = '►'; + +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('memtitle') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, showRoot) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).slideDown("fast"); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + $('#nav-sync').css('top','30px'); + } else { + $('#nav-sync').css('top','5px'); + } + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + },true); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + },true); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +var loadTriggered = false; +var readyTriggered = false; +var loadObject,loadToRoot,loadUrl,loadRelPath; + +$(window).on('load',function(){ + if (readyTriggered) { // ready first + navTo(loadObject,loadToRoot,loadUrl,loadRelPath); + showRoot(); + } + loadTriggered=true; +}); + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + if (loadTriggered) { // load before ready + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + } else { // ready before load + loadObject = o; + loadToRoot = toroot; + loadUrl = hashUrl(); + loadRelPath = relpath; + readyTriggered=true; + } + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/1|%O$WD@{VHl8kyAr*{o=WgU=P~c(FUzfUg za`xkxQ@1&if^I(*`e$jxd>}tUuawDUMwm+9y&Ug(8jj|7TcHA QfaWlGy85}Sb4q9e0Q%!3%m4rY literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/overrides.html b/src/dashbls/depends/mimalloc/docs/overrides.html new file mode 100644 index 000000000000..fc0ad591e7ae --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/overrides.html @@ -0,0 +1,198 @@ + + + + + + + +mi-malloc: Overriding Malloc + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Overriding Malloc
+
+
+

Overriding the standard malloc can be done either dynamically or statically.

+

Dynamic override

+

This is the recommended way to override the standard malloc interface.

+

Linux, BSD

+

On these systems we preload the mimalloc shared library so all calls to the standard malloc interface are resolved to the mimalloc library.

+
    +
  • env LD_PRELOAD=/usr/lib/libmimalloc.so myprogram
  • +
+

You can set extra environment variables to check that mimalloc is running, like:

env MIMALLOC_VERBOSE=1 LD_PRELOAD=/usr/lib/libmimalloc.so myprogram
+

or run with the debug version to get detailed statistics:

env MIMALLOC_SHOW_STATS=1 LD_PRELOAD=/usr/lib/libmimalloc-debug.so myprogram
+

MacOS

+

On macOS we can also preload the mimalloc shared library so all calls to the standard malloc interface are resolved to the mimalloc library.

+
    +
  • env DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES=/usr/lib/libmimalloc.dylib myprogram
  • +
+

Note that certain security restrictions may apply when doing this from the shell.

+

(Note: macOS support for dynamic overriding is recent, please report any issues.)

+

Windows

+

Overriding on Windows is robust and has the particular advantage to be able to redirect all malloc/free calls that go through the (dynamic) C runtime allocator, including those from other DLL's or libraries.

+

The overriding on Windows requires that you link your program explicitly with the mimalloc DLL and use the C-runtime library as a DLL (using the /MD or /MDd switch). Also, the mimalloc-redirect.dll (or mimalloc-redirect32.dll) must be available in the same folder as the main mimalloc-override.dll at runtime (as it is a dependency). The redirection DLL ensures that all calls to the C runtime malloc API get redirected to mimalloc (in mimalloc-override.dll).

+

To ensure the mimalloc DLL is loaded at run-time it is easiest to insert some call to the mimalloc API in the main function, like mi_version() (or use the /INCLUDE:mi_version switch on the linker). See the mimalloc-override-test project for an example on how to use this. For best performance on Windows with C++, it is also recommended to also override the new/delete operations (by including mimalloc-new-delete.h a single(!) source file in your project without linking to the mimalloc library).

+

The environment variable MIMALLOC_DISABLE_REDIRECT=1 can be used to disable dynamic overriding at run-time. Use MIMALLOC_VERBOSE=1 to check if mimalloc was successfully redirected.

+

(Note: in principle, it is possible to even patch existing executables without any recompilation if they are linked with the dynamic C runtime (ucrtbase.dll) – just put the mimalloc-override.dll into the import table (and put mimalloc-redirect.dll in the same folder) Such patching can be done for example with CFF Explorer).

+

Static override

+

On Unix systems, you can also statically link with mimalloc to override the standard malloc interface. The recommended way is to link the final program with the mimalloc single object file (mimalloc-override.o). We use an object file instead of a library file as linkers give preference to that over archives to resolve symbols. To ensure that the standard malloc interface resolves to the mimalloc library, link it as the first object file. For example:

+
gcc -o myprogram mimalloc-override.o myfile1.c ...
+

List of Overrides:

+

The specific functions that get redirected to the mimalloc library are:

+
// C
+
void* malloc(size_t size);
+
void* calloc(size_t size, size_t n);
+
void* realloc(void* p, size_t newsize);
+
void free(void* p);
+
+
void* aligned_alloc(size_t alignment, size_t size);
+
char* strdup(const char* s);
+
char* strndup(const char* s, size_t n);
+
char* realpath(const char* fname, char* resolved_name);
+
+
+
// C++
+
void operator delete(void* p);
+
void operator delete[](void* p);
+
+
void* operator new(std::size_t n) noexcept(false);
+
void* operator new[](std::size_t n) noexcept(false);
+
void* operator new( std::size_t n, std::align_val_t align) noexcept(false);
+
void* operator new[]( std::size_t n, std::align_val_t align) noexcept(false);
+
+
void* operator new ( std::size_t count, const std::nothrow_t& tag);
+
void* operator new[]( std::size_t count, const std::nothrow_t& tag);
+
void* operator new ( std::size_t count, std::align_val_t al, const std::nothrow_t&);
+
void* operator new[]( std::size_t count, std::align_val_t al, const std::nothrow_t&);
+
+
// Posix
+
int posix_memalign(void** p, size_t alignment, size_t size);
+
+
// Linux
+
void* memalign(size_t alignment, size_t size);
+
void* valloc(size_t size);
+
void* pvalloc(size_t size);
+
size_t malloc_usable_size(void *p);
+
void* reallocf(void* p, size_t newsize);
+
+
// macOS
+
void vfree(void* p);
+
size_t malloc_size(const void* p);
+
size_t malloc_good_size(size_t size);
+
+
// BSD
+
void* reallocarray( void* p, size_t count, size_t size );
+
void* reallocf(void* p, size_t newsize);
+
void cfree(void* p);
+
+
// NetBSD
+
int reallocarr(void* p, size_t count, size_t size);
+
+
// Windows
+
void* _expand(void* p, size_t newsize);
+
size_t _msize(void* p);
+
+
void* _malloc_dbg(size_t size, int block_type, const char* fname, int line);
+
void* _realloc_dbg(void* p, size_t newsize, int block_type, const char* fname, int line);
+
void* _calloc_dbg(size_t count, size_t size, int block_type, const char* fname, int line);
+
void* _expand_dbg(void* p, size_t size, int block_type, const char* fname, int line);
+
size_t _msize_dbg(void* p, int block_type);
+
void _free_dbg(void* p, int block_type);
+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/pages.html b/src/dashbls/depends/mimalloc/docs/pages.html new file mode 100644 index 000000000000..6999a810d037 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/pages.html @@ -0,0 +1,119 @@ + + + + + + + +mi-malloc: Related Pages + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Related Pages
+
+
+
Here is a list of all related documentation pages:
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/docs/resize.js b/src/dashbls/depends/mimalloc/docs/resize.js new file mode 100644 index 000000000000..e1ad0fe3ba04 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/resize.js @@ -0,0 +1,140 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initResizable() +{ + var cookie_namespace = 'doxygen'; + var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight; + + function readCookie(cookie) + { + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) { + var index = document.cookie.indexOf(myCookie); + if (index != -1) { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + return 0; + } + + function writeCookie(cookie, val, expiration) + { + if (val==undefined) return; + if (expiration == null) { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + } + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; + } + + function resizeWidth() + { + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + writeCookie('width',sidenavWidth-barWidth, null); + } + + function restoreWidth(navWidth) + { + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight() + { + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + content.css({height:windowHeight + "px"}); + navtree.css({height:windowHeight + "px"}); + sidenav.css({height:windowHeight + "px"}); + var width=$(window).width(); + if (width!=collapsedWidth) { + if (width=desktop_vp) { + if (!collapsed) { + collapseExpand(); + } + } else if (width>desktop_vp && collapsedWidth0) { + restoreWidth(0); + collapsed=true; + } + else { + var width = readCookie('width'); + if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } + collapsed=false; + } + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + $(window).on('load',resizeHeight); +} +/* @license-end */ diff --git a/src/dashbls/depends/mimalloc/docs/search/all_0.html b/src/dashbls/depends/mimalloc/docs/search/all_0.html new file mode 100644 index 000000000000..1ec5b2d597f2 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_0.js b/src/dashbls/depends/mimalloc/docs/search/all_0.js new file mode 100644 index 000000000000..cd7bb4196726 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_5fmi_5foption_5flast_0',['_mi_option_last',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca5b4357b74be0d87568036c32eb1a2e4a',1,'mimalloc-doc.h']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_1.html b/src/dashbls/depends/mimalloc/docs/search/all_1.html new file mode 100644 index 000000000000..9f80e90431b7 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_1.js b/src/dashbls/depends/mimalloc/docs/search/all_1.js new file mode 100644 index 000000000000..7f1097c09520 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['aligned_20allocation_1',['Aligned Allocation',['../group__aligned.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_2.html b/src/dashbls/depends/mimalloc/docs/search/all_2.html new file mode 100644 index 000000000000..02cfffc2e139 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_2.js b/src/dashbls/depends/mimalloc/docs/search/all_2.js new file mode 100644 index 000000000000..00576d78a20d --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_2.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['basic_20allocation_2',['Basic Allocation',['../group__malloc.html',1,'']]], + ['block_5fsize_3',['block_size',['../group__analysis.html#a332a6c14d736a99699d5453a1cb04b41',1,'mi_heap_area_t']]], + ['blocks_4',['blocks',['../group__analysis.html#ae0085e6e1cf059a4eb7767e30e9991b8',1,'mi_heap_area_t']]], + ['building_5',['Building',['../build.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_3.html b/src/dashbls/depends/mimalloc/docs/search/all_3.html new file mode 100644 index 000000000000..39767b85baa9 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_3.js b/src/dashbls/depends/mimalloc/docs/search/all_3.js new file mode 100644 index 000000000000..9a029ee0b764 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['c_2b_2b_20wrappers_6',['C++ wrappers',['../group__cpp.html',1,'']]], + ['committed_7',['committed',['../group__analysis.html#ab47526df656d8837ec3e97f11b83f835',1,'mi_heap_area_t']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_4.html b/src/dashbls/depends/mimalloc/docs/search/all_4.html new file mode 100644 index 000000000000..fc40463c89f7 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_4.js b/src/dashbls/depends/mimalloc/docs/search/all_4.js new file mode 100644 index 000000000000..5dc5128610b7 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['environment_20options_8',['Environment Options',['../environment.html',1,'']]], + ['extended_20functions_9',['Extended Functions',['../group__extended.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_5.html b/src/dashbls/depends/mimalloc/docs/search/all_5.html new file mode 100644 index 000000000000..9dd9344b0d0a --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_5.js b/src/dashbls/depends/mimalloc/docs/search/all_5.js new file mode 100644 index 000000000000..7441d85349c2 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['heap_20allocation_10',['Heap Allocation',['../group__heap.html',1,'']]], + ['heap_20introspection_11',['Heap Introspection',['../group__analysis.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_6.html b/src/dashbls/depends/mimalloc/docs/search/all_6.html new file mode 100644 index 000000000000..f1e516d75abf --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_6.js b/src/dashbls/depends/mimalloc/docs/search/all_6.js new file mode 100644 index 000000000000..6d32b7b1dba9 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_6.js @@ -0,0 +1,153 @@ +var searchData= +[ + ['mi_5f_5fposix_5fmemalign_12',['mi__posix_memalign',['../group__posix.html#gad5a69c8fea96aa2b7a7c818c2130090a',1,'mimalloc-doc.h']]], + ['mi_5faligned_5falloc_13',['mi_aligned_alloc',['../group__posix.html#ga1326d2e4388630b5f81ca7206318b8e5',1,'mimalloc-doc.h']]], + ['mi_5falignment_5fmax_14',['MI_ALIGNMENT_MAX',['../group__aligned.html#ga83c03016066b438f51a8095e9140be06',1,'mimalloc-doc.h']]], + ['mi_5fblock_5fvisit_5ffun_15',['mi_block_visit_fun',['../group__analysis.html#gadfa01e2900f0e5d515ad5506b26f6d65',1,'mimalloc-doc.h']]], + ['mi_5fcalloc_16',['mi_calloc',['../group__malloc.html#ga97fedb4f7107c592fd7f0f0a8949a57d',1,'mimalloc-doc.h']]], + ['mi_5fcalloc_5faligned_17',['mi_calloc_aligned',['../group__aligned.html#ga53dddb4724042a90315b94bc268fb4c9',1,'mimalloc-doc.h']]], + ['mi_5fcalloc_5faligned_5fat_18',['mi_calloc_aligned_at',['../group__aligned.html#ga08647c4593f3b2eef24a919a73eba3a3',1,'mimalloc-doc.h']]], + ['mi_5fcalloc_5ftp_19',['mi_calloc_tp',['../group__typed.html#gae80c47c9d4cab10961fff1a8ac98fc07',1,'mimalloc-doc.h']]], + ['mi_5fcfree_20',['mi_cfree',['../group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7',1,'mimalloc-doc.h']]], + ['mi_5fcheck_5fowned_21',['mi_check_owned',['../group__analysis.html#ga628c237489c2679af84a4d0d143b3dd5',1,'mimalloc-doc.h']]], + ['mi_5fcollect_22',['mi_collect',['../group__extended.html#ga421430e2226d7d468529cec457396756',1,'mimalloc-doc.h']]], + ['mi_5fdeferred_5ffree_5ffun_23',['mi_deferred_free_fun',['../group__extended.html#ga299dae78d25ce112e384a98b7309c5be',1,'mimalloc-doc.h']]], + ['mi_5ferror_5ffun_24',['mi_error_fun',['../group__extended.html#ga251d369cda3f1c2a955c555486ed90e5',1,'mimalloc-doc.h']]], + ['mi_5fexpand_25',['mi_expand',['../group__malloc.html#gaaee66a1d483c3e28f585525fb96707e4',1,'mimalloc-doc.h']]], + ['mi_5ffree_26',['mi_free',['../group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95',1,'mimalloc-doc.h']]], + ['mi_5ffree_5faligned_27',['mi_free_aligned',['../group__posix.html#ga0d28d5cf61e6bfbb18c63092939fe5c9',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsize_28',['mi_free_size',['../group__posix.html#gae01389eedab8d67341ff52e2aad80ebb',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsize_5faligned_29',['mi_free_size_aligned',['../group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc',1,'mimalloc-doc.h']]], + ['mi_5fgood_5fsize_30',['mi_good_size',['../group__extended.html#gac057927cd06c854b45fe7847e921bd47',1,'mimalloc-doc.h']]], + ['mi_5fheap_5farea_5ft_31',['mi_heap_area_t',['../group__analysis.html#structmi__heap__area__t',1,'']]], + ['mi_5fheap_5fcalloc_32',['mi_heap_calloc',['../group__heap.html#gaa6702b3c48e9e53e50e81b36f5011d55',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_5faligned_33',['mi_heap_calloc_aligned',['../group__heap.html#ga4af03a6e2b93fae77424d93f889705c3',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_5faligned_5fat_34',['mi_heap_calloc_aligned_at',['../group__heap.html#ga08ca6419a5c057a4d965868998eef487',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_5ftp_35',['mi_heap_calloc_tp',['../group__typed.html#ga4e5d1f1707c90e5f55e023ac5f45fe74',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcheck_5fowned_36',['mi_heap_check_owned',['../group__analysis.html#ga0d67c1789faaa15ff366c024fcaf6377',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcollect_37',['mi_heap_collect',['../group__heap.html#ga7922f7495cde30b1984d0e6072419298',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcontains_5fblock_38',['mi_heap_contains_block',['../group__analysis.html#gaa862aa8ed8d57d84cae41fc1022d71af',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fdelete_39',['mi_heap_delete',['../group__heap.html#ga2ab1af8d438819b55319c7ef51d1e409',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fdestroy_40',['mi_heap_destroy',['../group__heap.html#ga9f9c0844edb9717f4feacd79116b8e0d',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fget_5fbacking_41',['mi_heap_get_backing',['../group__heap.html#ga5d03fbe062ffcf38f0f417fd968357fc',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fget_5fdefault_42',['mi_heap_get_default',['../group__heap.html#ga8db4cbb87314a989a9a187464d6b5e05',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_43',['mi_heap_malloc',['../group__heap.html#ga9cbed01e42c0647907295de92c3fa296',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5faligned_44',['mi_heap_malloc_aligned',['../group__heap.html#gab5b87e1805306f70df38789fcfcf6653',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5faligned_5fat_45',['mi_heap_malloc_aligned_at',['../group__heap.html#ga23acd7680fb0976dde3783254c6c874b',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5fsmall_46',['mi_heap_malloc_small',['../group__heap.html#gaa1a1c7a1f4da6826b5a25b70ef878368',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5ftp_47',['mi_heap_malloc_tp',['../group__typed.html#ga653bcb24ac495bc19940ecd6898f9cd7',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmallocn_48',['mi_heap_mallocn',['../group__heap.html#ga851da6c43fe0b71c1376cee8aef90db0',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmallocn_5ftp_49',['mi_heap_mallocn_tp',['../group__typed.html#ga6b75cb9c4b9c647661d0924552dc6e83',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fnew_50',['mi_heap_new',['../group__heap.html#ga766f672ba56f2fbfeb9d9dbb0b7f6b11',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_51',['mi_heap_realloc',['../group__heap.html#gaaef3395f66be48f37bdc8322509c5d81',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_5faligned_52',['mi_heap_realloc_aligned',['../group__heap.html#gafc603b696bd14cae6da28658f950d98c',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_5faligned_5fat_53',['mi_heap_realloc_aligned_at',['../group__heap.html#gaf96c788a1bf553fe2d371de9365e047c',1,'mimalloc-doc.h']]], + ['mi_5fheap_5freallocf_54',['mi_heap_reallocf',['../group__heap.html#ga4a21070eb4e7cce018133c8d5f4b0527',1,'mimalloc-doc.h']]], + ['mi_5fheap_5freallocn_55',['mi_heap_reallocn',['../group__heap.html#gac74e94ad9b0c9b57c1c4d88b8825b7a8',1,'mimalloc-doc.h']]], + ['mi_5fheap_5freallocn_5ftp_56',['mi_heap_reallocn_tp',['../group__typed.html#gaf213d5422ec35e7f6caad827c79bc948',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealpath_57',['mi_heap_realpath',['../group__heap.html#ga00e95ba1e01acac3cfd95bb7a357a6f0',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_58',['mi_heap_recalloc',['../group__zeroinit.html#ga8648c5fbb22a80f0262859099f06dfbd',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_5faligned_59',['mi_heap_recalloc_aligned',['../group__zeroinit.html#ga9f3f999396c8f77ca5e80e7b40ac29e3',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_5faligned_5fat_60',['mi_heap_recalloc_aligned_at',['../group__zeroinit.html#ga496452c96f1de8c500be9fddf52edaf7',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_5ftp_61',['mi_heap_recalloc_tp',['../group__typed.html#ga3e50a1600958fcaf1a7f3560c9174f9e',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_62',['mi_heap_rezalloc',['../group__zeroinit.html#gacfad83f14eb5d6a42a497a898e19fc76',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_5faligned_63',['mi_heap_rezalloc_aligned',['../group__zeroinit.html#ga375fa8a611c51905e592d5d467c49664',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_5faligned_5fat_64',['mi_heap_rezalloc_aligned_at',['../group__zeroinit.html#gac90da54fa7e5d10bdc97ce0b51dce2eb',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fset_5fdefault_65',['mi_heap_set_default',['../group__heap.html#gab8631ec88c8d26641b68b5d25dcd4422',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstrdup_66',['mi_heap_strdup',['../group__heap.html#ga139d6b09dbf50c3c2523d0f4d1cfdeb5',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstrndup_67',['mi_heap_strndup',['../group__heap.html#ga8e3dbd46650dd26573cf307a2c8f1f5a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5ft_68',['mi_heap_t',['../group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fvisit_5fblocks_69',['mi_heap_visit_blocks',['../group__analysis.html#ga70c46687dc6e9dc98b232b02646f8bed',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_70',['mi_heap_zalloc',['../group__heap.html#ga903104592c8ed53417a3762da6241133',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5faligned_71',['mi_heap_zalloc_aligned',['../group__heap.html#gaa450a59c6c7ae5fdbd1c2b80a8329ef0',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5faligned_5fat_72',['mi_heap_zalloc_aligned_at',['../group__heap.html#ga45fb43a62776fbebbdf1edd99b527954',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5ftp_73',['mi_heap_zalloc_tp',['../group__typed.html#gad6e87e86e994aa14416ae9b5d4c188fe',1,'mimalloc-doc.h']]], + ['mi_5fis_5fin_5fheap_5fregion_74',['mi_is_in_heap_region',['../group__extended.html#ga5f071b10d4df1c3658e04e7fd67a94e6',1,'mimalloc-doc.h']]], + ['mi_5fis_5fredirected_75',['mi_is_redirected',['../group__extended.html#gaad25050b19f30cd79397b227e0157a3f',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_76',['mi_malloc',['../group__malloc.html#ga3406e8b168bc74c8637b11571a6da83a',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5faligned_77',['mi_malloc_aligned',['../group__aligned.html#ga68930196751fa2cca9e1fd0d71bade56',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5faligned_5fat_78',['mi_malloc_aligned_at',['../group__aligned.html#ga5850da130c936bd77db039dcfbc8295d',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fsize_79',['mi_malloc_size',['../group__posix.html#ga4531c9e775bb3ae12db57c1ba8a5d7de',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fsmall_80',['mi_malloc_small',['../group__extended.html#ga7136c2e55cb22c98ecf95d08d6debb99',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5ftp_81',['mi_malloc_tp',['../group__typed.html#ga0619a62c5fd886f1016030abe91f0557',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fusable_5fsize_82',['mi_malloc_usable_size',['../group__posix.html#ga06d07cf357bbac5c73ba5d0c0c421e17',1,'mimalloc-doc.h']]], + ['mi_5fmallocn_83',['mi_mallocn',['../group__malloc.html#ga0b05e2bf0f73e7401ae08597ff782ac6',1,'mimalloc-doc.h']]], + ['mi_5fmallocn_5ftp_84',['mi_mallocn_tp',['../group__typed.html#gae5cb6e0fafc9f23169c5622e077afe8b',1,'mimalloc-doc.h']]], + ['mi_5fmanage_5fos_5fmemory_85',['mi_manage_os_memory',['../group__extended.html#ga4c6486a1fdcd7a423b5f25fe4be8e0cf',1,'mimalloc-doc.h']]], + ['mi_5fmemalign_86',['mi_memalign',['../group__posix.html#gaab7fa71ea93b96873f5d9883db57d40e',1,'mimalloc-doc.h']]], + ['mi_5fnew_87',['mi_new',['../group__cpp.html#gaad048a9fce3d02c5909cd05c6ec24545',1,'mimalloc-doc.h']]], + ['mi_5fnew_5faligned_88',['mi_new_aligned',['../group__cpp.html#gaef2c2bdb4f70857902d3c8903ac095f3',1,'mimalloc-doc.h']]], + ['mi_5fnew_5faligned_5fnothrow_89',['mi_new_aligned_nothrow',['../group__cpp.html#gab5e29558926d934c3f1cae8c815f942c',1,'mimalloc-doc.h']]], + ['mi_5fnew_5fn_90',['mi_new_n',['../group__cpp.html#gae7bc4f56cd57ed3359060ff4f38bda81',1,'mimalloc-doc.h']]], + ['mi_5fnew_5fnothrow_91',['mi_new_nothrow',['../group__cpp.html#gaeaded64eda71ed6b1d569d3e723abc4a',1,'mimalloc-doc.h']]], + ['mi_5fnew_5frealloc_92',['mi_new_realloc',['../group__cpp.html#gaab78a32f55149e9fbf432d5288e38e1e',1,'mimalloc-doc.h']]], + ['mi_5fnew_5freallocn_93',['mi_new_reallocn',['../group__cpp.html#ga756f4b2bc6a7ecd0a90baea8e90c7907',1,'mimalloc-doc.h']]], + ['mi_5foption_5fdisable_94',['mi_option_disable',['../group__options.html#gaebf6ff707a2e688ebb1a2296ca564054',1,'mimalloc-doc.h']]], + ['mi_5foption_5feager_5fcommit_95',['mi_option_eager_commit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca1e8de72c93da7ff22d91e1e27b52ac2b',1,'mimalloc-doc.h']]], + ['mi_5foption_5feager_5fcommit_5fdelay_96',['mi_option_eager_commit_delay',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca17a190c25be381142d87e0468c4c068c',1,'mimalloc-doc.h']]], + ['mi_5foption_5feager_5fregion_5fcommit_97',['mi_option_eager_region_commit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca32ce97ece29f69e82579679cf8a307ad',1,'mimalloc-doc.h']]], + ['mi_5foption_5fenable_98',['mi_option_enable',['../group__options.html#ga04180ae41b0d601421dd62ced40ca050',1,'mimalloc-doc.h']]], + ['mi_5foption_5fget_99',['mi_option_get',['../group__options.html#ga7e8af195cc81d3fa64ccf2662caa565a',1,'mimalloc-doc.h']]], + ['mi_5foption_5fis_5fenabled_100',['mi_option_is_enabled',['../group__options.html#ga459ad98f18b3fc9275474807fe0ca188',1,'mimalloc-doc.h']]], + ['mi_5foption_5flarge_5fos_5fpages_101',['mi_option_large_os_pages',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4192d491200d0055df0554d4cf65054e',1,'mimalloc-doc.h']]], + ['mi_5foption_5fos_5ftag_102',['mi_option_os_tag',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4b74ae2a69e445de6c2361b73c1d14bf',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpage_5freset_103',['mi_option_page_reset',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cada854dd272c66342f18a93ee254a2968',1,'mimalloc-doc.h']]], + ['mi_5foption_5freserve_5fhuge_5fos_5fpages_104',['mi_option_reserve_huge_os_pages',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caca7ed041be3b0b9d0b82432c7bf41af2',1,'mimalloc-doc.h']]], + ['mi_5foption_5freserve_5fhuge_5fos_5fpages_5fat_105',['mi_option_reserve_huge_os_pages_at',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caa13e7926d4339d2aa6fbf61d4473fd5c',1,'mimalloc-doc.h']]], + ['mi_5foption_5freset_5fdecommits_106',['mi_option_reset_decommits',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cac81ee965b130fa81238913a3c239d536',1,'mimalloc-doc.h']]], + ['mi_5foption_5freset_5fdelay_107',['mi_option_reset_delay',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca154fe170131d5212cff57e22b99523c5',1,'mimalloc-doc.h']]], + ['mi_5foption_5fsegment_5fcache_108',['mi_option_segment_cache',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca2ecbe7ef32f5c84de3739aa4f0b805a1',1,'mimalloc-doc.h']]], + ['mi_5foption_5fsegment_5freset_109',['mi_option_segment_reset',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafb121d30d87591850d5410ccc3a95c6d',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_110',['mi_option_set',['../group__options.html#gaf84921c32375e25754dc2ee6a911fa60',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fdefault_111',['mi_option_set_default',['../group__options.html#ga7ef623e440e6e5545cb08c94e71e4b90',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fenabled_112',['mi_option_set_enabled',['../group__options.html#ga9a13d05fcb77489cb06d4d017ebd8bed',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fenabled_5fdefault_113',['mi_option_set_enabled_default',['../group__options.html#ga65518b69ec5d32336b50e07f74b3f629',1,'mimalloc-doc.h']]], + ['mi_5foption_5fshow_5ferrors_114',['mi_option_show_errors',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafbf4822e5c00732c5984b32a032837f0',1,'mimalloc-doc.h']]], + ['mi_5foption_5fshow_5fstats_115',['mi_option_show_stats',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0957ef73b2550764b4840edf48422fda',1,'mimalloc-doc.h']]], + ['mi_5foption_5ft_116',['mi_option_t',['../group__options.html#gafebf7ed116adb38ae5218bc3ce06884c',1,'mimalloc-doc.h']]], + ['mi_5foption_5fuse_5fnuma_5fnodes_117',['mi_option_use_numa_nodes',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0ac33a18f6b659fcfaf44efb0bab1b74',1,'mimalloc-doc.h']]], + ['mi_5foption_5fverbose_118',['mi_option_verbose',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca7c8b7bf5281c581bad64f5daa6442777',1,'mimalloc-doc.h']]], + ['mi_5foutput_5ffun_119',['mi_output_fun',['../group__extended.html#gad823d23444a4b77a40f66bf075a98a0c',1,'mimalloc-doc.h']]], + ['mi_5fposix_5fmemalign_120',['mi_posix_memalign',['../group__posix.html#gacff84f226ba9feb2031b8992e5579447',1,'mimalloc-doc.h']]], + ['mi_5fprocess_5finfo_121',['mi_process_info',['../group__extended.html#ga7d862c2affd5790381da14eb102a364d',1,'mimalloc-doc.h']]], + ['mi_5fpvalloc_122',['mi_pvalloc',['../group__posix.html#gaeb325c39b887d3b90d85d1eb1712fb1e',1,'mimalloc-doc.h']]], + ['mi_5frealloc_123',['mi_realloc',['../group__malloc.html#gaf11eb497da57bdfb2de65eb191c69db6',1,'mimalloc-doc.h']]], + ['mi_5frealloc_5faligned_124',['mi_realloc_aligned',['../group__aligned.html#ga4028d1cf4aa4c87c880747044a8322ae',1,'mimalloc-doc.h']]], + ['mi_5frealloc_5faligned_5fat_125',['mi_realloc_aligned_at',['../group__aligned.html#gaf66a9ae6c6f08bd6be6fb6ea771faffb',1,'mimalloc-doc.h']]], + ['mi_5freallocarr_126',['mi_reallocarr',['../group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5',1,'mimalloc-doc.h']]], + ['mi_5freallocarray_127',['mi_reallocarray',['../group__posix.html#ga48fad8648a2f1dab9c87ea9448a52088',1,'mimalloc-doc.h']]], + ['mi_5freallocf_128',['mi_reallocf',['../group__malloc.html#gafe68ac7c5e24a65cd55c9d6b152211a0',1,'mimalloc-doc.h']]], + ['mi_5freallocn_129',['mi_reallocn',['../group__malloc.html#ga61d57b4144ba24fba5c1e9b956d13853',1,'mimalloc-doc.h']]], + ['mi_5freallocn_5ftp_130',['mi_reallocn_tp',['../group__typed.html#ga1158b49a55dfa81f58a4426a7578f523',1,'mimalloc-doc.h']]], + ['mi_5frealpath_131',['mi_realpath',['../group__malloc.html#ga08cec32dd5bbe7da91c78d19f1b5bebe',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_132',['mi_recalloc',['../group__malloc.html#ga23a0fbb452b5dce8e31fab1a1958cacc',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_5faligned_133',['mi_recalloc_aligned',['../group__zeroinit.html#ga3e7e5c291acf1c7fd7ffd9914a9f945f',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_5faligned_5fat_134',['mi_recalloc_aligned_at',['../group__zeroinit.html#ga4ff5e92ad73585418a072c9d059e5cf9',1,'mimalloc-doc.h']]], + ['mi_5fregister_5fdeferred_5ffree_135',['mi_register_deferred_free',['../group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece',1,'mimalloc-doc.h']]], + ['mi_5fregister_5ferror_136',['mi_register_error',['../group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45',1,'mimalloc-doc.h']]], + ['mi_5fregister_5foutput_137',['mi_register_output',['../group__extended.html#gae5b17ff027cd2150b43a33040250cf3f',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fhuge_5fos_5fpages_5fat_138',['mi_reserve_huge_os_pages_at',['../group__extended.html#ga7795a13d20087447281858d2c771cca1',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fhuge_5fos_5fpages_5finterleave_139',['mi_reserve_huge_os_pages_interleave',['../group__extended.html#ga3132f521fb756fc0e8ec0b74fb58df50',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fos_5fmemory_140',['mi_reserve_os_memory',['../group__extended.html#ga00ec3324b6b2591c7fe3677baa30a767',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_141',['mi_rezalloc',['../group__zeroinit.html#ga8c292e142110229a2980b37ab036dbc6',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_5faligned_142',['mi_rezalloc_aligned',['../group__zeroinit.html#gacd71a7bce96aab38ae6de17af2eb2cf0',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_5faligned_5fat_143',['mi_rezalloc_aligned_at',['../group__zeroinit.html#gae8b358c417e61d5307da002702b0a8e1',1,'mimalloc-doc.h']]], + ['mi_5fsmall_5fsize_5fmax_144',['MI_SMALL_SIZE_MAX',['../group__extended.html#ga1ea64283508718d9d645c38efc2f4305',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fmerge_145',['mi_stats_merge',['../group__extended.html#ga854b1de8cb067c7316286c28b2fcd3d1',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fprint_146',['mi_stats_print',['../group__extended.html#ga2d126e5c62d3badc35445e5d84166df2',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fprint_5fout_147',['mi_stats_print_out',['../group__extended.html#ga537f13b299ddf801e49a5a94fde02c79',1,'mimalloc-doc.h']]], + ['mi_5fstats_5freset_148',['mi_stats_reset',['../group__extended.html#ga3bb8468b8cfcc6e2a61d98aee85c5f99',1,'mimalloc-doc.h']]], + ['mi_5fstl_5fallocator_149',['mi_stl_allocator',['../group__cpp.html#structmi__stl__allocator',1,'']]], + ['mi_5fstrdup_150',['mi_strdup',['../group__malloc.html#gac7cffe13f1f458ed16789488bf92b9b2',1,'mimalloc-doc.h']]], + ['mi_5fstrndup_151',['mi_strndup',['../group__malloc.html#gaaabf971c2571891433477e2d21a35266',1,'mimalloc-doc.h']]], + ['mi_5fthread_5fdone_152',['mi_thread_done',['../group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf',1,'mimalloc-doc.h']]], + ['mi_5fthread_5finit_153',['mi_thread_init',['../group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17',1,'mimalloc-doc.h']]], + ['mi_5fthread_5fstats_5fprint_5fout_154',['mi_thread_stats_print_out',['../group__extended.html#gab1dac8476c46cb9eecab767eb40c1525',1,'mimalloc-doc.h']]], + ['mi_5fusable_5fsize_155',['mi_usable_size',['../group__extended.html#ga089c859d9eddc5f9b4bd946cd53cebee',1,'mimalloc-doc.h']]], + ['mi_5fvalloc_156',['mi_valloc',['../group__posix.html#ga73baaf5951f5165ba0763d0c06b6a93b',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_157',['mi_zalloc',['../group__malloc.html#gafdd9d8bb2986e668ba9884f28af38000',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5faligned_158',['mi_zalloc_aligned',['../group__aligned.html#ga0cadbcf5b89a7b6fb171bc8df8734819',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5faligned_5fat_159',['mi_zalloc_aligned_at',['../group__aligned.html#ga5f8c2353766db522565e642fafd8a3f8',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5fsmall_160',['mi_zalloc_small',['../group__extended.html#ga220f29f40a44404b0061c15bc1c31152',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5ftp_161',['mi_zalloc_tp',['../group__typed.html#gac77a61bdaf680a803785fe307820b48c',1,'mimalloc-doc.h']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_7.html b/src/dashbls/depends/mimalloc/docs/search/all_7.html new file mode 100644 index 000000000000..8ddbf6c8e51e --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_7.js b/src/dashbls/depends/mimalloc/docs/search/all_7.js new file mode 100644 index 000000000000..8f296aa53e1b --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['overriding_20malloc_162',['Overriding Malloc',['../overrides.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_8.html b/src/dashbls/depends/mimalloc/docs/search/all_8.html new file mode 100644 index 000000000000..83c55ae22293 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_8.js b/src/dashbls/depends/mimalloc/docs/search/all_8.js new file mode 100644 index 000000000000..a9caa77c7bfd --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['performance_163',['Performance',['../bench.html',1,'']]], + ['posix_164',['Posix',['../group__posix.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_9.html b/src/dashbls/depends/mimalloc/docs/search/all_9.html new file mode 100644 index 000000000000..1e263c134c45 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_9.js b/src/dashbls/depends/mimalloc/docs/search/all_9.js new file mode 100644 index 000000000000..f6b4ba352ef6 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['reserved_165',['reserved',['../group__analysis.html#ae848a3e6840414891035423948ca0383',1,'mi_heap_area_t']]], + ['runtime_20options_166',['Runtime Options',['../group__options.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_a.html b/src/dashbls/depends/mimalloc/docs/search/all_a.html new file mode 100644 index 000000000000..3a6cac108c28 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_a.js b/src/dashbls/depends/mimalloc/docs/search/all_a.js new file mode 100644 index 000000000000..699b5456e717 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['typed_20macros_167',['Typed Macros',['../group__typed.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_b.html b/src/dashbls/depends/mimalloc/docs/search/all_b.html new file mode 100644 index 000000000000..130deb4ed9c6 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_b.js b/src/dashbls/depends/mimalloc/docs/search/all_b.js new file mode 100644 index 000000000000..73a2671d9261 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['used_168',['used',['../group__analysis.html#ab820302c5cd0df133eb8e51650a008b4',1,'mi_heap_area_t']]], + ['using_20the_20library_169',['Using the library',['../using.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_c.html b/src/dashbls/depends/mimalloc/docs/search/all_c.html new file mode 100644 index 000000000000..3dd5af06d562 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_c.js b/src/dashbls/depends/mimalloc/docs/search/all_c.js new file mode 100644 index 000000000000..192fb1cb78b0 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zero_20initialized_20re_2dallocation_170',['Zero initialized re-allocation',['../group__zeroinit.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/all_d.html b/src/dashbls/depends/mimalloc/docs/search/all_d.html new file mode 100644 index 000000000000..a2d5bd7ed5e0 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_d.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/all_d.js b/src/dashbls/depends/mimalloc/docs/search/all_d.js new file mode 100644 index 000000000000..2b9b4cea09de --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/all_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zero_20initialized_20re_2dallocation',['Zero initialized re-allocation',['../group__zeroinit.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/classes_0.html b/src/dashbls/depends/mimalloc/docs/search/classes_0.html new file mode 100644 index 000000000000..af8159ee61c2 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/classes_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/classes_0.js b/src/dashbls/depends/mimalloc/docs/search/classes_0.js new file mode 100644 index 000000000000..e3770fb49170 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/classes_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['mi_5fheap_5farea_5ft_171',['mi_heap_area_t',['../group__analysis.html#structmi__heap__area__t',1,'']]], + ['mi_5fstl_5fallocator_172',['mi_stl_allocator',['../group__cpp.html#structmi__stl__allocator',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/close.png b/src/dashbls/depends/mimalloc/docs/search/close.png new file mode 100644 index 0000000000000000000000000000000000000000..9342d3dfeea7b7c4ee610987e717804b5a42ceb9 GIT binary patch literal 273 zcmV+s0q*{ZP)4(RlMby96)VwnbG{ zbe&}^BDn7x>$<{ck4zAK-=nT;=hHG)kmplIF${xqm8db3oX6wT3bvp`TE@m0cg;b) zBuSL}5?N7O(iZLdAlz@)b)Rd~DnSsSX&P5qC`XwuFwcAYLC+d2>+1(8on;wpt8QIC X2MT$R4iQDd00000NkvXXu0mjfia~GN literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/search/enums_0.html b/src/dashbls/depends/mimalloc/docs/search/enums_0.html new file mode 100644 index 000000000000..141fff57be08 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/enums_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/enums_0.js b/src/dashbls/depends/mimalloc/docs/search/enums_0.js new file mode 100644 index 000000000000..6f1f38338b6c --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/enums_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mi_5foption_5ft_296',['mi_option_t',['../group__options.html#gafebf7ed116adb38ae5218bc3ce06884c',1,'mimalloc-doc.h']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/enumvalues_0.html b/src/dashbls/depends/mimalloc/docs/search/enumvalues_0.html new file mode 100644 index 000000000000..0d131d95b8b1 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/enumvalues_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/enumvalues_0.js b/src/dashbls/depends/mimalloc/docs/search/enumvalues_0.js new file mode 100644 index 000000000000..1aca63bbee65 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/enumvalues_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_5fmi_5foption_5flast_297',['_mi_option_last',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca5b4357b74be0d87568036c32eb1a2e4a',1,'mimalloc-doc.h']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/enumvalues_1.html b/src/dashbls/depends/mimalloc/docs/search/enumvalues_1.html new file mode 100644 index 000000000000..cd9187ab3c59 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/enumvalues_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/enumvalues_1.js b/src/dashbls/depends/mimalloc/docs/search/enumvalues_1.js new file mode 100644 index 000000000000..bd525bb854f3 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/enumvalues_1.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['mi_5foption_5feager_5fcommit_298',['mi_option_eager_commit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca1e8de72c93da7ff22d91e1e27b52ac2b',1,'mimalloc-doc.h']]], + ['mi_5foption_5feager_5fcommit_5fdelay_299',['mi_option_eager_commit_delay',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca17a190c25be381142d87e0468c4c068c',1,'mimalloc-doc.h']]], + ['mi_5foption_5feager_5fregion_5fcommit_300',['mi_option_eager_region_commit',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca32ce97ece29f69e82579679cf8a307ad',1,'mimalloc-doc.h']]], + ['mi_5foption_5flarge_5fos_5fpages_301',['mi_option_large_os_pages',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4192d491200d0055df0554d4cf65054e',1,'mimalloc-doc.h']]], + ['mi_5foption_5fos_5ftag_302',['mi_option_os_tag',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4b74ae2a69e445de6c2361b73c1d14bf',1,'mimalloc-doc.h']]], + ['mi_5foption_5fpage_5freset_303',['mi_option_page_reset',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cada854dd272c66342f18a93ee254a2968',1,'mimalloc-doc.h']]], + ['mi_5foption_5freserve_5fhuge_5fos_5fpages_304',['mi_option_reserve_huge_os_pages',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caca7ed041be3b0b9d0b82432c7bf41af2',1,'mimalloc-doc.h']]], + ['mi_5foption_5freserve_5fhuge_5fos_5fpages_5fat_305',['mi_option_reserve_huge_os_pages_at',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caa13e7926d4339d2aa6fbf61d4473fd5c',1,'mimalloc-doc.h']]], + ['mi_5foption_5freset_5fdecommits_306',['mi_option_reset_decommits',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cac81ee965b130fa81238913a3c239d536',1,'mimalloc-doc.h']]], + ['mi_5foption_5freset_5fdelay_307',['mi_option_reset_delay',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca154fe170131d5212cff57e22b99523c5',1,'mimalloc-doc.h']]], + ['mi_5foption_5fsegment_5fcache_308',['mi_option_segment_cache',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca2ecbe7ef32f5c84de3739aa4f0b805a1',1,'mimalloc-doc.h']]], + ['mi_5foption_5fsegment_5freset_309',['mi_option_segment_reset',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafb121d30d87591850d5410ccc3a95c6d',1,'mimalloc-doc.h']]], + ['mi_5foption_5fshow_5ferrors_310',['mi_option_show_errors',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cafbf4822e5c00732c5984b32a032837f0',1,'mimalloc-doc.h']]], + ['mi_5foption_5fshow_5fstats_311',['mi_option_show_stats',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0957ef73b2550764b4840edf48422fda',1,'mimalloc-doc.h']]], + ['mi_5foption_5fuse_5fnuma_5fnodes_312',['mi_option_use_numa_nodes',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0ac33a18f6b659fcfaf44efb0bab1b74',1,'mimalloc-doc.h']]], + ['mi_5foption_5fverbose_313',['mi_option_verbose',['../group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca7c8b7bf5281c581bad64f5daa6442777',1,'mimalloc-doc.h']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/functions_0.html b/src/dashbls/depends/mimalloc/docs/search/functions_0.html new file mode 100644 index 000000000000..eb4c5014c401 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/functions_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/functions_0.js b/src/dashbls/depends/mimalloc/docs/search/functions_0.js new file mode 100644 index 000000000000..b44917a5be23 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/functions_0.js @@ -0,0 +1,116 @@ +var searchData= +[ + ['mi_5f_5fposix_5fmemalign_173',['mi__posix_memalign',['../group__posix.html#gad5a69c8fea96aa2b7a7c818c2130090a',1,'mimalloc-doc.h']]], + ['mi_5faligned_5falloc_174',['mi_aligned_alloc',['../group__posix.html#ga1326d2e4388630b5f81ca7206318b8e5',1,'mimalloc-doc.h']]], + ['mi_5fcalloc_175',['mi_calloc',['../group__malloc.html#ga97fedb4f7107c592fd7f0f0a8949a57d',1,'mimalloc-doc.h']]], + ['mi_5fcalloc_5faligned_176',['mi_calloc_aligned',['../group__aligned.html#ga53dddb4724042a90315b94bc268fb4c9',1,'mimalloc-doc.h']]], + ['mi_5fcalloc_5faligned_5fat_177',['mi_calloc_aligned_at',['../group__aligned.html#ga08647c4593f3b2eef24a919a73eba3a3',1,'mimalloc-doc.h']]], + ['mi_5fcfree_178',['mi_cfree',['../group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7',1,'mimalloc-doc.h']]], + ['mi_5fcheck_5fowned_179',['mi_check_owned',['../group__analysis.html#ga628c237489c2679af84a4d0d143b3dd5',1,'mimalloc-doc.h']]], + ['mi_5fcollect_180',['mi_collect',['../group__extended.html#ga421430e2226d7d468529cec457396756',1,'mimalloc-doc.h']]], + ['mi_5fexpand_181',['mi_expand',['../group__malloc.html#gaaee66a1d483c3e28f585525fb96707e4',1,'mimalloc-doc.h']]], + ['mi_5ffree_182',['mi_free',['../group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95',1,'mimalloc-doc.h']]], + ['mi_5ffree_5faligned_183',['mi_free_aligned',['../group__posix.html#ga0d28d5cf61e6bfbb18c63092939fe5c9',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsize_184',['mi_free_size',['../group__posix.html#gae01389eedab8d67341ff52e2aad80ebb',1,'mimalloc-doc.h']]], + ['mi_5ffree_5fsize_5faligned_185',['mi_free_size_aligned',['../group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc',1,'mimalloc-doc.h']]], + ['mi_5fgood_5fsize_186',['mi_good_size',['../group__extended.html#gac057927cd06c854b45fe7847e921bd47',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_187',['mi_heap_calloc',['../group__heap.html#gaa6702b3c48e9e53e50e81b36f5011d55',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_5faligned_188',['mi_heap_calloc_aligned',['../group__heap.html#ga4af03a6e2b93fae77424d93f889705c3',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcalloc_5faligned_5fat_189',['mi_heap_calloc_aligned_at',['../group__heap.html#ga08ca6419a5c057a4d965868998eef487',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcheck_5fowned_190',['mi_heap_check_owned',['../group__analysis.html#ga0d67c1789faaa15ff366c024fcaf6377',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcollect_191',['mi_heap_collect',['../group__heap.html#ga7922f7495cde30b1984d0e6072419298',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fcontains_5fblock_192',['mi_heap_contains_block',['../group__analysis.html#gaa862aa8ed8d57d84cae41fc1022d71af',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fdelete_193',['mi_heap_delete',['../group__heap.html#ga2ab1af8d438819b55319c7ef51d1e409',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fdestroy_194',['mi_heap_destroy',['../group__heap.html#ga9f9c0844edb9717f4feacd79116b8e0d',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fget_5fbacking_195',['mi_heap_get_backing',['../group__heap.html#ga5d03fbe062ffcf38f0f417fd968357fc',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fget_5fdefault_196',['mi_heap_get_default',['../group__heap.html#ga8db4cbb87314a989a9a187464d6b5e05',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_197',['mi_heap_malloc',['../group__heap.html#ga9cbed01e42c0647907295de92c3fa296',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5faligned_198',['mi_heap_malloc_aligned',['../group__heap.html#gab5b87e1805306f70df38789fcfcf6653',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5faligned_5fat_199',['mi_heap_malloc_aligned_at',['../group__heap.html#ga23acd7680fb0976dde3783254c6c874b',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmalloc_5fsmall_200',['mi_heap_malloc_small',['../group__heap.html#gaa1a1c7a1f4da6826b5a25b70ef878368',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fmallocn_201',['mi_heap_mallocn',['../group__heap.html#ga851da6c43fe0b71c1376cee8aef90db0',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fnew_202',['mi_heap_new',['../group__heap.html#ga766f672ba56f2fbfeb9d9dbb0b7f6b11',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_203',['mi_heap_realloc',['../group__heap.html#gaaef3395f66be48f37bdc8322509c5d81',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_5faligned_204',['mi_heap_realloc_aligned',['../group__heap.html#gafc603b696bd14cae6da28658f950d98c',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealloc_5faligned_5fat_205',['mi_heap_realloc_aligned_at',['../group__heap.html#gaf96c788a1bf553fe2d371de9365e047c',1,'mimalloc-doc.h']]], + ['mi_5fheap_5freallocf_206',['mi_heap_reallocf',['../group__heap.html#ga4a21070eb4e7cce018133c8d5f4b0527',1,'mimalloc-doc.h']]], + ['mi_5fheap_5freallocn_207',['mi_heap_reallocn',['../group__heap.html#gac74e94ad9b0c9b57c1c4d88b8825b7a8',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frealpath_208',['mi_heap_realpath',['../group__heap.html#ga00e95ba1e01acac3cfd95bb7a357a6f0',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_209',['mi_heap_recalloc',['../group__zeroinit.html#ga8648c5fbb22a80f0262859099f06dfbd',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_5faligned_210',['mi_heap_recalloc_aligned',['../group__zeroinit.html#ga9f3f999396c8f77ca5e80e7b40ac29e3',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frecalloc_5faligned_5fat_211',['mi_heap_recalloc_aligned_at',['../group__zeroinit.html#ga496452c96f1de8c500be9fddf52edaf7',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_212',['mi_heap_rezalloc',['../group__zeroinit.html#gacfad83f14eb5d6a42a497a898e19fc76',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_5faligned_213',['mi_heap_rezalloc_aligned',['../group__zeroinit.html#ga375fa8a611c51905e592d5d467c49664',1,'mimalloc-doc.h']]], + ['mi_5fheap_5frezalloc_5faligned_5fat_214',['mi_heap_rezalloc_aligned_at',['../group__zeroinit.html#gac90da54fa7e5d10bdc97ce0b51dce2eb',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fset_5fdefault_215',['mi_heap_set_default',['../group__heap.html#gab8631ec88c8d26641b68b5d25dcd4422',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstrdup_216',['mi_heap_strdup',['../group__heap.html#ga139d6b09dbf50c3c2523d0f4d1cfdeb5',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fstrndup_217',['mi_heap_strndup',['../group__heap.html#ga8e3dbd46650dd26573cf307a2c8f1f5a',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fvisit_5fblocks_218',['mi_heap_visit_blocks',['../group__analysis.html#ga70c46687dc6e9dc98b232b02646f8bed',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_219',['mi_heap_zalloc',['../group__heap.html#ga903104592c8ed53417a3762da6241133',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5faligned_220',['mi_heap_zalloc_aligned',['../group__heap.html#gaa450a59c6c7ae5fdbd1c2b80a8329ef0',1,'mimalloc-doc.h']]], + ['mi_5fheap_5fzalloc_5faligned_5fat_221',['mi_heap_zalloc_aligned_at',['../group__heap.html#ga45fb43a62776fbebbdf1edd99b527954',1,'mimalloc-doc.h']]], + ['mi_5fis_5fin_5fheap_5fregion_222',['mi_is_in_heap_region',['../group__extended.html#ga5f071b10d4df1c3658e04e7fd67a94e6',1,'mimalloc-doc.h']]], + ['mi_5fis_5fredirected_223',['mi_is_redirected',['../group__extended.html#gaad25050b19f30cd79397b227e0157a3f',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_224',['mi_malloc',['../group__malloc.html#ga3406e8b168bc74c8637b11571a6da83a',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5faligned_225',['mi_malloc_aligned',['../group__aligned.html#ga68930196751fa2cca9e1fd0d71bade56',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5faligned_5fat_226',['mi_malloc_aligned_at',['../group__aligned.html#ga5850da130c936bd77db039dcfbc8295d',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fsize_227',['mi_malloc_size',['../group__posix.html#ga4531c9e775bb3ae12db57c1ba8a5d7de',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fsmall_228',['mi_malloc_small',['../group__extended.html#ga7136c2e55cb22c98ecf95d08d6debb99',1,'mimalloc-doc.h']]], + ['mi_5fmalloc_5fusable_5fsize_229',['mi_malloc_usable_size',['../group__posix.html#ga06d07cf357bbac5c73ba5d0c0c421e17',1,'mimalloc-doc.h']]], + ['mi_5fmallocn_230',['mi_mallocn',['../group__malloc.html#ga0b05e2bf0f73e7401ae08597ff782ac6',1,'mimalloc-doc.h']]], + ['mi_5fmanage_5fos_5fmemory_231',['mi_manage_os_memory',['../group__extended.html#ga4c6486a1fdcd7a423b5f25fe4be8e0cf',1,'mimalloc-doc.h']]], + ['mi_5fmemalign_232',['mi_memalign',['../group__posix.html#gaab7fa71ea93b96873f5d9883db57d40e',1,'mimalloc-doc.h']]], + ['mi_5fnew_233',['mi_new',['../group__cpp.html#gaad048a9fce3d02c5909cd05c6ec24545',1,'mimalloc-doc.h']]], + ['mi_5fnew_5faligned_234',['mi_new_aligned',['../group__cpp.html#gaef2c2bdb4f70857902d3c8903ac095f3',1,'mimalloc-doc.h']]], + ['mi_5fnew_5faligned_5fnothrow_235',['mi_new_aligned_nothrow',['../group__cpp.html#gab5e29558926d934c3f1cae8c815f942c',1,'mimalloc-doc.h']]], + ['mi_5fnew_5fn_236',['mi_new_n',['../group__cpp.html#gae7bc4f56cd57ed3359060ff4f38bda81',1,'mimalloc-doc.h']]], + ['mi_5fnew_5fnothrow_237',['mi_new_nothrow',['../group__cpp.html#gaeaded64eda71ed6b1d569d3e723abc4a',1,'mimalloc-doc.h']]], + ['mi_5fnew_5frealloc_238',['mi_new_realloc',['../group__cpp.html#gaab78a32f55149e9fbf432d5288e38e1e',1,'mimalloc-doc.h']]], + ['mi_5fnew_5freallocn_239',['mi_new_reallocn',['../group__cpp.html#ga756f4b2bc6a7ecd0a90baea8e90c7907',1,'mimalloc-doc.h']]], + ['mi_5foption_5fdisable_240',['mi_option_disable',['../group__options.html#gaebf6ff707a2e688ebb1a2296ca564054',1,'mimalloc-doc.h']]], + ['mi_5foption_5fenable_241',['mi_option_enable',['../group__options.html#ga04180ae41b0d601421dd62ced40ca050',1,'mimalloc-doc.h']]], + ['mi_5foption_5fget_242',['mi_option_get',['../group__options.html#ga7e8af195cc81d3fa64ccf2662caa565a',1,'mimalloc-doc.h']]], + ['mi_5foption_5fis_5fenabled_243',['mi_option_is_enabled',['../group__options.html#ga459ad98f18b3fc9275474807fe0ca188',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_244',['mi_option_set',['../group__options.html#gaf84921c32375e25754dc2ee6a911fa60',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fdefault_245',['mi_option_set_default',['../group__options.html#ga7ef623e440e6e5545cb08c94e71e4b90',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fenabled_246',['mi_option_set_enabled',['../group__options.html#ga9a13d05fcb77489cb06d4d017ebd8bed',1,'mimalloc-doc.h']]], + ['mi_5foption_5fset_5fenabled_5fdefault_247',['mi_option_set_enabled_default',['../group__options.html#ga65518b69ec5d32336b50e07f74b3f629',1,'mimalloc-doc.h']]], + ['mi_5fposix_5fmemalign_248',['mi_posix_memalign',['../group__posix.html#gacff84f226ba9feb2031b8992e5579447',1,'mimalloc-doc.h']]], + ['mi_5fprocess_5finfo_249',['mi_process_info',['../group__extended.html#ga7d862c2affd5790381da14eb102a364d',1,'mimalloc-doc.h']]], + ['mi_5fpvalloc_250',['mi_pvalloc',['../group__posix.html#gaeb325c39b887d3b90d85d1eb1712fb1e',1,'mimalloc-doc.h']]], + ['mi_5frealloc_251',['mi_realloc',['../group__malloc.html#gaf11eb497da57bdfb2de65eb191c69db6',1,'mimalloc-doc.h']]], + ['mi_5frealloc_5faligned_252',['mi_realloc_aligned',['../group__aligned.html#ga4028d1cf4aa4c87c880747044a8322ae',1,'mimalloc-doc.h']]], + ['mi_5frealloc_5faligned_5fat_253',['mi_realloc_aligned_at',['../group__aligned.html#gaf66a9ae6c6f08bd6be6fb6ea771faffb',1,'mimalloc-doc.h']]], + ['mi_5freallocarr_254',['mi_reallocarr',['../group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5',1,'mimalloc-doc.h']]], + ['mi_5freallocarray_255',['mi_reallocarray',['../group__posix.html#ga48fad8648a2f1dab9c87ea9448a52088',1,'mimalloc-doc.h']]], + ['mi_5freallocf_256',['mi_reallocf',['../group__malloc.html#gafe68ac7c5e24a65cd55c9d6b152211a0',1,'mimalloc-doc.h']]], + ['mi_5freallocn_257',['mi_reallocn',['../group__malloc.html#ga61d57b4144ba24fba5c1e9b956d13853',1,'mimalloc-doc.h']]], + ['mi_5frealpath_258',['mi_realpath',['../group__malloc.html#ga08cec32dd5bbe7da91c78d19f1b5bebe',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_259',['mi_recalloc',['../group__malloc.html#ga23a0fbb452b5dce8e31fab1a1958cacc',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_5faligned_260',['mi_recalloc_aligned',['../group__zeroinit.html#ga3e7e5c291acf1c7fd7ffd9914a9f945f',1,'mimalloc-doc.h']]], + ['mi_5frecalloc_5faligned_5fat_261',['mi_recalloc_aligned_at',['../group__zeroinit.html#ga4ff5e92ad73585418a072c9d059e5cf9',1,'mimalloc-doc.h']]], + ['mi_5fregister_5fdeferred_5ffree_262',['mi_register_deferred_free',['../group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece',1,'mimalloc-doc.h']]], + ['mi_5fregister_5ferror_263',['mi_register_error',['../group__extended.html#gaa1d55e0e894be240827e5d87ec3a1f45',1,'mimalloc-doc.h']]], + ['mi_5fregister_5foutput_264',['mi_register_output',['../group__extended.html#gae5b17ff027cd2150b43a33040250cf3f',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fhuge_5fos_5fpages_5fat_265',['mi_reserve_huge_os_pages_at',['../group__extended.html#ga7795a13d20087447281858d2c771cca1',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fhuge_5fos_5fpages_5finterleave_266',['mi_reserve_huge_os_pages_interleave',['../group__extended.html#ga3132f521fb756fc0e8ec0b74fb58df50',1,'mimalloc-doc.h']]], + ['mi_5freserve_5fos_5fmemory_267',['mi_reserve_os_memory',['../group__extended.html#ga00ec3324b6b2591c7fe3677baa30a767',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_268',['mi_rezalloc',['../group__zeroinit.html#ga8c292e142110229a2980b37ab036dbc6',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_5faligned_269',['mi_rezalloc_aligned',['../group__zeroinit.html#gacd71a7bce96aab38ae6de17af2eb2cf0',1,'mimalloc-doc.h']]], + ['mi_5frezalloc_5faligned_5fat_270',['mi_rezalloc_aligned_at',['../group__zeroinit.html#gae8b358c417e61d5307da002702b0a8e1',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fmerge_271',['mi_stats_merge',['../group__extended.html#ga854b1de8cb067c7316286c28b2fcd3d1',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fprint_272',['mi_stats_print',['../group__extended.html#ga2d126e5c62d3badc35445e5d84166df2',1,'mimalloc-doc.h']]], + ['mi_5fstats_5fprint_5fout_273',['mi_stats_print_out',['../group__extended.html#ga537f13b299ddf801e49a5a94fde02c79',1,'mimalloc-doc.h']]], + ['mi_5fstats_5freset_274',['mi_stats_reset',['../group__extended.html#ga3bb8468b8cfcc6e2a61d98aee85c5f99',1,'mimalloc-doc.h']]], + ['mi_5fstrdup_275',['mi_strdup',['../group__malloc.html#gac7cffe13f1f458ed16789488bf92b9b2',1,'mimalloc-doc.h']]], + ['mi_5fstrndup_276',['mi_strndup',['../group__malloc.html#gaaabf971c2571891433477e2d21a35266',1,'mimalloc-doc.h']]], + ['mi_5fthread_5fdone_277',['mi_thread_done',['../group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf',1,'mimalloc-doc.h']]], + ['mi_5fthread_5finit_278',['mi_thread_init',['../group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17',1,'mimalloc-doc.h']]], + ['mi_5fthread_5fstats_5fprint_5fout_279',['mi_thread_stats_print_out',['../group__extended.html#gab1dac8476c46cb9eecab767eb40c1525',1,'mimalloc-doc.h']]], + ['mi_5fusable_5fsize_280',['mi_usable_size',['../group__extended.html#ga089c859d9eddc5f9b4bd946cd53cebee',1,'mimalloc-doc.h']]], + ['mi_5fvalloc_281',['mi_valloc',['../group__posix.html#ga73baaf5951f5165ba0763d0c06b6a93b',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_282',['mi_zalloc',['../group__malloc.html#gafdd9d8bb2986e668ba9884f28af38000',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5faligned_283',['mi_zalloc_aligned',['../group__aligned.html#ga0cadbcf5b89a7b6fb171bc8df8734819',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5faligned_5fat_284',['mi_zalloc_aligned_at',['../group__aligned.html#ga5f8c2353766db522565e642fafd8a3f8',1,'mimalloc-doc.h']]], + ['mi_5fzalloc_5fsmall_285',['mi_zalloc_small',['../group__extended.html#ga220f29f40a44404b0061c15bc1c31152',1,'mimalloc-doc.h']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/functions_1.html b/src/dashbls/depends/mimalloc/docs/search/functions_1.html new file mode 100644 index 000000000000..bfcf880be9e6 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/functions_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/functions_1.js b/src/dashbls/depends/mimalloc/docs/search/functions_1.js new file mode 100644 index 000000000000..06dbb19b7632 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/functions_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['void',['void',['../group__extended.html#gadc49452cc1634aa03ac83ffe9b97a19c',1,'mimalloc-doc.h']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_0.html b/src/dashbls/depends/mimalloc/docs/search/groups_0.html new file mode 100644 index 000000000000..c600b4970a83 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_0.js b/src/dashbls/depends/mimalloc/docs/search/groups_0.js new file mode 100644 index 000000000000..0ed99b804cea --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['aligned_20allocation_314',['Aligned Allocation',['../group__aligned.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_1.html b/src/dashbls/depends/mimalloc/docs/search/groups_1.html new file mode 100644 index 000000000000..2eb3550dc8ec --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_1.js b/src/dashbls/depends/mimalloc/docs/search/groups_1.js new file mode 100644 index 000000000000..f27c5847a097 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['basic_20allocation_315',['Basic Allocation',['../group__malloc.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_2.html b/src/dashbls/depends/mimalloc/docs/search/groups_2.html new file mode 100644 index 000000000000..12f4af7a0bac --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_2.js b/src/dashbls/depends/mimalloc/docs/search/groups_2.js new file mode 100644 index 000000000000..6da64b68be2a --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['c_2b_2b_20wrappers_316',['C++ wrappers',['../group__cpp.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_3.html b/src/dashbls/depends/mimalloc/docs/search/groups_3.html new file mode 100644 index 000000000000..5e235b53ca4c --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_3.js b/src/dashbls/depends/mimalloc/docs/search/groups_3.js new file mode 100644 index 000000000000..cdfbe640a16a --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['extended_20functions_317',['Extended Functions',['../group__extended.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_4.html b/src/dashbls/depends/mimalloc/docs/search/groups_4.html new file mode 100644 index 000000000000..99405e159cc7 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_4.js b/src/dashbls/depends/mimalloc/docs/search/groups_4.js new file mode 100644 index 000000000000..687f1ea72825 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['heap_20allocation_318',['Heap Allocation',['../group__heap.html',1,'']]], + ['heap_20introspection_319',['Heap Introspection',['../group__analysis.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_5.html b/src/dashbls/depends/mimalloc/docs/search/groups_5.html new file mode 100644 index 000000000000..583f5f58a4c2 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_5.js b/src/dashbls/depends/mimalloc/docs/search/groups_5.js new file mode 100644 index 000000000000..43c8b1fc4743 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['posix_320',['Posix',['../group__posix.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_6.html b/src/dashbls/depends/mimalloc/docs/search/groups_6.html new file mode 100644 index 000000000000..df6a310f899b --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_6.js b/src/dashbls/depends/mimalloc/docs/search/groups_6.js new file mode 100644 index 000000000000..346318794bc3 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['runtime_20options_321',['Runtime Options',['../group__options.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_7.html b/src/dashbls/depends/mimalloc/docs/search/groups_7.html new file mode 100644 index 000000000000..8964e0508e2a --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_7.js b/src/dashbls/depends/mimalloc/docs/search/groups_7.js new file mode 100644 index 000000000000..aa150e973f4b --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['typed_20macros_322',['Typed Macros',['../group__typed.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_8.html b/src/dashbls/depends/mimalloc/docs/search/groups_8.html new file mode 100644 index 000000000000..7987ca395b7c --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/groups_8.js b/src/dashbls/depends/mimalloc/docs/search/groups_8.js new file mode 100644 index 000000000000..f9c29fe3bc1d --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/groups_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zero_20initialized_20re_2dallocation_323',['Zero initialized re-allocation',['../group__zeroinit.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/mag_sel.png b/src/dashbls/depends/mimalloc/docs/search/mag_sel.png new file mode 100644 index 0000000000000000000000000000000000000000..39c0ed52a25dd9d080ee0d42ae6c6042bdfa04d7 GIT binary patch literal 465 zcmeAS@N?(olHy`uVBq!ia0vp^B0wz6!2%?$TA$hhDVB6cUq=Rpjs4tz5?O(Kg=CK) zUj~NU84L`?eGCi_EEpJ?t}-xGu`@87+QPtK?83kxQ`TapwHK(CDaqU2h2ejD|C#+j z9%q3^WHAE+w=f7ZGR&GI0Tg5}@$_|Nf5gMiEhFgvHvB$N=!mC_V~EE2vzPXI9ZnEo zd+1zHor@dYLod2Y{ z@R$7$Z!PXTbY$|@#T!bMzm?`b<(R`cbw(gxJHzu zB$lLFB^RXvDF!10LknF)BV7aY5JN*NBMU1-b8Q0yD+2>vd*|CI8glbfGSez?Ylunu RoetE%;OXk;vd$@?2>>CYplSdB literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/search/nomatches.html b/src/dashbls/depends/mimalloc/docs/search/nomatches.html new file mode 100644 index 000000000000..2b9360b6bd70 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/nomatches.html @@ -0,0 +1,13 @@ + + + + + + + + +
+
No Matches
+
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/pages_0.html b/src/dashbls/depends/mimalloc/docs/search/pages_0.html new file mode 100644 index 000000000000..8517b48f05dc --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/pages_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/pages_0.js b/src/dashbls/depends/mimalloc/docs/search/pages_0.js new file mode 100644 index 000000000000..07922dae7add --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['building_324',['Building',['../build.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/pages_1.html b/src/dashbls/depends/mimalloc/docs/search/pages_1.html new file mode 100644 index 000000000000..a0fb679631b1 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/pages_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/pages_1.js b/src/dashbls/depends/mimalloc/docs/search/pages_1.js new file mode 100644 index 000000000000..6433daeccef5 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['environment_20options_325',['Environment Options',['../environment.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/pages_2.html b/src/dashbls/depends/mimalloc/docs/search/pages_2.html new file mode 100644 index 000000000000..084edfd03f7f --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/pages_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/pages_2.js b/src/dashbls/depends/mimalloc/docs/search/pages_2.js new file mode 100644 index 000000000000..7577377b9719 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/pages_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['overriding_20malloc_326',['Overriding Malloc',['../overrides.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/pages_3.html b/src/dashbls/depends/mimalloc/docs/search/pages_3.html new file mode 100644 index 000000000000..c0b45b0fc932 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/pages_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/pages_3.js b/src/dashbls/depends/mimalloc/docs/search/pages_3.js new file mode 100644 index 000000000000..d62a3cfd1322 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/pages_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['performance_327',['Performance',['../bench.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/pages_4.html b/src/dashbls/depends/mimalloc/docs/search/pages_4.html new file mode 100644 index 000000000000..0f05c2e73c0f --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/pages_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/pages_4.js b/src/dashbls/depends/mimalloc/docs/search/pages_4.js new file mode 100644 index 000000000000..4e4e64dc489e --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/pages_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['using_20the_20library_328',['Using the library',['../using.html',1,'']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/search.css b/src/dashbls/depends/mimalloc/docs/search/search.css new file mode 100644 index 000000000000..10bd4b55d93a --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/search.css @@ -0,0 +1,273 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + float: none; + margin-top: 0px; + right: 0px; + width: 170px; + height: 24px; + z-index: 102; + display: inline; + position: absolute; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:111px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:0px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #4F5657; + background-color: #F2F3F3; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #0F1010; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #DADDDE; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #121414; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #121414; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #DFE1E2; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/src/dashbls/depends/mimalloc/docs/search/search.js b/src/dashbls/depends/mimalloc/docs/search/search.js new file mode 100644 index 000000000000..fb226f734e6d --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/search.js @@ -0,0 +1,816 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches' + this.extension; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline-block'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e(R!W8j_r#qQ#gnr4kAxdU#F0+OBry$Z+ z_0PMi;P|#{d%mw(dnw=jM%@$onTJa%@6Nm3`;2S#nwtVFJI#`U@2Q@@JCCctagvF- z8H=anvo~dTmJ2YA%wA6IHRv%{vxvUm|R)kgZeo zmX%Zb;mpflGZdXCTAgit`||AFzkI#z&(3d4(htA?U2FOL4WF6wY&TB#n3n*I4+hl| z*NBpo#FA92vEu822WQ%mvv4FO#qs` BFGc_W literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/search/search_r.png b/src/dashbls/depends/mimalloc/docs/search/search_r.png new file mode 100644 index 0000000000000000000000000000000000000000..1af5d21ee13e070d7600f1c4657fde843b953a69 GIT binary patch literal 553 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9c!2%@BXHTsJQY`6?zK#qG8~eHcB(ehe3dtTp zz6=bxGZ+|(`xqD=STHa&U1eaXVrO7DwS|Gf*oA>XrmV$GYcEhOQT(QLuS{~ooZ2P@v=Xc@RKW@Irliv8_;wroU0*)0O?temdsA~70jrdux+`@W7 z-N(<(C)L?hOO?KV{>8(jC{hpKsws)#Fh zvsO>IB+gb@b+rGWaO&!a9Z{!U+fV*s7TS>fdt&j$L%^U@Epd$~Nl7e8wMs5Z1yT$~ z28I^8hDN#u<{^fLRz?<9hUVG^237_Jy7tbuQ8eV{r(~v8;?@w8^gA7>fx*+&&t;uc GLK6VEQpiUD literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/search/searchdata.js b/src/dashbls/depends/mimalloc/docs/search/searchdata.js new file mode 100644 index 000000000000..dd31068e46aa --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/searchdata.js @@ -0,0 +1,39 @@ +var indexSectionsWithContent = +{ + 0: "_abcehmoprtuz", + 1: "m", + 2: "m", + 3: "bcru", + 4: "m", + 5: "m", + 6: "_m", + 7: "abcehprtz", + 8: "beopu" +}; + +var indexSectionNames = +{ + 0: "all", + 1: "classes", + 2: "functions", + 3: "variables", + 4: "typedefs", + 5: "enums", + 6: "enumvalues", + 7: "groups", + 8: "pages" +}; + +var indexSectionLabels = +{ + 0: "All", + 1: "Data Structures", + 2: "Functions", + 3: "Variables", + 4: "Typedefs", + 5: "Enumerations", + 6: "Enumerator", + 7: "Modules", + 8: "Pages" +}; + diff --git a/src/dashbls/depends/mimalloc/docs/search/typedefs_0.html b/src/dashbls/depends/mimalloc/docs/search/typedefs_0.html new file mode 100644 index 000000000000..a4684c4ad28b --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/typedefs_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/typedefs_0.js b/src/dashbls/depends/mimalloc/docs/search/typedefs_0.js new file mode 100644 index 000000000000..ac67dcd0bc66 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/typedefs_0.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['mi_5fblock_5fvisit_5ffun_291',['mi_block_visit_fun',['../group__analysis.html#gadfa01e2900f0e5d515ad5506b26f6d65',1,'mimalloc-doc.h']]], + ['mi_5fdeferred_5ffree_5ffun_292',['mi_deferred_free_fun',['../group__extended.html#ga299dae78d25ce112e384a98b7309c5be',1,'mimalloc-doc.h']]], + ['mi_5ferror_5ffun_293',['mi_error_fun',['../group__extended.html#ga251d369cda3f1c2a955c555486ed90e5',1,'mimalloc-doc.h']]], + ['mi_5fheap_5ft_294',['mi_heap_t',['../group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2',1,'mimalloc-doc.h']]], + ['mi_5foutput_5ffun_295',['mi_output_fun',['../group__extended.html#gad823d23444a4b77a40f66bf075a98a0c',1,'mimalloc-doc.h']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/typedefs_1.html b/src/dashbls/depends/mimalloc/docs/search/typedefs_1.html new file mode 100644 index 000000000000..c8a026857ad8 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/typedefs_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/typedefs_1.js b/src/dashbls/depends/mimalloc/docs/search/typedefs_1.js new file mode 100644 index 000000000000..ecccb16a62d7 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/typedefs_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['heartbeat',['heartbeat',['../group__extended.html#ga411f6e94394a2400aa460c796beff8d8',1,'mimalloc-doc.h']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/typedefs_2.html b/src/dashbls/depends/mimalloc/docs/search/typedefs_2.html new file mode 100644 index 000000000000..86a91955e05a --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/typedefs_2.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/typedefs_2.js b/src/dashbls/depends/mimalloc/docs/search/typedefs_2.js new file mode 100644 index 000000000000..2af060791fe8 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/typedefs_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['mi_5fblock_5fvisit_5ffun',['mi_block_visit_fun',['../group__analysis.html#gadfa01e2900f0e5d515ad5506b26f6d65',1,'mimalloc-doc.h']]], + ['mi_5fheap_5ft',['mi_heap_t',['../group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2',1,'mimalloc-doc.h']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/variables_0.html b/src/dashbls/depends/mimalloc/docs/search/variables_0.html new file mode 100644 index 000000000000..1e477c08c4e2 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/variables_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/variables_0.js b/src/dashbls/depends/mimalloc/docs/search/variables_0.js new file mode 100644 index 000000000000..4c0d7728f8eb --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/variables_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['block_5fsize_286',['block_size',['../group__analysis.html#a332a6c14d736a99699d5453a1cb04b41',1,'mi_heap_area_t']]], + ['blocks_287',['blocks',['../group__analysis.html#ae0085e6e1cf059a4eb7767e30e9991b8',1,'mi_heap_area_t']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/variables_1.html b/src/dashbls/depends/mimalloc/docs/search/variables_1.html new file mode 100644 index 000000000000..ea73d9a494f4 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/variables_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/variables_1.js b/src/dashbls/depends/mimalloc/docs/search/variables_1.js new file mode 100644 index 000000000000..449fd615d50a --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/variables_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['committed_288',['committed',['../group__analysis.html#ab47526df656d8837ec3e97f11b83f835',1,'mi_heap_area_t']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/variables_2.html b/src/dashbls/depends/mimalloc/docs/search/variables_2.html new file mode 100644 index 000000000000..0580462e9c83 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/variables_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/variables_2.js b/src/dashbls/depends/mimalloc/docs/search/variables_2.js new file mode 100644 index 000000000000..713c68e01480 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/variables_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['reserved_289',['reserved',['../group__analysis.html#ae848a3e6840414891035423948ca0383',1,'mi_heap_area_t']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/search/variables_3.html b/src/dashbls/depends/mimalloc/docs/search/variables_3.html new file mode 100644 index 000000000000..0d69e7619353 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/variables_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/dashbls/depends/mimalloc/docs/search/variables_3.js b/src/dashbls/depends/mimalloc/docs/search/variables_3.js new file mode 100644 index 000000000000..08ec3baed091 --- /dev/null +++ b/src/dashbls/depends/mimalloc/docs/search/variables_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['used_290',['used',['../group__analysis.html#ab820302c5cd0df133eb8e51650a008b4',1,'mi_heap_area_t']]] +]; diff --git a/src/dashbls/depends/mimalloc/docs/splitbar.png b/src/dashbls/depends/mimalloc/docs/splitbar.png new file mode 100644 index 0000000000000000000000000000000000000000..cce10a788e2037b1e411816b4088ae5b59aedc58 GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^Yzz!63>-{AmhX=Jf@Vhihj(260Q#q zm#`lY<52E;G2^C_ula>*XBAc)oz%rC#?6!xe0RfyL}gv;1&Ol~)*ZY$_sJgZeKz0o z6SidBI)69MYPRpIUu8Ar!P8hB>^zy2NJTGuw%p8X|7-W={|X7w(?9(%ei|E(^5d~WgP^y}LjPJg?%*waCU4D{D|{|*=Xqz8YtwgH2H N!PC{xWt~$(69AdfaG3xA literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/sync_off.png b/src/dashbls/depends/mimalloc/docs/sync_off.png new file mode 100644 index 0000000000000000000000000000000000000000..f3be5edaf093ee6824216091197355f41726802a GIT binary patch literal 851 zcmV-Z1FZasP)26&VNSQlUevHt?R%pq#W(sRc5-8Me z)!`L4xp#?V?d!w0`LXthGw~I*-n+C0Se$hoc49B>JPw3Sh2IifXg5C^aqJ zjIJYJ2Cx8hu!G{IIfJ7j3&3tkd^|uzi(OGC`+;cJO{4)b#aK@3!6zSwK5uDkpw=@JK#R-eqWk!FG#xqexA|vl0Eh91r5oE7AgZQA@6M2QCIEKJ zQa(#iUi|SVPNy-BcS|WVxqjy^%Mug$Y@ObLmQ(iq z8Gh{VOA9t9^s>9GgEC*p&C8>w>jY`3sYd(2H{Wva_AP)}GTd&i4PG&x{o~^_9cyD` z=$`czpDxjG*odD#Wlv2lBM%=L?bx_DfQZcRbe5j#8hhtjhIIz3<>9ezfBTOcWz9!@ zK5qVU6=0T?IXTpOy>xbT;D7xZ!0uBsALu0)x}ZWgq0^~{E->!*N4yhaVq=+p8z2yP z3t)Fwla(1DTl_9Q1XuuXf(Q74dD*=XUjrvuSDUqSYr?UX--5{}NsmQ@vB+bVB#|X8ofmTFqCG3{0EGYdU zcOO=(-OYX5pjy~kHp&H|zdQI~_!3e*1j{}+liH%Q{mx~sbMG`GD!yKRAH4UBoZmU; z-gADhmcpW9fM}fJQ?X4HiS@!JUJI}IOZ+J&0V1(PNsuZ|2zT%vAeuK~MD&X1fGJ`C z!c>SskqfX4iNYglMYs6T_@fmtMw7U;g3gVXLtGU{q9xcVhNH|1V7a~(t@?v4Ej>fe zu11~=um;p%uZw^58GI?S0V4SzApyW7#=hi4KNMf9k4PoR5-kAXEEY?^bKn45x9=>T7ENmQ=Q-lq*9&u+ilL2v?~Rlo(q|O1E(B$}olb`HOA4sw$~# z+($#xe$5`Yn})rOi@#@QW^!$Ki1N>>0aG~Cn_8#8w0+Gj9RB;&aAs(qEWoO*OLbtg+1?t@qG$4VlipCZyN14= zQ$Q#tCMTJC`AP<%jfFtqf0C1u_@r2!e})})@e(6fFSD=^(3@VU1i#2lgYh3-1qBTB zeM5R$n)ZC?*m3UtaR&%Rrqju9*MHUSeSSYjPxUZ%{~llpuUeu}z!VeX<21LmGxqS2 z_8b=<4`8CVsoA+(+ah(Yu2D4uwLDMMrw^Dyb<%zK2#>v9Zr{8Cgd#UDj}DKA-m_=% zO-}X2JJpiHNs)jBVmF2?Wk0ilSEizBcw&;0xXKqPlnvC?(S8=`!Sftowa$yarD}4!=od)gT+T} zb#;P;msNmpzXu1V_7o6`NHZ{A1)^S5h}2*qQ3?I3T8aC?PPO$02=@-;ZLA3F(IQ0v O00007zQd7m VI^To$RzRZ|JYD@<);T3K0RR|MDqH{n literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/tab_b.png b/src/dashbls/depends/mimalloc/docs/tab_b.png new file mode 100644 index 0000000000000000000000000000000000000000..6b37547b358f4f2faeafa2549fa3aa5b618a1b71 GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!Qq`U=jv*C{Z|B-`9Wsz{n|z=9 z%1OSX!8nx73d5GPgg&ebxsLQ06~vR2LJ#7 literal 0 HcmV?d00001 diff --git a/src/dashbls/depends/mimalloc/docs/tab_h.png b/src/dashbls/depends/mimalloc/docs/tab_h.png new file mode 100644 index 0000000000000000000000000000000000000000..1facf3ed2f43e21e3861a4d7f2181d26239b7d19 GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!Ql*|Qjv*C{Z|6F49WoGbo%~;M zHdmRl>#J2qw{GJUUVL@YjngIC_wM_AkTHJ$G0iXW+IjKYyN)eeWwBq}@4WcsWW5t# zk6GM(`M6b4wNHq@%sLN0?7d$$-tC=OVX0$G@1jo4=c!DxK(M>BO-uXyeV3 dQ + + + + + + +mi-malloc: Using the library + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
mi-malloc +  1.7/2.0 +
+
+ + + + + + +
+
+
+ + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Using the library
+
+
+

Build

+

The preferred usage is including <mimalloc.h>, linking with the shared- or static library, and using the mi_malloc API exclusively for allocation. For example,

gcc -o myprogram -lmimalloc myfile.c
+

mimalloc uses only safe OS calls (mmap and VirtualAlloc) and can co-exist with other allocators linked to the same program. If you use cmake, you can simply use:

find_package(mimalloc 1.0 REQUIRED)
+

in your CMakeLists.txt to find a locally installed mimalloc. Then use either:

target_link_libraries(myapp PUBLIC mimalloc)
+

to link with the shared (dynamic) library, or:

target_link_libraries(myapp PUBLIC mimalloc-static)
+

to link with the static library. See test\CMakeLists.txt for an example.

+

C++

+

For best performance in C++ programs, it is also recommended to override the global new and delete operators. For convience, mimalloc provides mimalloc-new-delete.h which does this for you – just include it in a single(!) source file in your project without linking to the mimalloc's library.

+

In C++, mimalloc also provides the mi_stl_allocator struct which implements the std::allocator interface. For example:

std::vector<some_struct, mi_stl_allocator<some_struct>> vec;
+
vec.push_back(some_struct());
+

Statistics

+

You can pass environment variables to print verbose messages (MIMALLOC_VERBOSE=1) and statistics (MIMALLOC_SHOW_STATS=1) (in the debug version):

> env MIMALLOC_SHOW_STATS=1 ./cfrac 175451865205073170563711388363
+
+
175451865205073170563711388363 = 374456281610909315237213 * 468551
+
+
heap stats: peak total freed unit
+
normal 2: 16.4 kb 17.5 mb 17.5 mb 16 b ok
+
normal 3: 16.3 kb 15.2 mb 15.2 mb 24 b ok
+
normal 4: 64 b 4.6 kb 4.6 kb 32 b ok
+
normal 5: 80 b 118.4 kb 118.4 kb 40 b ok
+
normal 6: 48 b 48 b 48 b 48 b ok
+
normal 17: 960 b 960 b 960 b 320 b ok
+
+
heap stats: peak total freed unit
+
normal: 33.9 kb 32.8 mb 32.8 mb 1 b ok
+
huge: 0 b 0 b 0 b 1 b ok
+
total: 33.9 kb 32.8 mb 32.8 mb 1 b ok
+
malloc requested: 32.8 mb
+
+
committed: 58.2 kb 58.2 kb 58.2 kb 1 b ok
+
reserved: 2.0 mb 2.0 mb 2.0 mb 1 b ok
+
reset: 0 b 0 b 0 b 1 b ok
+
segments: 1 1 1
+
-abandoned: 0
+
pages: 6 6 6
+
-abandoned: 0
+
mmaps: 3
+
mmap fast: 0
+
mmap slow: 1
+
threads: 0
+
elapsed: 2.022s
+
process: user: 1.781s, system: 0.016s, faults: 756, reclaims: 0, rss: 2.7 mb
+

The above model of using the mi_ prefixed API is not always possible though in existing programs that already use the standard malloc interface, and another option is to override the standard malloc interface completely and redirect all calls to the mimalloc library instead.

+

See Overriding Malloc for more info.

+
+
+
+ + + + diff --git a/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override-test.vcxproj.filters b/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override-test.vcxproj.filters new file mode 100644 index 000000000000..eb5e70b7c25b --- /dev/null +++ b/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override-test.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override.vcxproj.filters b/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override.vcxproj.filters new file mode 100644 index 000000000000..d01f9311f199 --- /dev/null +++ b/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override.vcxproj.filters @@ -0,0 +1,86 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-test-stress.vcxproj.filters b/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-test-stress.vcxproj.filters new file mode 100644 index 000000000000..7c5239e8271c --- /dev/null +++ b/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-test-stress.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-test.vcxproj.filters b/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-test.vcxproj.filters new file mode 100644 index 000000000000..fca75e1c3023 --- /dev/null +++ b/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-test.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc.vcxproj.filters b/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc.vcxproj.filters new file mode 100644 index 000000000000..054176452686 --- /dev/null +++ b/src/dashbls/depends/mimalloc/ide/vs2017/mimalloc.vcxproj.filters @@ -0,0 +1,92 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/ide/vs2019/mimalloc-override.vcxproj.filters b/src/dashbls/depends/mimalloc/ide/vs2019/mimalloc-override.vcxproj.filters new file mode 100644 index 000000000000..d6b7b5a966df --- /dev/null +++ b/src/dashbls/depends/mimalloc/ide/vs2019/mimalloc-override.vcxproj.filters @@ -0,0 +1,84 @@ + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + {f1fccf27-17b9-42dd-ba51-6070baff85c6} + + + {39cb7e38-69d0-43fb-8406-6a0f7cefc3b4} + + + \ No newline at end of file diff --git a/src/dashbls/depends/mimalloc/ide/vs2019/mimalloc.vcxproj.filters b/src/dashbls/depends/mimalloc/ide/vs2019/mimalloc.vcxproj.filters new file mode 100644 index 000000000000..92be7cb47e81 --- /dev/null +++ b/src/dashbls/depends/mimalloc/ide/vs2019/mimalloc.vcxproj.filters @@ -0,0 +1,87 @@ + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Source Files + + + + + {2b556b10-f559-4b2d-896e-142652adbf0c} + + + {852a14ae-6dde-4e95-8077-ca705e97e5af} + + + \ No newline at end of file From 92894a48b93a5f044ac541dd436daedcfd00a5a4 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 20 Mar 2025 23:39:01 -0500 Subject: [PATCH 153/401] Update darwin.mk --- depends/hosts/darwin.mk | 131 ++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 86 deletions(-) diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index e4b7ca22e260..a50e36110dc0 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -1,30 +1,11 @@ -OSX_MIN_VERSION=10.15 -OSX_SDK_VERSION=10.15.6 -XCODE_VERSION=12.1 -XCODE_BUILD_ID=12A7403 -LD64_VERSION=609 +OSX_MIN_VERSION=11.0 +OSX_SDK_VERSION=14.0 +XCODE_VERSION=15.0 +XCODE_BUILD_ID=15A240d +LLD_VERSION=711 OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers -darwin_native_binutils=native_cctools - -ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -# FORCE_USE_SYSTEM_CLANG is empty, so we use our depends-managed, pinned clang -# from llvm.org - -# Clang is a dependency of native_cctools when FORCE_USE_SYSTEM_CLANG is empty -darwin_native_toolchain=native_cctools - -clang_prog=$(build_prefix)/bin/clang -clangxx_prog=$(clang_prog)++ - -clang_resource_dir=$(build_prefix)/lib/clang/$(native_clang_version) -else -# FORCE_USE_SYSTEM_CLANG is non-empty, so we use the clang from the user's -# system - -darwin_native_toolchain= - # We can't just use $(shell command -v clang) because GNU Make handles builtins # in a special way and doesn't know that `command` is a POSIX-standard builtin # prior to 1af314465e5dfe3e8baa839a32a72e83c04f26ef, first released in v4.2.90. @@ -35,18 +16,12 @@ darwin_native_toolchain= clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang") clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++") -clang_resource_dir=$(shell clang -print-resource-dir) -endif - -cctools_TOOLS=AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL - -# Make-only lowercase function -lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) - -# For well-known tools provided by cctools, make sure that their well-known -# variable is set to the full path of the tool, just like how AC_PATH_{TOO,PROG} -# would. -$(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$(host)-$(call lc,$(TOOL)))) +darwin_AR=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ar") +darwin_DSYMUTIL=$(shell $(SHELL) $(.SHELLFLAGS) "command -v dsymutil") +darwin_NM=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-nm") +darwin_OBJDUMP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objdump") +darwin_RANLIB=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ranlib") +darwin_STRIP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-strip") # Flag explanations: # @@ -55,65 +30,49 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$( # Ensures that modern linker features are enabled. See here for more # details: https://github.com/bitcoin/bitcoin/pull/19407. # -# -B$(build_prefix)/bin -# -# Explicitly point to our binaries (e.g. cctools) so that they are -# ensured to be found and preferred over other possibilities. +# -isysroot$(OSX_SDK) -nostdlibinc # -# -stdlib=libc++ -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 +# Disable default include paths built into the compiler as well as +# those normally included for libc and libc++. The only path that +# remains implicitly is the clang resource dir. # -# Forces clang to use the libc++ headers from our SDK and completely -# forget about the libc++ headers from the standard directories +# -iwithsysroot / -iframeworkwithsysroot # -# -Xclang -*system \ -# -Xclang -*system \ -# -Xclang -*system ... +# Adds the desired paths from the SDK # -# Adds path_a, path_b, and path_c to the bottom of clang's list of -# include search paths. This is used to explicitly specify the list of -# system include search paths and its ordering, rather than rely on -# clang's autodetection routine. This routine has been shown to: -# 1. Fail to pickup libc++ headers in $SYSROOT/usr/include/c++/v1 -# when clang was built manually (see: https://github.com/bitcoin/bitcoin/pull/17919#issuecomment-656785034) -# 2. Fail to pickup C headers in $SYSROOT/usr/include when -# C_INCLUDE_DIRS was specified at configure time (see: https://gist.github.com/dongcarl/5cdc6990b7599e8a5bf6d2a9c70e82f9) +# -platform_version # -# Talking directly to cc1 with -Xclang here grants us access to specify -# more granular categories for these system include search paths, and we -# can use the correct categories that these search paths would have been -# placed in if the autodetection routine had worked correctly. (see: -# https://gist.github.com/dongcarl/5cdc6990b7599e8a5bf6d2a9c70e82f9#the-treatment) +# Indicate to the linker the platform, the oldest supported version, +# and the SDK used. # -# Furthermore, it places these search paths after any "non-Xclang" -# specified search paths. This prevents any additional clang options or -# environment variables from coming after or in between these system -# include search paths, as that would be wrong in general but would also -# break #include_next's. +# -no_adhoc_codesign # -darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ - -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ - -u LIBRARY_PATH \ - $(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ - -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ - -isysroot$(OSX_SDK) \ - -Xclang -internal-externc-isystem$(clang_resource_dir)/include \ - -Xclang -internal-externc-isystem$(OSX_SDK)/usr/include -darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ - -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ - -u LIBRARY_PATH \ - $(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ - -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ - -isysroot$(OSX_SDK) \ - -stdlib=libc++ \ - -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 \ - -Xclang -internal-externc-isystem$(clang_resource_dir)/include \ - -Xclang -internal-externc-isystem$(OSX_SDK)/usr/include - -darwin_CFLAGS=-pipe -darwin_CXXFLAGS=$(darwin_CFLAGS) +# Disable adhoc codesigning (for now) when using LLVM tooling, to avoid +# non-determinism issues with the Identifier field. + +darwin_CC=$(clang_prog) --target=$(host) \ + -isysroot$(OSX_SDK) -nostdlibinc \ + -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks + +darwin_CXX=$(clangxx_prog) --target=$(host) \ + -isysroot$(OSX_SDK) -nostdlibinc \ + -iwithsysroot/usr/include/c++/v1 \ + -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks + +darwin_CFLAGS=-pipe -std=$(C_STANDARD) -mmacos-version-min=$(OSX_MIN_VERSION) +darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) -mmacos-version-min=$(OSX_MIN_VERSION) +darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) + +ifneq ($(build_os),darwin) +darwin_CFLAGS += -mlinker-version=$(LLD_VERSION) +darwin_CXXFLAGS += -mlinker-version=$(LLD_VERSION) +darwin_LDFLAGS += -Wl,-no_adhoc_codesign -fuse-ld=lld +endif darwin_release_CFLAGS=-O2 darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) -darwin_debug_CFLAGS=-O1 +darwin_debug_CFLAGS=-O1 -g darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS) + +darwin_cmake_system=Darwin From 19cb5898fb1565d6989cbc930d99aa934a1a20d8 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 20 Mar 2025 23:41:47 -0500 Subject: [PATCH 154/401] Update native_cctools.mk --- depends/packages/native_cctools.mk | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index 885207fce9af..01542e21a8ce 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -1,17 +1,18 @@ package=native_cctools -$(package)_version=2ef2e931cf641547eb8a68cfebde61003587c9fd +$(package)_version=81f205e8ca6bbf2fdbcb6948132454fd1f97839e $(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive $(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=6b73269efdf5c58a070e7357b66ee760501388549d6a12b423723f45888b074b +$(package)_sha256_hash=9A836315380F35180F4E8BAE0247ED2DAC899AD5BA8F43879435977099F69E63 $(package)_build_subdir=cctools $(package)_dependencies=native_libtapi define $(package)_set_vars $(package)_config_opts=--target=$(host) - $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib - ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) - $(package)_config_opts+=--enable-lto-support --with-llvm-config=$(build_prefix)/bin/llvm-config - endif +# $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib +# ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) + $(package)_config_opts+=--enable-lto-support +# --with-llvm-config=$(build_prefix)/bin/llvm-config +# endif $(package)_cc=$(clang_prog) $(package)_cxx=$(clangxx_prog) endef From a5790157968710871c2cde95a08999b09e2fb7cd Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Thu, 20 Mar 2025 23:43:23 -0500 Subject: [PATCH 155/401] Update packages.mk --- depends/packages/packages.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index 99832a76c33e..c38dca8455c4 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -23,7 +23,7 @@ ifneq ($(build_os),darwin) darwin_native_packages += native_cctools native_libtapi native_libdmg-hfsplus ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -darwin_native_packages+= native_clang +#darwin_native_packages+= native_clang endif endif From 6ed9b96d2826abe32bcc277ee672c2bbb04dd6fe Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 21 Mar 2025 00:19:58 -0500 Subject: [PATCH 156/401] clang-llvm update --- depends/packages/native_clang.mk | 22 +++++++++++----------- depends/packages/packages.mk | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/depends/packages/native_clang.mk b/depends/packages/native_clang.mk index 25ac77c1a34a..696518554509 100644 --- a/depends/packages/native_clang.mk +++ b/depends/packages/native_clang.mk @@ -1,15 +1,15 @@ package=native_clang -$(package)_version=10.0.1 -$(package)_download_path=https://github.com/llvm/llvm-project/releases/download/llvmorg-$($(package)_version) -ifneq (,$(findstring aarch64,$(BUILD))) -$(package)_download_file=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz -$(package)_file_name=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz -$(package)_sha256_hash=90dc69a4758ca15cd0ffa45d07fbf5bf4309d47d2c7745a9f0735ecffde9c31f -else -$(package)_download_file=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz -$(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz -$(package)_sha256_hash=48b83ef827ac2c213d5b64f5ad7ed082c8bcb712b46644e0dc5045c6f462c231 -endif +$(package)_version=21 +$(package)_download_path=https://github.com/grigzy28/stakecubecoin-bootstrap/releases/download/clang-llvm-$($(package)_version)-ubuntu-22.04-x86_64 +#ifneq (,$(findstring aarch64,$(BUILD))) +#$(package)_download_file=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz +#$(package)_file_name=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz +#$(package)_sha256_hash=90dc69a4758ca15cd0ffa45d07fbf5bf4309d47d2c7745a9f0735ecffde9c31f +#else +$(package)_download_file=clang-llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-22.04.tar.gz +$(package)_file_name=clang-llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-22.04.tar.gz +$(package)_sha256_hash=e5d1a786cd7fa22a17bbbbbd4d8ee1b6a9701f6e81f313d172f901cd07f3e05d +#endif define $(package)_preprocess_cmds rm -f $($(package)_extract_dir)/lib/libc++abi.so* diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index c38dca8455c4..99832a76c33e 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -23,7 +23,7 @@ ifneq ($(build_os),darwin) darwin_native_packages += native_cctools native_libtapi native_libdmg-hfsplus ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -#darwin_native_packages+= native_clang +darwin_native_packages+= native_clang endif endif From c6dbcf137857a00990dc5afb0e61db04b7a852fd Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 21 Mar 2025 01:10:26 -0500 Subject: [PATCH 157/401] Update native_clang.mk --- depends/packages/native_clang.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/native_clang.mk b/depends/packages/native_clang.mk index 696518554509..85559f47cf2e 100644 --- a/depends/packages/native_clang.mk +++ b/depends/packages/native_clang.mk @@ -8,7 +8,7 @@ $(package)_download_path=https://github.com/grigzy28/stakecubecoin-bootstrap/rel #else $(package)_download_file=clang-llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-22.04.tar.gz $(package)_file_name=clang-llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-22.04.tar.gz -$(package)_sha256_hash=e5d1a786cd7fa22a17bbbbbd4d8ee1b6a9701f6e81f313d172f901cd07f3e05d +$(package)_sha256_hash=E7728E64292012CA889C00A075112E79454E24314222BC9973958E8DED87BC2E #endif define $(package)_preprocess_cmds From c4a2120bdaf1b79a401bd694fe9c84fd4dec0635 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 21 Mar 2025 11:57:34 -0500 Subject: [PATCH 158/401] update boost --- depends/packages/boost.mk | 2 ++ depends/patches/boost/process_macos_sdk.patch | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 depends/patches/boost/process_macos_sdk.patch diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 061c5ca93bc6..b16708dabae4 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -5,6 +5,7 @@ $(package)_file_name=boost_$($(package)_version).tar.bz2 $(package)_sha256_hash=1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b #4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 $(package)_dependencies=native_b2 +$(package)_patches=process_macos_sdk.patch define $(package)_set_vars $(package)_config_opts_release=variant=release @@ -42,6 +43,7 @@ endef # Fix missing unary_function in clang15 on macos, can be removed after upgrading to 1.81 define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/process_macos_sdk.patch && \ sed -i.old "s/unary_function/$(unary_function)/" boost/container_hash/hash.hpp && \ echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cflags)\" \"$($(package)_cxxflags)\" \"$($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_ar)\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef diff --git a/depends/patches/boost/process_macos_sdk.patch b/depends/patches/boost/process_macos_sdk.patch new file mode 100644 index 000000000000..75b49f9cb199 --- /dev/null +++ b/depends/patches/boost/process_macos_sdk.patch @@ -0,0 +1,17 @@ +Fix Boost Process compilation with macOS 14 SDK. +Can be dropped with Boost 1.84.0. +https://github.com/boostorg/process/pull/343. +https://github.com/boostorg/process/issues/342. + +diff --git a/libs/filesystem/src/directory.cpp +index cd9e1ce5a..304e77b1c 100644 +--- a/boost/process/detail/posix/handles.hpp +@@ -273,7 +273,7 @@ inline std::vector get_handles(std::error_code & ec) + else + ec.clear(); + +- auto my_fd = ::dirfd(dir.get()); ++ auto my_fd = dirfd(dir.get()); + + struct ::dirent * ent_p; + From 98604035b272dd7221c275bfe6cde7c0cd063f51 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 21 Mar 2025 12:12:27 -0500 Subject: [PATCH 159/401] Update process_macos_sdk.patch --- depends/patches/boost/process_macos_sdk.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/patches/boost/process_macos_sdk.patch b/depends/patches/boost/process_macos_sdk.patch index 75b49f9cb199..ea2343828244 100644 --- a/depends/patches/boost/process_macos_sdk.patch +++ b/depends/patches/boost/process_macos_sdk.patch @@ -3,9 +3,9 @@ Can be dropped with Boost 1.84.0. https://github.com/boostorg/process/pull/343. https://github.com/boostorg/process/issues/342. -diff --git a/libs/filesystem/src/directory.cpp index cd9e1ce5a..304e77b1c 100644 --- a/boost/process/detail/posix/handles.hpp ++++ b/boost/process/detail/posix/handles.hpp @@ -273,7 +273,7 @@ inline std::vector get_handles(std::error_code & ec) else ec.clear(); From dd46b0672d91fd06f02b9e9c862f47f42b81acd7 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 21 Mar 2025 13:27:48 -0500 Subject: [PATCH 160/401] Update process_macos_sdk.patch --- depends/patches/boost/process_macos_sdk.patch | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/depends/patches/boost/process_macos_sdk.patch b/depends/patches/boost/process_macos_sdk.patch index ea2343828244..473531d1e673 100644 --- a/depends/patches/boost/process_macos_sdk.patch +++ b/depends/patches/boost/process_macos_sdk.patch @@ -1,17 +1,11 @@ -Fix Boost Process compilation with macOS 14 SDK. -Can be dropped with Boost 1.84.0. -https://github.com/boostorg/process/pull/343. -https://github.com/boostorg/process/issues/342. +Patch + +--- a/libs/filesystem/src/directory.cpp ++++ b/libs/filesystem/src/directory.cpp +@@ -272,3 +272,3 @@ +-{ ++{ +- int fd = ::dirfd(static_cast< DIR* >(imp.handle)); ++ int fd = dirfd(static_cast< DIR* >(imp.handle)); + if (BOOST_UNLIKELY(fd < 0)) -index cd9e1ce5a..304e77b1c 100644 ---- a/boost/process/detail/posix/handles.hpp -+++ b/boost/process/detail/posix/handles.hpp -@@ -273,7 +273,7 @@ inline std::vector get_handles(std::error_code & ec) - else - ec.clear(); - -- auto my_fd = ::dirfd(dir.get()); -+ auto my_fd = dirfd(dir.get()); - - struct ::dirent * ent_p; - From 3a886c5426749527158020f5736ac795340821db Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 21 Mar 2025 13:29:18 -0500 Subject: [PATCH 161/401] Update cmake.mk --- depends/packages/cmake.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/depends/packages/cmake.mk b/depends/packages/cmake.mk index cc895de79a20..6440f7afd89a 100644 --- a/depends/packages/cmake.mk +++ b/depends/packages/cmake.mk @@ -1,8 +1,8 @@ package=cmake -$(package)_version=3.22.2 -$(package)_download_path=https://cmake.org/files/v3.22/ +$(package)_version=3.31.6 +$(package)_download_path=https://cmake.org/files/v3.31/ $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced +$(package)_sha256_hash=653427F0F5014750AAFFF22727FB2AA60C6C732CA91808CFB78CE22DDD9E55F0 define $(package)_config_cmds export CC="" && \ From 92bd6527a8c142e14e3bb61611e6d53a1d7d4596 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 21 Mar 2025 13:53:44 -0500 Subject: [PATCH 162/401] add libdispatch --- depends/packages/libdispatch.mk | 40 ++++++++++++++++++++++++++++++ depends/packages/native_cctools.mk | 2 +- depends/packages/packages.mk | 2 +- 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 depends/packages/libdispatch.mk diff --git a/depends/packages/libdispatch.mk b/depends/packages/libdispatch.mk new file mode 100644 index 000000000000..8ffd92741f5f --- /dev/null +++ b/depends/packages/libdispatch.mk @@ -0,0 +1,40 @@ +package=libdispatch +$(package)_version=137b6cf3060eae87d9b367c263619c2eca5d3aac +$(package)_download_path=https://github.com/swiftlang/swift-corelibs-libdispatch/archive/ +$(package)_file_name=swift-corelibs-libdispatch-$($(package)_version).tar.gz +$(package)_sha256_hash=0F25263ACDB746A81FDB8E7951BD1854D4BECB3F7F1119463A04DB56C7A6FDB0 +$(package)_build_subdir=build +$(package)_dependencies=native_clang + +# When building for Windows, we set _WIN32_WINNT to target the same Windows +# version as we do in configure. Due to quirks in libevents build system, this +# is also required to enable support for ipv6. See #19375. +define $(package)_set_vars + $(package)_config_opts=-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ +# $(package)_config_opts=-DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_OPENSSL=ON +# $(package)_config_opts+=-DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_REGRESS=ON +# $(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC +# $(package)_cppflags += -D_GNU_SOURCE + $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601 +endef + +define $(package)_preprocess_cmds +endef + +define $(package)_config_cmds + $($(package)_cmake) -S .. -B . +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf bin && \ + rm include/ev*.h && \ + rm include/event2/*_compat.h +endef diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index 01542e21a8ce..2e30f9d06d40 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -4,7 +4,7 @@ $(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=9A836315380F35180F4E8BAE0247ED2DAC899AD5BA8F43879435977099F69E63 $(package)_build_subdir=cctools -$(package)_dependencies=native_libtapi +$(package)_dependencies=native_libtapi libdispatch define $(package)_set_vars $(package)_config_opts=--target=$(host) diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index 99832a76c33e..f031b64d0154 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -20,7 +20,7 @@ darwin_native_packages = native_ds_store native_mac_alias $(host_arch)_$(host_os)_native_packages += native_b2 ifneq ($(build_os),darwin) -darwin_native_packages += native_cctools native_libtapi native_libdmg-hfsplus +darwin_native_packages += native_cctools native_libtapi native_libdmg-hfsplus libdispatch ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) darwin_native_packages+= native_clang From 36ce05038d8707fab89864ecc3062560d037b433 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 21 Mar 2025 13:57:57 -0500 Subject: [PATCH 163/401] Update libdispatch.mk --- depends/packages/libdispatch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/libdispatch.mk b/depends/packages/libdispatch.mk index 8ffd92741f5f..1a65a6e34edb 100644 --- a/depends/packages/libdispatch.mk +++ b/depends/packages/libdispatch.mk @@ -1,6 +1,6 @@ package=libdispatch $(package)_version=137b6cf3060eae87d9b367c263619c2eca5d3aac -$(package)_download_path=https://github.com/swiftlang/swift-corelibs-libdispatch/archive/ +$(package)_download_path=https://github.com/swiftlang/swift-corelibs-libdispatch/archive $(package)_file_name=swift-corelibs-libdispatch-$($(package)_version).tar.gz $(package)_sha256_hash=0F25263ACDB746A81FDB8E7951BD1854D4BECB3F7F1119463A04DB56C7A6FDB0 $(package)_build_subdir=build From ff68957d3ed12d70181f76d14f9f61279e33377b Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 21 Mar 2025 14:01:14 -0500 Subject: [PATCH 164/401] Update libdispatch.mk --- depends/packages/libdispatch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/libdispatch.mk b/depends/packages/libdispatch.mk index 1a65a6e34edb..4aa0bd30e11c 100644 --- a/depends/packages/libdispatch.mk +++ b/depends/packages/libdispatch.mk @@ -1,7 +1,7 @@ package=libdispatch $(package)_version=137b6cf3060eae87d9b367c263619c2eca5d3aac $(package)_download_path=https://github.com/swiftlang/swift-corelibs-libdispatch/archive -$(package)_file_name=swift-corelibs-libdispatch-$($(package)_version).tar.gz +$(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=0F25263ACDB746A81FDB8E7951BD1854D4BECB3F7F1119463A04DB56C7A6FDB0 $(package)_build_subdir=build $(package)_dependencies=native_clang From d4079da89ff0b6af324b751f29dacf2f3c99e6ce Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Fri, 21 Mar 2025 14:04:43 -0500 Subject: [PATCH 165/401] Update libdispatch.mk --- depends/packages/libdispatch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/libdispatch.mk b/depends/packages/libdispatch.mk index 4aa0bd30e11c..23e17eb803bf 100644 --- a/depends/packages/libdispatch.mk +++ b/depends/packages/libdispatch.mk @@ -4,7 +4,7 @@ $(package)_download_path=https://github.com/swiftlang/swift-corelibs-libdispatch $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=0F25263ACDB746A81FDB8E7951BD1854D4BECB3F7F1119463A04DB56C7A6FDB0 $(package)_build_subdir=build -$(package)_dependencies=native_clang +$(package)_dependencies=native_clang cmake # When building for Windows, we set _WIN32_WINNT to target the same Windows # version as we do in configure. Due to quirks in libevents build system, this From ec01e1856aa22db57b0fadeda135e54af5d3bd57 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Sun, 23 Mar 2025 23:33:33 -0500 Subject: [PATCH 166/401] depends updates --- depends/Makefile | 138 +- depends/builders/darwin.mk | 22 +- depends/builders/default.mk | 4 +- depends/config.guess | 1282 +++++++++-------- depends/config.site.in | 110 +- depends/config.sub | 297 ++-- depends/funcs.mk | 146 +- depends/gen_id | 78 + depends/hosts/darwin.mk | 25 +- depends/hosts/default.mk | 9 +- depends/packages/boost.mk | 2 +- depends/packages/freetype.mk | 6 +- depends/packages/gmp.mk | 25 +- depends/packages/libdispatch.mk | 29 +- depends/packages/libevent.mk | 27 +- depends/packages/libnatpmp.mk | 16 +- depends/packages/miniupnpc.mk | 21 +- depends/packages/native_cctools.mk | 9 +- depends/packages/native_clang.mk | 13 +- depends/packages/native_libtapi.mk | 11 +- depends/packages/packages.mk | 4 +- depends/packages/qrencode.mk | 26 +- depends/packages/qt.mk | 2 +- depends/packages/zlib.mk | 10 +- .../gmp/include_ldflags_in_configure.patch | 622 ++++++++ .../libdispatch/process_macos_sdk.patch | 11 + depends/patches/libevent/cmake_fixups.patch | 35 + depends/patches/libevent/fix_mingw_link.patch | 25 + depends/patches/qrencode/cmake_fixups.patch | 23 + 29 files changed, 2100 insertions(+), 928 deletions(-) create mode 100644 depends/gen_id create mode 100644 depends/patches/gmp/include_ldflags_in_configure.patch create mode 100644 depends/patches/libdispatch/process_macos_sdk.patch create mode 100644 depends/patches/libevent/cmake_fixups.patch create mode 100644 depends/patches/libevent/fix_mingw_link.patch create mode 100644 depends/patches/qrencode/cmake_fixups.patch diff --git a/depends/Makefile b/depends/Makefile index 90df209d9b54..cf8757c23ccb 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -1,8 +1,8 @@ .NOTPARALLEL : # Pattern rule to print variables, e.g. make print-top_srcdir -print-%: - @echo $* = $($*) +print-%: FORCE + @echo '$*'='$($*)' # When invoking a sub-make, keep only the command line variable definitions # matching the pattern in the filter function. @@ -33,11 +33,21 @@ WORK_PATH = $(BASEDIR)/work BASE_CACHE ?= $(BASEDIR)/built SDK_PATH ?= $(BASEDIR)/SDKs NO_QT ?= +NO_QR ?= +NO_BDB ?= +NO_SQLITE ?= NO_WALLET ?= NO_ZMQ ?= NO_UPNP ?= +NO_USDT ?= NO_NATPMP ?= -FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources +MULTIPROCESS ?= +LTO ?= +FALLBACK_DOWNLOAD_PATH ?= +#http://dash-depends-sources.s3-website-us-west-2.amazonaws.com + +C_STANDARD ?= c11 +CXX_STANDARD ?= c++20 BUILD = $(shell ./config.guess) HOST ?= $(BUILD) @@ -45,6 +55,7 @@ PATCHES_PATH = $(BASEDIR)/patches BASEDIR = $(CURDIR) HASH_LENGTH:=11 DOWNLOAD_CONNECT_TIMEOUT:=30 +DOWNLOAD_RETRIES:=3 HOST_ID_SALT ?= salt BUILD_ID_SALT ?= salt @@ -70,6 +81,9 @@ build_vendor=$(word 2,$(subst -, ,$(build))) full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build)) build_os:=$(findstring linux,$(full_build_os)) build_os+=$(findstring darwin,$(full_build_os)) +build_os+=$(findstring freebsd,$(full_build_os)) +build_os+=$(findstring netbsd,$(full_build_os)) +build_os+=$(findstring openbsd,$(full_build_os)) build_os:=$(strip $(build_os)) ifeq ($(build_os),) build_os=$(full_build_os) @@ -80,6 +94,9 @@ host_vendor=$(word 2,$(subst -, ,$(canonical_host))) full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host)) host_os:=$(findstring linux,$(full_host_os)) host_os+=$(findstring darwin,$(full_host_os)) +host_os+=$(findstring freebsd,$(full_host_os)) +host_os+=$(findstring netbsd,$(full_host_os)) +host_os+=$(findstring openbsd,$(full_host_os)) host_os+=$(findstring mingw32,$(full_host_os)) ifeq (android,$(findstring android,$(full_host_os))) @@ -97,10 +114,6 @@ host_prefix=$($(host_arch)_$(host_os)_prefix) build_prefix=$(host_prefix)/native build_host=$(build) -AT_$(V):= -AT_:=@ -AT:=$(AT_$(V)) - all: install include hosts/$(host_os).mk @@ -109,59 +122,74 @@ include builders/$(build_os).mk include builders/default.mk include packages/packages.mk -build_id_string:=$(BUILD_ID_SALT) -build_id_string+=$(shell $(build_CC) --version 2>/dev/null) -build_id_string+=$(shell $(build_AR) --version 2>/dev/null) -build_id_string+=$(shell $(build_CXX) --version 2>/dev/null) -build_id_string+=$(shell $(build_RANLIB) --version 2>/dev/null) -build_id_string+=$(shell $(build_STRIP) --version 2>/dev/null) - -$(host_arch)_$(host_os)_id_string:=$(HOST_ID_SALT) -$(host_arch)_$(host_os)_id_string+=$(shell $(host_CC) --version 2>/dev/null) -$(host_arch)_$(host_os)_id_string+=$(shell $(host_AR) --version 2>/dev/null) -$(host_arch)_$(host_os)_id_string+=$(shell $(host_CXX) --version 2>/dev/null) -$(host_arch)_$(host_os)_id_string+=$(shell $(host_RANLIB) --version 2>/dev/null) -$(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null) - -ifneq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -# Make sure that cache is invalidated when switching between system and -# depends-managed, pinned clang -build_id_string+=system_clang -$(host_arch)_$(host_os)_id_string+=system_clang -endif +# Previously, we directly invoked the well-known programs using $(shell ...) +# to contruct build_id_string. However, that was problematic because: +# +# 1. When invoking a shell, GNU Make special-cases exit code 127 (command not +# found) by not capturing the output but instead passing it through. This is +# not done for any other exit code. +# +# 2. Characters like '#' (from these programs' output) would end up in make +# variables like build_id_string, which would be wrongly interpreted by make +# when these variables were used. +# +# Therefore, we should avoid having arbitrary strings in make variables where +# possible. The gen_id script used here hashes the output to construct a +# "make-safe" id. +# +# Also note that these lines need to be: +# +# 1. After including {hosts,builders}/*.mk, since they rely on the tool +# variables (e.g. build_CC, host_STRIP, etc.) to be set. +# +# 2. Before including packages/*.mk (excluding packages/packages.mk), since +# they rely on the build_id variables +# +build_id:=$(shell env CC='$(build_CC)' CXX='$(build_CXX)' AR='$(build_AR)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') +$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' CXX='$(host_CXX)' AR='$(host_AR)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' ./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') + +qrencode_packages_$(NO_QR) = $(qrencode_$(host_os)_packages) + +qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_) + +bdb_packages_$(NO_BDB) = $(bdb_packages) +sqlite_packages_$(NO_SQLITE) = $(sqlite_packages) +wallet_packages_$(NO_WALLET) = $(bdb_packages_) $(sqlite_packages_) -qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) -wallet_packages_$(NO_WALLET) = $(wallet_packages) upnp_packages_$(NO_UPNP) = $(upnp_packages) natpmp_packages_$(NO_NATPMP) = $(natpmp_packages) + zmq_packages_$(NO_ZMQ) = $(zmq_packages) +multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages) +usdt_packages_$(NO_USDT) = $(usdt_$(host_os)_packages) -packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_) $(natpmp_packages_) +packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_) $(natpmp_packages_) $(usdt_packages_) native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) - ifneq ($(zmq_packages_),) packages += $(zmq_packages) endif -all_packages = $(packages) $(native_packages) +ifeq ($(multiprocess_packages_),) +packages += $(multiprocess_packages) +native_packages += $(multiprocess_native_packages) +endif -meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk +all_packages = $(packages) $(native_packages) -$(host_arch)_$(host_os)_native_binutils?=$($(host_os)_native_binutils) -$(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain) +meta_depends = Makefile config.guess config.sub funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk include funcs.mk final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in) final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)) $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages) - $(AT)rm -rf $(@D) - $(AT)mkdir -p $(@D) - $(AT)echo copying packages: $^ - $(AT)echo to: $(@D) - $(AT)cd $(@D); $(foreach package,$^, tar xf $($(package)_cached); ) - $(AT)touch $@ + rm -rf $(@D) + mkdir -p $(@D) + echo copying packages: $^ + echo to: $(@D) + cd $(@D); $(foreach package,$^, $(build_TAR) xf $($(package)_cached); ) + touch $@ # $PATH is not preserved between ./configure and make by convention. Its # modification and overriding at ./configure time is (as I understand it) @@ -180,37 +208,44 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages) # tool needs to be available in $PATH at all times. # # 2. If the tool is _**not**_ expected to be available in $PATH at all times -# (such as is the case for our native_cctools binutils tools), it needs to -# be referred to by its absolute path, such as would be output by the -# AC_PATH_{PROG,TOOL} macros. +# it needs to be referred to by its absolute path, such as would be output +# by the AC_PATH_{PROG,TOOL} macros. # # Minor note: it is also okay to refer to tools by their absolute path even if # we expect them to be available in $PATH at all times, more specificity does # not hurt. $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id) - $(AT)@mkdir -p $(@D) - $(AT)sed -e 's|@HOST@|$(host)|' \ + @mkdir -p $(@D) + sed -e 's|@HOST@|$(host)|' \ -e 's|@CC@|$(host_CC)|' \ -e 's|@CXX@|$(host_CXX)|' \ -e 's|@AR@|$(host_AR)|' \ -e 's|@RANLIB@|$(host_RANLIB)|' \ -e 's|@NM@|$(host_NM)|' \ -e 's|@STRIP@|$(host_STRIP)|' \ + -e 's|@OBJDUMP@|$(host_OBJDUMP)|' \ + -e 's|@DSYMUTIL@|$(host_DSYMUTIL)|' \ -e 's|@build_os@|$(build_os)|' \ -e 's|@host_os@|$(host_os)|' \ -e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \ -e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \ -e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \ -e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \ + -e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \ -e 's|@no_qt@|$(NO_QT)|' \ + -e 's|@no_qr@|$(NO_QR)|' \ -e 's|@no_zmq@|$(NO_ZMQ)|' \ - -e 's|@disable_bip70@|$(NO_PROTOBUF)|' \ -e 's|@no_wallet@|$(NO_WALLET)|' \ + -e 's|@no_bdb@|$(NO_BDB)|' \ + -e 's|@no_sqlite@|$(NO_SQLITE)|' \ -e 's|@no_upnp@|$(NO_UPNP)|' \ + -e 's|@no_usdt@|$(NO_USDT)|' \ -e 's|@no_natpmp@|$(NO_NATPMP)|' \ + -e 's|@multiprocess@|$(MULTIPROCESS)|' \ + -e 's|@lto@|$(LTO)|' \ -e 's|@debug@|$(DEBUG)|' \ $< > $@ - $(AT)touch $@ + touch $@ define check_or_remove_cached @@ -237,10 +272,10 @@ $(host_prefix)/share/config.site: check-packages check-packages: check-sources clean-all: clean - @rm -rf $(SOURCES_PATH) x86_64* i686* mips* arm* aarch64* riscv32* riscv64* + @rm -rf $(SOURCES_PATH) x86_64* i686* mips* arm* aarch64* powerpc* riscv32* riscv64* s390x* clean: - @rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD) + @rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD) *.log install: check-packages $(host_prefix)/share/config.site @@ -258,3 +293,6 @@ download: download-osx download-linux download-win $(foreach package,$(all_packages),$(eval $(call ext_add_stages,$(package)))) .PHONY: install cached clean clean-all download-one download-osx download-linux download-win download check-packages check-sources +.PHONY: FORCE +$(V).SILENT: + diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk index c07417cfab57..2b59353e84f3 100644 --- a/depends/builders/darwin.mk +++ b/depends/builders/darwin.mk @@ -3,21 +3,23 @@ build_darwin_CXX:=$(shell xcrun -f clang++) -isysroot$(shell xcrun --show-sdk-pa build_darwin_AR:=$(shell xcrun -f ar) build_darwin_RANLIB:=$(shell xcrun -f ranlib) build_darwin_STRIP:=$(shell xcrun -f strip) -build_darwin_OTOOL:=$(shell xcrun -f otool) +build_darwin_OBJDUMP:=$(shell xcrun -f objdump) build_darwin_NM:=$(shell xcrun -f nm) -build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) +build_darwin_DSYMUTIL:=$(shell xcrun -f dsymutil) build_darwin_SHA256SUM=shasum -a 256 -build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) -o +build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o #darwin host on darwin builder. overrides darwin host preferences. -darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) -isysroot$(shell xcrun --show-sdk-path) -darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ -fvisibility=hidden -isysroot$(shell xcrun --show-sdk-path) +darwin_CC=$(shell xcrun -f clang) -isysroot$(shell xcrun --show-sdk-path) +darwin_CXX:=$(shell xcrun -f clang++) -stdlib=libc++ -isysroot$(shell xcrun --show-sdk-path) darwin_AR:=$(shell xcrun -f ar) darwin_RANLIB:=$(shell xcrun -f ranlib) darwin_STRIP:=$(shell xcrun -f strip) -darwin_LIBTOOL:=$(shell xcrun -f libtool) -darwin_OTOOL:=$(shell xcrun -f otool) +darwin_OBJDUMP:=$(shell xcrun -f objdump) darwin_NM:=$(shell xcrun -f nm) -darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) -darwin_native_binutils= -darwin_native_toolchain= +darwin_DSYMUTIL:=$(shell xcrun -f dsymutil) + +x86_64_darwin_CFLAGS += -arch x86_64 +x86_64_darwin_CXXFLAGS += -arch x86_64 +aarch64_darwin_CFLAGS += -arch arm64 +aarch64_darwin_CXXFLAGS += -arch arm64 diff --git a/depends/builders/default.mk b/depends/builders/default.mk index 0b5e8f6acc54..cbada02c37ed 100644 --- a/depends/builders/default.mk +++ b/depends/builders/default.mk @@ -7,13 +7,15 @@ default_build_NM = nm default_build_OTOOL = otool default_build_INSTALL_NAME_TOOL = install_name_tool default_build_TAR = tar +default_build_OBJDUMP = objdump +default_build_TOUCH = touch -h -m -t 200001011200 define add_build_tool_func build_$(build_os)_$1 ?= $$(default_build_$1) build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1) build_$1=$$(build_$(build_arch)_$(build_os)_$1) endef -$(foreach var,CC CXX AR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL TAR INSTALL_NAME_TOOL,$(eval $(call add_build_tool_func,$(var)))) +$(foreach var,CC CXX AR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL TAR INSTALL_NAME_TOOL OBJDUMP TOUCH,$(eval $(call add_build_tool_func,$(var)))) define add_build_flags_func build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1) build_$1=$$(build_$(build_arch)_$(build_os)_$1) diff --git a/depends/config.guess b/depends/config.guess index dc0a6b29976a..06b9693a78f9 100755 --- a/depends/config.guess +++ b/depends/config.guess @@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2021 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. -timestamp='2021-05-24' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-08-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -32,12 +34,20 @@ timestamp='2021-05-24' # Please send patches to . -me=$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + +me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -50,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2021 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -84,13 +94,16 @@ if test $# != 0; then exit 1 fi +# Just in case it came from the environment. +GUESS= + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -102,8 +115,8 @@ set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 - { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } @@ -112,7 +125,7 @@ set_cc_for_build() { ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" + CC_FOR_BUILD=$driver break fi done @@ -131,10 +144,10 @@ if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi -UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown -UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown -UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown -UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case $UNAME_SYSTEM in Linux|GNU|GNU/*) @@ -142,6 +155,9 @@ Linux|GNU|GNU/*) set_cc_for_build cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=android + #else #include #if defined(__UCLIBC__) LIBC=uclibc @@ -156,8 +172,10 @@ Linux|GNU|GNU/*) LIBC=musl #endif #endif + #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && @@ -188,10 +206,10 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ - echo unknown)) + echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; @@ -200,11 +218,11 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') - endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') - machine="${arch}${endian}"-unknown + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. @@ -232,7 +250,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -245,76 +263,76 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in release='-gnu' ;; *) - release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; *:SecBSD:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/SecBSD.//') - echo "$UNAME_MACHINE_ARCH"-unknown-secbsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; *:OS108:*:*) - echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; *:Twizzler:*:*) - echo "$UNAME_MACHINE"-unknown-twizzler - exit ;; + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) # Reset EXIT trap before exiting to avoid spurious non-zero exit code. trap '' 0 case $UNAME_RELEASE in *4.0) - UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; @@ -352,65 +370,69 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" - exit ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "$( (/bin/universe) 2>/dev/null)" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case $(/usr/bin/uname -p) in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + case `/usr/bin/uname -p` in + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 @@ -419,47 +441,50 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case $(/usr/bin/arch -k) in + case `/usr/bin/arch -k` in Series*|S4*) - UNAME_RELEASE=$(uname -v) + UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" - exit ;; + # Japanese Language versions have a version number like '4.1.3-JL'. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case $(/bin/arch) in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -469,41 +494,41 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -528,78 +553,79 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && - SYSTEM_NAME=$("$dummy" "$dummyarg") && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=$(/usr/bin/uname -p) + UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then - IBM_REV=$(/usr/bin/oslevel) + IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -614,63 +640,63 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) - IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then - IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then - sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) - sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 @@ -717,7 +743,7 @@ EOF exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac @@ -742,12 +768,12 @@ EOF HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -775,38 +801,38 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -814,17 +840,18 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -832,114 +859,155 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) - FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') - FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') - FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; arm:FreeBSD:*:*) - UNAME_PROCESSOR=$(uname -p) + UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi - exit ;; + ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=$(/usr/bin/uname -p) + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-pc-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -950,63 +1018,72 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:* | arc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 @@ -1051,138 +1128,150 @@ EOF #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level - case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) set_cc_for_build + CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_X32 >/dev/null - then - LIBCABI="$LIBC"x32 - fi + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac fi - echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" - exit ;; + GUESS=$CPU-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) - UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. - case $(/bin/uname -X | grep "^Machine") in + case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then - UNAME_REL=$(sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 @@ -1190,11 +1279,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1202,37 +1291,37 @@ EOF # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ - && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1243,7 +1332,7 @@ EOF NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ - && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1251,118 +1340,121 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=$( (uname -p) 2>/dev/null) - echo "$UNAME_MACHINE"-sni-sysv4 + UNAME_MACHINE=`(uname -p) 2>/dev/null` + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + ;; + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then - echo mips-nec-sysv"$UNAME_RELEASE" + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=i586-pc-haiku + ;; + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; arm64:Darwin:*:*) - echo aarch64-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=$(uname -p) + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac @@ -1396,43 +1488,43 @@ EOF # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=$(uname -p) + UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1440,64 +1532,75 @@ EOF if test "${cputype-}" = 386; then UNAME_MACHINE=i386 elif test "x${cputype-}" != x; then - UNAME_MACHINE="$cputype" + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) - UNAME_MACHINE=$( (uname -p) 2>/dev/null) + UNAME_MACHINE=`(uname -p) 2>/dev/null` case $UNAME_MACHINE in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; *:AROS:*:*) - echo "$UNAME_MACHINE"-unknown-aros - exit ;; + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; *:Unleashed:*:*) - echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" </dev/null); + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else @@ -1629,7 +1732,7 @@ main () } EOF -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. @@ -1659,9 +1762,11 @@ and https://git.savannah.gnu.org/cgit/config.git/plain/config.sub EOF -year=$(echo $timestamp | sed 's,-.*,,') +our_year=`echo $timestamp | sed 's,-.*,,'` +thisyear=`date +%Y` # shellcheck disable=SC2003 -if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then +script_age=`expr "$thisyear" - "$our_year"` +if test "$script_age" -lt 3 ; then cat >&2 </dev/null || echo unknown) -uname -r = $( (uname -r) 2>/dev/null || echo unknown) -uname -s = $( (uname -s) 2>/dev/null || echo unknown) -uname -v = $( (uname -v) 2>/dev/null || echo unknown) +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` -/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) -/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` -hostinfo = $( (hostinfo) 2>/dev/null) -/bin/universe = $( (/bin/universe) 2>/dev/null) -/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) -/bin/arch = $( (/bin/arch) 2>/dev/null) -/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) -/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" @@ -1700,3 +1805,4 @@ exit 1 # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: + diff --git a/depends/config.site.in b/depends/config.site.in index ec45997d2d75..d92a0f76d30b 100644 --- a/depends/config.site.in +++ b/depends/config.site.in @@ -8,67 +8,88 @@ true # Dummy command because shellcheck treats all directives before first # See: https://github.com/koalaman/shellcheck/wiki/Directive # shellcheck disable=SC2154 -depends_prefix="$(cd "$(dirname ${ac_site_file})/.." && pwd)" +depends_prefix="$(cd "$(dirname "$ac_site_file")/.." && pwd)" cross_compiling=maybe -host_alias=@HOST@ -ac_tool_prefix=${host_alias}- +host_alias="@HOST@" +ac_tool_prefix="${host_alias}-" -if test -z $with_boost; then - with_boost=$depends_prefix +if test -z "$with_boost"; then + with_boost="$depends_prefix" fi -if test -z $with_qt_plugindir; then - with_qt_plugindir=$depends_prefix/plugins +if test -z "$with_qt_plugindir"; then + with_qt_plugindir="${depends_prefix}/plugins" fi -if test -z $with_qt_translationdir; then - with_qt_translationdir=$depends_prefix/translations +if test -z "$with_qt_translationdir"; then + with_qt_translationdir="${depends_prefix}/translations" fi -if test -z $with_qt_bindir; then - with_qt_bindir=$depends_prefix/native/bin +if test -z "$with_qt_bindir" && test -z "@no_qt@"; then + with_qt_bindir="${depends_prefix}/native/bin" +fi +if test -z "$with_mpgen" && test -n "@multiprocess@"; then + with_mpgen="${depends_prefix}/native" fi +if test -z "$with_qrencode" && test -n "@no_qr@"; then + with_qrencode=no +fi -if test -z $enable_wallet && test -n "@no_wallet@"; then +if test -z "$enable_wallet" && test -n "@no_wallet@"; then enable_wallet=no fi -if test -z $with_miniupnpc && test -n "@no_upnp@"; then +if test -z "$with_bdb" && test -n "@no_bdb@"; then + with_bdb=no +fi + +if test -z "$with_sqlite" && test -n "@no_sqlite@"; then + with_sqlite=no +fi + +if test -z "$enable_multiprocess" && test -n "@multiprocess@"; then + enable_multiprocess=yes +fi + +if test -z "$with_miniupnpc" && test -n "@no_upnp@"; then with_miniupnpc=no fi -if test -z $with_natpmp && test -n "@no_natpmp@"; then +if test -z "$with_natpmp" && test -n "@no_natpmp@"; then with_natpmp=no fi -if test -z $with_gui && test -n "@no_qt@"; then +if test -z "$with_gui" && test -n "@no_qt@"; then with_gui=no fi -if test -z $enable_zmq && test -n "@no_zmq@"; then +if test -n "@debug@" && test -z "@no_qt@" && test "x$with_gui" != xno; then + with_gui=qt5_debug +fi + +if test -z "$enable_zmq" && test -n "@no_zmq@"; then enable_zmq=no fi -if test -n "@debug@" && test -z "@no_qt@" && test "x$with_gui" != xno; then - with_gui=qt5_debug +if test -z "$enable_usdt" && test -n "@no_usdt@"; then + enable_usdt=no fi if test "@host_os@" = darwin; then BREW=no - PORT=no fi -PATH=$depends_prefix/native/bin:$PATH PKG_CONFIG="$(which pkg-config) --static" # These two need to remain exported because pkg-config does not see them # otherwise. That means they must be unexported at the end of configure.ac to # avoid ruining the cache. Sigh. +export PKG_CONFIG_PATH="${depends_prefix}/share/pkgconfig:${depends_prefix}/lib/pkgconfig" +if test -z "@allow_host_packages@"; then + export PKG_CONFIG_LIBDIR="${depends_prefix}/lib/pkgconfig" +fi -export PKG_CONFIG_LIBDIR=$depends_prefix/lib/pkgconfig -export PKG_CONFIG_PATH=$depends_prefix/share/pkgconfig - -CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS" -LDFLAGS="-L$depends_prefix/lib $LDFLAGS" +CPPFLAGS="-I${depends_prefix}/include/ ${CPPFLAGS}" +LDFLAGS="-L${depends_prefix}/lib ${LDFLAGS}" if test -n "@CC@" -a -z "${CC}"; then CC="@CC@" @@ -76,21 +97,37 @@ fi if test -n "@CXX@" -a -z "${CXX}"; then CXX="@CXX@" fi -PYTHONPATH="${depends_prefix}/native/lib/python3/dist-packages${PYTHONPATH:+${PATH_SEPARATOR}}${PYTHONPATH}" if test -n "@AR@"; then - AR=@AR@ - ac_cv_path_ac_pt_AR=${AR} + AR="@AR@" + ac_cv_path_AR="${AR}" fi if test -n "@RANLIB@"; then - RANLIB=@RANLIB@ - ac_cv_path_ac_pt_RANLIB=${RANLIB} + RANLIB="@RANLIB@" + ac_cv_path_ac_pt_RANLIB="${RANLIB}" fi if test -n "@NM@"; then - NM=@NM@ - ac_cv_path_ac_pt_NM=${NM} + NM="@NM@" + ac_cv_path_ac_pt_NM="${NM}" +fi + +if test -n "@STRIP@"; then + STRIP="@STRIP@" + ac_cv_path_ac_pt_STRIP="${STRIP}" +fi + +if test "@host_os@" = darwin; then + if test -n "@OBJDUMP@"; then + OBJDUMP="@OBJDUMP@" + ac_cv_path_OBJDUMP="${OBJDUMP}" + fi + + if test -n "@DSYMUTIL@"; then + DSYMUTIL="@DSYMUTIL@" + ac_cv_path_DSYMUTIL="${DSYMUTIL}" + fi fi if test -n "@debug@"; then @@ -98,14 +135,15 @@ if test -n "@debug@"; then fi if test -n "@CFLAGS@"; then - CFLAGS="@CFLAGS@ $CFLAGS" + CFLAGS="@CFLAGS@ ${CFLAGS}" fi if test -n "@CXXFLAGS@"; then - CXXFLAGS="@CXXFLAGS@ $CXXFLAGS" + CXXFLAGS="@CXXFLAGS@ ${CXXFLAGS}" fi if test -n "@CPPFLAGS@"; then - CPPFLAGS="@CPPFLAGS@ $CPPFLAGS" + CPPFLAGS="@CPPFLAGS@ ${CPPFLAGS}" fi if test -n "@LDFLAGS@"; then - LDFLAGS="@LDFLAGS@ $LDFLAGS" + LDFLAGS="@LDFLAGS@ ${LDFLAGS}" fi + diff --git a/depends/config.sub b/depends/config.sub index 7384e9198b40..a1fb5c460f03 100755 --- a/depends/config.sub +++ b/depends/config.sub @@ -1,12 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2021 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. -timestamp='2021-04-30' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-09-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -50,7 +52,14 @@ timestamp='2021-04-30' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -me=$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + +me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS @@ -67,13 +76,13 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2021 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -112,14 +121,16 @@ esac # Split fields of configuration type # shellcheck disable=SC2162 +saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) @@ -134,7 +145,8 @@ case $1 in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ + | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; @@ -163,6 +175,10 @@ case $1 in basic_machine=$field1 basic_os=$field2 ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ @@ -769,22 +785,22 @@ case $basic_machine in vendor=hp ;; i*86v32) - cpu=$(echo "$1" | sed -e 's/86.*/86/') + cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) - cpu=$(echo "$1" | sed -e 's/86.*/86/') + cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) - cpu=$(echo "$1" | sed -e 's/86.*/86/') + cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) - cpu=$(echo "$1" | sed -e 's/86.*/86/') + cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; @@ -917,16 +933,18 @@ case $basic_machine in ;; leon-*|leon[3-9]-*) cpu=sparc - vendor=$(echo "$basic_machine" | sed 's/-.*//') + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 + saved_IFS=$IFS IFS="-" read cpu vendor <&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1284,38 +1285,45 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if test x$basic_os != x +if test x"$basic_os" != x then -# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. +obj= case $basic_os in gnu/linux*) kernel=linux - os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|') + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 - os=$(echo $basic_os | sed -e 's|os2-emx|emx|') + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto - os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|') + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=SC2162 + saved_IFS=$IFS IFS="-" read kernel os <&2 + fi + ;; *) - echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 + exit 1 + ;; +esac + +case $obj in + aout* | coff* | elf* | pe*) + ;; + '') + # empty is fine + ;; + *) + echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 + exit 1 + ;; +esac + +# Here we handle the constraint that a (synthetic) cpu and os are +# valid only in combination with each other and nowhere else. +case $cpu-$os in + # The "javascript-unknown-ghcjs" triple is used by GHC; we + # accept it here in order to tolerate that, but reject any + # variations. + javascript-ghcjs) + ;; + javascript-* | *-ghcjs) + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. -case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) +case $kernel-$os-$obj in + linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \ + | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- ) + ;; + uclinux-uclibc*- ) + ;; + managarm-mlibc*- | managarm-kernel*- ) ;; - uclinux-uclibc* ) + windows*-msvc*-) ;; - -dietlibc* | -newlib* | -musl* | -uclibc* ) + -dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. - echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; - kfreebsd*-gnu* | kopensolaris*-gnu*) + -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 ;; - vxworks-simlinux | vxworks-simwindows | vxworks-spe) + *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 ;; - nto-qnx*) + *-msvc*- ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 + exit 1 ;; - os2-emx) + kfreebsd*-gnu*- | kopensolaris*-gnu*-) + ;; + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) + ;; + nto-qnx*-) + ;; + os2-emx-) + ;; + *-eabi*- | *-gnueabi*-) ;; - *-eabi* | *-gnueabi*) + none--*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format ;; - -*) + -*-) # Blank kernel with real OS is always fine. ;; - *-*) - echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + --*) + # Blank kernel and OS with real machine code file format is always fine. + ;; + *-*-*) + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac @@ -1853,7 +1949,7 @@ case $vendor in ;; esac -echo "$cpu-$vendor-${kernel:+$kernel-}$os" +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: @@ -1862,3 +1958,4 @@ exit # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: + diff --git a/depends/funcs.mk b/depends/funcs.mk index 8891e17082ae..7fb8dfaf2412 100644 --- a/depends/funcs.mk +++ b/depends/funcs.mk @@ -6,7 +6,6 @@ $(1)_objc=$$($$($(1)_type)_OBJC) $(1)_objcxx=$$($$($(1)_type)_OBJCXX) $(1)_ar=$$($$($(1)_type)_AR) $(1)_ranlib=$$($$($(1)_type)_RANLIB) -$(1)_libtool=$$($$($(1)_type)_LIBTOOL) $(1)_nm=$$($$($(1)_type)_NM) $(1)_cflags=$$($$($(1)_type)_CFLAGS) \ $$($$($(1)_type)_$$(release_type)_CFLAGS) @@ -37,8 +36,6 @@ endef define fetch_file ( test -f $$($(1)_source_dir)/$(4) || \ ( $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5)) || \ - (sleep 5 && $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5))) || \ - (sleep 10 && $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5))) || \ $(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(3),$(4),$(5)))) endef @@ -49,9 +46,9 @@ endef define int_get_build_id $(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies)) -$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($($(1)_type)_native_binutils) $($(1)_dependencies))) +$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($(1)_dependencies))) $(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash))) -$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id_string)) +$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id)) $(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))) final_build_id_long+=$($(package)_build_id_long) @@ -69,6 +66,7 @@ $(1)_cached_checksum:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_bui $(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id) $(1)_prefixbin:=$($($(1)_type)_prefix)/bin/ $(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz +$(1)_build_log:=$(BASEDIR)/$(1)-$($(1)_version)-$($(1)_build_id).log $(1)_all_sources=$($(1)_file_name) $($(1)_extra_sources) #stamps @@ -77,7 +75,7 @@ $(1)_extracted=$$($(1)_extract_dir)/.stamp_extracted $(1)_preprocessed=$$($(1)_extract_dir)/.stamp_preprocessed $(1)_cleaned=$$($(1)_extract_dir)/.stamp_cleaned $(1)_built=$$($(1)_build_dir)/.stamp_built -$(1)_configured=$$($(1)_build_dir)/.stamp_configured +$(1)_configured=$(host_prefix)/.$(1)_stamp_configured $(1)_staged=$$($(1)_staging_dir)/.stamp_staged $(1)_postprocessed=$$($(1)_staging_prefix_dir)/.stamp_postprocessed $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path)) @@ -86,11 +84,11 @@ $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path)) #default commands # The default behavior for tar will try to set ownership when running as uid 0 and may not succeed, --no-same-owner disables this behavior $(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash)) -$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --no-same-owner --strip-components=1 -xf $$($(1)_source) -$(1)_preprocess_cmds ?= -$(1)_build_cmds ?= -$(1)_config_cmds ?= -$(1)_stage_cmds ?= +$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_TAR) --no-same-owner --strip-components=1 -xf $$($(1)_source) +$(1)_preprocess_cmds ?= true +$(1)_build_cmds ?= true +$(1)_config_cmds ?= true +$(1)_stage_cmds ?= true $(1)_set_vars ?= @@ -138,11 +136,18 @@ $(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os)) $($(1)_config_env_$( $(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig $(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig +$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/ +$(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake $(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH) $(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH) $(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH) -$(1)_autoconf=./configure --host=$($($(1)_type)_host) --disable-dependency-tracking --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" +# Setting a --build type that differs from --host will explicitly enable +# cross-compilation mode. Note that --build defaults to the output of +# config.guess, which is what we set it too here. This also quells autoconf +# warnings, "If you wanted to set the --build type, don't use --host.", +# when using versions older than 2.70. +$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) --with-pic $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" ifneq ($($(1)_nm),) $(1)_autoconf += NM="$$($(1)_nm)" endif @@ -164,57 +169,91 @@ endif ifneq ($($(1)_ldflags),) $(1)_autoconf += LDFLAGS="$$($(1)_ldflags)" endif + +# We hardcode the library install path to "lib" to match the PKG_CONFIG_PATH +# setting in depends/config.site.in, which also hardcodes "lib". +# Without this setting, CMake by default would use the OS library +# directory, which might be "lib64" or something else, not "lib", on multiarch systems. +$(1)_cmake=env CC="$$($(1)_cc)" \ + CFLAGS="$$($(1)_cppflags) $$($(1)_cflags)" \ + CXX="$$($(1)_cxx)" \ + CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \ + LDFLAGS="$$($(1)_ldflags)" \ + cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" \ + -DCMAKE_AR=`which $$($(1)_ar)` \ + -DCMAKE_NM=`which $$($(1)_nm)` \ + -DCMAKE_RANLIB=`which $$($(1)_ranlib)` \ + -DCMAKE_INSTALL_LIBDIR=lib/ \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=$(V) \ + $$($(1)_config_opts) +ifeq ($($(1)_type),build) +$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib" +else +ifneq ($(host),$(build)) +$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system) +$(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host) +$(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host) +endif +endif endef define int_add_cmds +ifneq ($(LOG),) +$(1)_logging = >>$$($(1)_build_log) 2>&1 || { if test -f $$($(1)_build_log); then cat $$($(1)_build_log); fi; exit 1; } +endif + $($(1)_fetched): - $(AT)mkdir -p $$(@D) $(SOURCES_PATH) - $(AT)rm -f $$@ - $(AT)touch $$@ - $(AT)cd $$(@D); $(call $(1)_fetch_cmds,$(1)) - $(AT)cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);) - $(AT)touch $$@ + mkdir -p $$(@D) $(SOURCES_PATH) + rm -f $$@ + touch $$@ + cd $$(@D); $($(1)_fetch_cmds) + cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);) + touch $$@ $($(1)_extracted): | $($(1)_fetched) - $(AT)echo Extracting $(1)... - $(AT)mkdir -p $$(@D) - $(AT)cd $$(@D); $(call $(1)_extract_cmds,$(1)) - $(AT)touch $$@ + echo Extracting $(1)... + mkdir -p $$(@D) + cd $$(@D); $($(1)_extract_cmds) + touch $$@ $($(1)_preprocessed): | $($(1)_extracted) - $(AT)echo Preprocessing $(1)... - $(AT)mkdir -p $$(@D) $($(1)_patch_dir) - $(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;) - $(AT)cd $$(@D); $(call $(1)_preprocess_cmds, $(1)) - $(AT)touch $$@ + echo Preprocessing $(1)... + mkdir -p $$(@D) $($(1)_patch_dir) + $(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;) + { cd $$(@D); $($(1)_preprocess_cmds); } $$($(1)_logging) + touch $$@ $($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed) - $(AT)echo Configuring $(1)... - $(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar --no-same-owner -xf $($(package)_cached); ) - $(AT)mkdir -p $$(@D) - $(AT)+cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1)) - $(AT)touch $$@ + echo Configuring $(1)... + rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), $(build_TAR) --no-same-owner -xf $($(package)_cached); ) + mkdir -p $$($(1)_build_dir) + +{ cd $$($(1)_build_dir); export $($(1)_config_env); $($(1)_config_cmds); } $$($(1)_logging) + touch $$@ $($(1)_built): | $($(1)_configured) - $(AT)echo Building $(1)... - $(AT)mkdir -p $$(@D) - $(AT)+cd $$(@D); $($(1)_build_env) $(call $(1)_build_cmds, $(1)) - $(AT)touch $$@ + echo Building $(1)... + mkdir -p $$(@D) + +{ cd $$(@D); export $($(1)_build_env); $($(1)_build_cmds); } $$($(1)_logging) + touch $$@ $($(1)_staged): | $($(1)_built) - $(AT)echo Staging $(1)... - $(AT)mkdir -p $($(1)_staging_dir)/$(host_prefix) - $(AT)cd $($(1)_build_dir); $($(1)_stage_env) $(call $(1)_stage_cmds, $(1)) - $(AT)rm -rf $($(1)_extract_dir) - $(AT)touch $$@ + echo Staging $(1)... + mkdir -p $($(1)_staging_dir)/$(host_prefix) + +{ cd $($(1)_build_dir); export $($(1)_stage_env); $($(1)_stage_cmds); } $$($(1)_logging) + rm -rf $($(1)_extract_dir) + touch $$@ $($(1)_postprocessed): | $($(1)_staged) - $(AT)echo Postprocessing $(1)... - $(AT)cd $($(1)_staging_prefix_dir); $(call $(1)_postprocess_cmds) - $(AT)touch $$@ + echo Postprocessing $(1)... + cd $($(1)_staging_prefix_dir); $($(1)_postprocess_cmds) + touch $$@ $($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed) - $(AT)echo Caching $(1)... - $(AT)cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | tar --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T - - $(AT)mkdir -p $$(@D) - $(AT)rm -rf $$(@D) && mkdir -p $$(@D) - $(AT)mv $$($(1)_staging_dir)/$$(@F) $$(@) - $(AT)rm -rf $($(1)_staging_dir) + echo Caching $(1)... + cd $$($(1)_staging_dir)/$(host_prefix); \ + find . ! -name '.stamp_postprocessed' -print0 | TZ=UTC xargs -0r $(build_TOUCH); \ + find . ! -name '.stamp_postprocessed' | LC_ALL=C sort | $(build_TAR) --numeric-owner --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T - + mkdir -p $$(@D) + rm -rf $$(@D) && mkdir -p $$(@D) + mv $$($(1)_staging_dir)/$$(@F) $$(@) + rm -rf $($(1)_staging_dir) + if test -f $($(1)_build_log); then mv $($(1)_build_log) $$(@D); fi $($(1)_cached_checksum): $($(1)_cached) - $(AT)cd $$(@D); $(build_SHA256SUM) $$( $$(@) + cd $$(@D); $(build_SHA256SUM) $$( $$(@) .PHONY: $(1) $(1): | $($(1)_cached_checksum) @@ -244,7 +283,8 @@ $(foreach package,$(packages),$(eval $(package)_type=$(host_arch)_$(host_os))) $(foreach package,$(all_packages),$(eval $(call int_vars,$(package)))) #include package files -$(foreach package,$(all_packages),$(eval include packages/$(package).mk)) +$(foreach native_package,$(native_packages),$(eval include packages/$(native_package).mk)) +$(foreach package,$(packages),$(eval include packages/$(package).mk)) #compute a hash of all files that comprise this package's build recipe $(foreach package,$(all_packages),$(eval $(call int_get_build_recipe_hash,$(package)))) @@ -258,5 +298,3 @@ $(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$ #create build targets $(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package)))) -#special exception: if a toolchain package exists, all non-native packages depend on it -$(foreach package,$(packages),$(eval $($(package)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) )) diff --git a/depends/gen_id b/depends/gen_id new file mode 100644 index 000000000000..d7777a5ec436 --- /dev/null +++ b/depends/gen_id @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +# Usage: env [ CC=... ] [ CXX=... ] [ AR=... ] [ RANLIB=... ] [ STRIP=... ] \ +# [ DEBUG=... ] [ LTO=... ] ./build-id [ID_SALT]... +# +# Prints to stdout a SHA256 hash representing the current toolset, used by +# depends/Makefile as a build id for caching purposes (detecting when the +# toolset has changed and the cache needs to be invalidated). +# +# If the DEBUG environment variable is non-empty and the system has `tee` +# available in its $PATH, the pre-image to the SHA256 hash will be printed to +# stderr. This is to help developers debug caching issues in depends. + +# This script explicitly does not `set -e` because id determination is mostly +# opportunistic: it is fine that things fail, as long as they fail consistently. + +# Command variables (CC/CXX/AR) which can be blank are invoked with `bash -c`, +# because the "command not found" error message printed by shells often include +# the line number, like so: +# +# ./depends/gen_id: line 43: --version: command not found +# +# By invoking with `bash -c`, we ensure that the line number is always 1 + +( + # Redirect stderr to stdout + exec 2>&1 + + echo "BEGIN ALL" + + # Include any ID salts supplied via command line + echo "BEGIN ID SALT" + echo "$@" + echo "END ID SALT" + + # GCC only prints COLLECT_LTO_WRAPPER when invoked with just "-v", but we want + # the information from "-v -E -" as well, so just include both. + echo "BEGIN CC" + bash -c "${CC} -v" + bash -c "${CC} -v -E -xc -o /dev/null - < /dev/null" + bash -c "${CC} -v -E -xobjective-c -o /dev/null - < /dev/null" + echo "END CC" + + echo "BEGIN CXX" + bash -c "${CXX} -v" + bash -c "${CXX} -v -E -xc++ -o /dev/null - < /dev/null" + bash -c "${CXX} -v -E -xobjective-c++ -o /dev/null - < /dev/null" + echo "END CXX" + + echo "BEGIN AR" + bash -c "${AR} --version" + env | grep '^AR_' + echo "END AR" + + echo "BEGIN RANLIB" + bash -c "${RANLIB} --version" + env | grep '^RANLIB_' + echo "END RANLIB" + + echo "BEGIN STRIP" + bash -c "${STRIP} --version" + env | grep '^STRIP_' + echo "END STRIP" + + echo "BEGIN LTO" + echo "LTO=${LTO}" + echo "END LTO" + + echo "END ALL" +) | if [ -n "$DEBUG" ] && command -v tee > /dev/null 2>&1; then + # When debugging and `tee` is available, output the preimage to stderr + # in addition to passing through stdin to stdout + tee >(cat 1>&2) + else + # Otherwise, passthrough stdin to stdout + cat + fi | ${SHA256SUM} - | cut -d' ' -f1 + diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index a50e36110dc0..602187574008 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -50,23 +50,29 @@ darwin_STRIP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-strip") # Disable adhoc codesigning (for now) when using LLVM tooling, to avoid # non-determinism issues with the Identifier field. -darwin_CC=$(clang_prog) --target=$(host) \ - -isysroot$(OSX_SDK) -nostdlibinc \ +darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ + -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ + -u LIBRARY_PATH \ + $(clang_prog) --target=$(host) \ + -isysroot$(OSX_SDK) -nostdlibinc \ -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -darwin_CXX=$(clangxx_prog) --target=$(host) \ - -isysroot$(OSX_SDK) -nostdlibinc \ +darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ + -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ + -u LIBRARY_PATH \ + $(clangxx_prog) --target=$(host) \ + -isysroot$(OSX_SDK) -nostdlibinc \ -iwithsysroot/usr/include/c++/v1 \ -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -darwin_CFLAGS=-pipe -std=$(C_STANDARD) -mmacos-version-min=$(OSX_MIN_VERSION) -darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) -mmacos-version-min=$(OSX_MIN_VERSION) +darwin_CFLAGS=-pipe -std=$(C_STANDARD) -mmacos-version-min=$(OSX_MIN_VERSION) -fPIC +darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) -mmacos-version-min=$(OSX_MIN_VERSION) -fPIC darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) ifneq ($(build_os),darwin) -darwin_CFLAGS += -mlinker-version=$(LLD_VERSION) -darwin_CXXFLAGS += -mlinker-version=$(LLD_VERSION) -darwin_LDFLAGS += -Wl,-no_adhoc_codesign -fuse-ld=lld +darwin_CFLAGS += -mlinker-version=$(LLD_VERSION) -DCLANG_DEFAULT_LINKER=lld +darwin_CXXFLAGS += -mlinker-version=$(LLD_VERSION) -DCLANG_DEFAULT_LINKER=lld +darwin_LDFLAGS += -Wl,-no_adhoc_codesign endif darwin_release_CFLAGS=-O2 @@ -76,3 +82,4 @@ darwin_debug_CFLAGS=-O1 -g darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS) darwin_cmake_system=Darwin + diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk index 258619a9d059..0f2f0dc6c352 100644 --- a/depends/hosts/default.mk +++ b/depends/hosts/default.mk @@ -11,6 +11,7 @@ default_host_LIBTOOL = $(host_toolchain)libtool default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool default_host_OTOOL = $(host_toolchain)otool default_host_NM = $(host_toolchain)nm +default_host_OBJCOPY = $(host_toolchain)objcopy define add_host_tool_func ifneq ($(filter $(origin $1),undefined default),) @@ -29,11 +30,17 @@ host_$1=$$($(host_arch)_$(host_os)_$1) endef define add_host_flags_func +ifeq ($(filter $(origin $1),undefined default),) +$(host_arch)_$(host_os)_$1 = +$(host_arch)_$(host_os)_$(release_type)_$1 = $($1) +else $(host_arch)_$(host_os)_$1 += $($(host_os)_$1) $(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1) +endif host_$1 = $$($(host_arch)_$(host_os)_$1) host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1) endef -$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool)))) +$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOLDSYMUTIL OBJDUMP OBJCOPY,$(eval $(call add_host_tool_func,$(tool)))) $(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags)))) + diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index b16708dabae4..85fa09ccad6b 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -11,7 +11,7 @@ define $(package)_set_vars $(package)_config_opts_release=variant=release $(package)_config_opts_debug=variant=debug $(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam -$(package)_config_opts+=threading=multi link=static -sNO_COMPRESSION=1 +$(package)_config_opts+= threading=multi link=static -sNO_COMPRESSION=1 $(package)_config_opts_linux=target-os=linux threadapi=pthread runtime-link=shared $(package)_config_opts_darwin=target-os=darwin runtime-link=shared $(package)_config_opts_mingw32=target-os=windows binary-format=pe threadapi=win32 runtime-link=static diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk index a98e82ed168b..8ee1cf33e589 100644 --- a/depends/packages/freetype.mk +++ b/depends/packages/freetype.mk @@ -1,8 +1,8 @@ package=freetype -$(package)_version=2.7.1 +$(package)_version=2.13.3 $(package)_download_path=https://download.savannah.gnu.org/releases/$(package) -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88 +$(package)_file_name=$(package)-$($(package)_version).tar.xz +$(package)_sha256_hash=0550350666D427C74DAEB85D5AC7BB353ACBA5F76956395995311A9C6F063289 define $(package)_set_vars $(package)_config_opts=--without-zlib --without-png --without-harfbuzz --without-bzip2 --disable-static diff --git a/depends/packages/gmp.mk b/depends/packages/gmp.mk index bc6e314d1d89..ee0e47f2bcfb 100644 --- a/depends/packages/gmp.mk +++ b/depends/packages/gmp.mk @@ -1,17 +1,24 @@ package=gmp -$(package)_version=6.2.1 -$(package)_download_path=https://gmplib.org/download/gmp +$(package)_version=6.3.0 +$(package)_download_path=https://ftp.gnu.org/gnu/gmp $(package)_file_name=gmp-$($(package)_version).tar.bz2 -$(package)_sha256_hash=eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c +$(package)_sha256_hash=ac28211a7cfb609bae2e2c8d6058d66c8fe96434f740cf6fe2e47b000d1c20cb +$(package)_patches=include_ldflags_in_configure.patch define $(package)_set_vars -$(package)_config_opts+=--enable-cxx --enable-fat --with-pic --disable-shared -$(package)_cflags_armv7l_linux+=-march=armv7-a -$(package)_cflags_aarch64_darwin+=-march=armv8-a +$(package)_config_opts += --disable-shared --enable-cxx --enable-fat +$(package)_cflags_aarch64 += -march=armv8-a +$(package)_cflags_armv7l += -march=armv7-a +$(package)_cflags_x86_64 += -march=x86-64 +LDFLAGS=$(LDFLAGS) -fuse-ld=ld64 +endef + +define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/include_ldflags_in_configure.patch endef define $(package)_config_cmds - $($(package)_autoconf) + LDFLAGS=$(LDFLAGS) $($(package)_autoconf) endef define $(package)_build_cmds @@ -22,3 +29,7 @@ define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef +define $(package)_postprocess_cmds + rm lib/*.la +endef + diff --git a/depends/packages/libdispatch.mk b/depends/packages/libdispatch.mk index 23e17eb803bf..71f86dd970ae 100644 --- a/depends/packages/libdispatch.mk +++ b/depends/packages/libdispatch.mk @@ -1,10 +1,10 @@ package=libdispatch -$(package)_version=137b6cf3060eae87d9b367c263619c2eca5d3aac +$(package)_version=9962e1b5b2f7c53745ec60a88e093544368837d0 $(package)_download_path=https://github.com/swiftlang/swift-corelibs-libdispatch/archive $(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=0F25263ACDB746A81FDB8E7951BD1854D4BECB3F7F1119463A04DB56C7A6FDB0 -$(package)_build_subdir=build -$(package)_dependencies=native_clang cmake +$(package)_sha256_hash=4FFAF43F7E1616E9B3523BA0AD73EF5BC3A5267CE5084C03F7DF41091338DC6D +#$(package)_build_subdir=build +$(package)_dependencies=cmake # When building for Windows, we set _WIN32_WINNT to target the same Windows # version as we do in configure. Due to quirks in libevents build system, this @@ -16,25 +16,36 @@ define $(package)_set_vars # $(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC # $(package)_cppflags += -D_GNU_SOURCE $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601 + newpath:="$(host_prefix)/bin:$($(host_prefix)/native/bin:$(PATH)):" endef define $(package)_preprocess_cmds + pwd endef +# mkdir -p $($(package)_staging_prefix_dir)/include $($(package)_staging_prefix_dir)/lib && \ define $(package)_config_cmds - $($(package)_cmake) -S .. -B . + pwd && \ + echo "host prefix: ${host_prefix}" && \ + echo "config opts: ${${package}_config_opts}" && \ + LDFLAGS="$(LDFLAGS) -fuse-ld=ld " $(host_prefix)/bin/cmake $($(package)_config_opts) && \ + pwd endef define $(package)_build_cmds + pwd && \ $(MAKE) endef define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install + mkdir -p $($(package)_staging_prefix_dir)/native && \ + echo "staging dir: $($(package)_staging_dir)" && \ + $(MAKE) DESTDIR=$($(package)_staging_dir) install && \ + cp -r $($(package)_staging_dir)/usr/local/* $($(package)_staging_prefix_dir)/ endef define $(package)_postprocess_cmds - rm -rf bin && \ - rm include/ev*.h && \ - rm include/event2/*_compat.h endef + +# $(shell export PATH=$(host_prefix)/bin:$(host_prefix)/native/bin:$(PATH)) + diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 5bd12522a7d5..1a8f7933eaec 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -3,28 +3,28 @@ $(package)_version=2.1.12-stable $(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb +$(package)_patches=cmake_fixups.patch +$(package)_patches+=fix_mingw_link.patch +$(package)_build_subdir=build # When building for Windows, we set _WIN32_WINNT to target the same Windows # version as we do in configure. Due to quirks in libevents build system, this # is also required to enable support for ipv6. See #19375. define $(package)_set_vars - $(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples - $(package)_config_opts += --disable-dependency-tracking --enable-option-checking - $(package)_config_opts_release=--disable-debug-mode - $(package)_config_opts_linux=--with-pic - $(package)_config_opts_freebsd=--with-pic - $(package)_config_opts_netbsd=--with-pic - $(package)_config_opts_openbsd=--with-pic - $(package)_config_opts_android=--with-pic + $(package)_config_opts=-DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_OPENSSL=ON + $(package)_config_opts+=-DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_REGRESS=ON + $(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC + $(package)_cppflags += -D_GNU_SOURCE $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601 endef define $(package)_preprocess_cmds - cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux + patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \ + patch -p1 < $($(package)_patch_dir)/fix_mingw_link.patch endef define $(package)_config_cmds - $($(package)_autoconf) + cmake .. endef define $(package)_build_cmds @@ -36,7 +36,8 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm lib/*.la && \ - rm include/ev*.h && \ - rm include/event2/*_compat.h + rm -rf bin endef +# rm include/ev*.h && \ +# rm include/event2/*_compat.h + diff --git a/depends/packages/libnatpmp.mk b/depends/packages/libnatpmp.mk index aac3ec1b253c..a9257e52784b 100644 --- a/depends/packages/libnatpmp.mk +++ b/depends/packages/libnatpmp.mk @@ -9,14 +9,20 @@ define $(package)_set_vars $(package)_build_opts_mingw32=CPPFLAGS=-DNATPMP_STATICLIB $(package)_build_opts_darwin=LIBTOOL="$($(package)_libtool)" $(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)" + CMAKE=$(shell $(SHELL) $(.SHELLFLAGS) "command -v cmake") +endef + +define $(package)_config_cmds + $(CMAKE) -S . -B build endef define $(package)_build_cmds - $(MAKE) libnatpmp.a $($(package)_build_opts) + cd build && \ + $(MAKE) endef define $(package)_stage_cmds - mkdir -p $($(package)_staging_prefix_dir)/include $($(package)_staging_prefix_dir)/lib &&\ - install *.h $($(package)_staging_prefix_dir)/include &&\ - install libnatpmp.a $($(package)_staging_prefix_dir)/lib -endef \ No newline at end of file + mkdir -p $($(package)_staging_prefix_dir)/include $($(package)_staging_prefix_dir)/lib && \ + cp *.h $($(package)_staging_prefix_dir)/include && \ + cp build/libnatpmp.a $($(package)_staging_prefix_dir)/lib +endef diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk index 49a584e462b3..c0f2e73973e9 100644 --- a/depends/packages/miniupnpc.mk +++ b/depends/packages/miniupnpc.mk @@ -1,25 +1,34 @@ package=miniupnpc -$(package)_version=2.0.20180203 +$(package)_version=2.3.2 $(package)_download_path=https://miniupnp.tuxfamily.org/files/ $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=90dda8c7563ca6cd4a83e23b3c66dbbea89603a1675bfdb852897c2c9cc220b7 -$(package)_patches=dont_use_wingen.patch +$(package)_sha256_hash=985DE16D2E5449C3BA0D3663A0C76CB2BFF82472A0EB7A306107D93F44586FFE +#$(package)_patches=dont_use_wingen.patch +$(package)_build_subdir=build + define $(package)_set_vars $(package)_build_opts=CC="$($(package)_cc)" $(package)_build_opts_darwin=LIBTOOL="$($(package)_libtool)" $(package)_build_opts_mingw32=-f Makefile.mingw $(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)" +CMAKE=$(shell $(SHELL) $(.SHELLFLAGS) "command -v cmake") endef define $(package)_preprocess_cmds mkdir dll && \ - sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \ - patch -p1 < $($(package)_patch_dir)/dont_use_wingen.patch + sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h +endef +# patch -p1 < $($(package)_patch_dir)/dont_use_wingen.patch + +define $(package)_config_cmds + pwd && \ + $(CMAKE) -S .. -B . endef define $(package)_build_cmds - $(MAKE) libminiupnpc.a $($(package)_build_opts) + pwd && \ + $(MAKE) $($(package)_build_opts) endef define $(package)_stage_cmds diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index 2e30f9d06d40..3f7423344572 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -4,21 +4,20 @@ $(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=9A836315380F35180F4E8BAE0247ED2DAC899AD5BA8F43879435977099F69E63 $(package)_build_subdir=cctools -$(package)_dependencies=native_libtapi libdispatch +$(package)_dependencies=cmake native_libtapi libdispatch define $(package)_set_vars $(package)_config_opts=--target=$(host) -# $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib + $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib -fuse-ld=ld # ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) - $(package)_config_opts+=--enable-lto-support -# --with-llvm-config=$(build_prefix)/bin/llvm-config + $(package)_config_opts+= --enable-lto-support --with-llvm-config=$(build_prefix)/bin/llvm-config # endif $(package)_cc=$(clang_prog) $(package)_cxx=$(clangxx_prog) endef define $(package)_config_cmds - $($(package)_autoconf) + LDFLAGS="$(LDFLAGS) -fuse-ld=ld " $($(package)_autoconf) --include=$($(package)_staging_dir)/include endef define $(package)_build_cmds diff --git a/depends/packages/native_clang.mk b/depends/packages/native_clang.mk index 85559f47cf2e..043da09d39c1 100644 --- a/depends/packages/native_clang.mk +++ b/depends/packages/native_clang.mk @@ -1,14 +1,15 @@ package=native_clang -$(package)_version=21 -$(package)_download_path=https://github.com/grigzy28/stakecubecoin-bootstrap/releases/download/clang-llvm-$($(package)_version)-ubuntu-22.04-x86_64 +$(package)_version=19.1.7 +$(package)_download_path=https://github.com/grigzy28/stakecubecoin-bootstrap/releases/download/clang-llvm-$($(package)_version)-linux-x86_64 #ifneq (,$(findstring aarch64,$(BUILD))) #$(package)_download_file=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz #$(package)_file_name=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz #$(package)_sha256_hash=90dc69a4758ca15cd0ffa45d07fbf5bf4309d47d2c7745a9f0735ecffde9c31f #else -$(package)_download_file=clang-llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-22.04.tar.gz -$(package)_file_name=clang-llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-22.04.tar.gz -$(package)_sha256_hash=E7728E64292012CA889C00A075112E79454E24314222BC9973958E8DED87BC2E +$(package)_download_file=clang-llvm-$($(package)_version)-linux-x86_64.tar.xz +$(package)_file_name=clang-llvm-$($(package)_version)-linux-x86_64.tar.xz +$(package)_sha256_hash=C971A93975222C23749CAA9CDECF687214736B48ECF56DC7DE02C43FA9F31647 +#1838D698EC9E8CAD71361671B0AAF996B3EE9C0745FB7144B723987CECA35D3E #endif define $(package)_preprocess_cmds @@ -24,7 +25,7 @@ define $(package)_stage_cmds cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ cp bin/llvm-config $($(package)_staging_prefix_dir)/bin/ && \ cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \ - cp -rf lib/clang/$($(package)_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include/ + cp -rf lib/clang/* $($(package)_staging_prefix_dir)/lib/clang/ endef define $(package)_postprocess_cmds diff --git a/depends/packages/native_libtapi.mk b/depends/packages/native_libtapi.mk index 60b898da5f2f..f09870a68a34 100644 --- a/depends/packages/native_libtapi.mk +++ b/depends/packages/native_libtapi.mk @@ -1,16 +1,15 @@ package=native_libtapi -$(package)_version=664b8414f89612f2dfd35a9b679c345aa5389026 +$(package)_version=54c9044082ba35bdb2b0edf282ba1a340096154c $(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive $(package)_download_file=$($(package)_version).tar.gz $(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=62e419c12d1c9fad67cc1cd523132bc00db050998337c734c15bc8d73cc02b61 +$(package)_sha256_hash=E357F007FB61C1F6B0ABC8C5D6B960F9236D55A73E7018441C6C0FA6DF056F07 +#$(package)_patches = add_environment_variable_check.patch -ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -$(package)_dependencies=native_clang -endif define $(package)_build_cmds - CC=$(clang_prog) CXX=$(clangxx_prog) INSTALLPREFIX=$($(package)_staging_prefix_dir) ./build.sh + pwd && \ + CC="$(clang_prog) -fuse-ld=ld " CXX="$(clangxx_prog) -fuse-ld=ld " INSTALLPREFIX=$($(package)_staging_prefix_dir) ./build.sh endef define $(package)_stage_cmds diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index f031b64d0154..a7567b70ec57 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -1,6 +1,6 @@ packages:=boost libevent gmp backtrace cmake -qt_packages = qrencode zlib +qt_packages = qrencode qt_linux_packages:=qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm @@ -23,7 +23,7 @@ ifneq ($(build_os),darwin) darwin_native_packages += native_cctools native_libtapi native_libdmg-hfsplus libdispatch ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -darwin_native_packages+= native_clang +#darwin_native_packages+= native_clang endif endif diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk index 08676ad3a92e..0105b606bd41 100644 --- a/depends/packages/qrencode.mk +++ b/depends/packages/qrencode.mk @@ -1,22 +1,23 @@ -package=qrencode -$(package)_version=3.4.4 +$(package)_version=4.1.1 $(package)_download_path=https://fukuchi.org/works/qrencode/ -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5 +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=da448ed4f52aba6bcb0cd48cac0dd51b8692bccc4cd127431402fca6f8171e8e +$(package)_patches=cmake_fixups.patch define $(package)_set_vars -$(package)_config_opts=--disable-shared --without-tools --without-tests --disable-sdltest -$(package)_config_opts += --disable-gprof --disable-gcov --disable-mudflap -$(package)_config_opts_linux=--with-pic -$(package)_config_opts_android=--with-pic +$(package)_config_opts := -DWITH_TOOLS=NO -DWITH_TESTS=NO -DGPROF=OFF -DCOVERAGE=OFF +$(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE -DWITHOUT_PNG=ON +$(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_ICONV=TRUE +$(package)_cflags += -Wno-int-conversion -Wno-implicit-function-declaration endef define $(package)_preprocess_cmds - cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub use + patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch endef + define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_cmake) -S . -B . endef define $(package)_build_cmds @@ -26,3 +27,8 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm -rf share +endef + diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 79283f0106e9..cd3e41711840 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -138,7 +138,7 @@ ifneq ($(build_os),darwin) $(package)_config_opts_darwin += -xplatform macx-clang-linux $(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK) $(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION) -$(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-" +$(package)_config_opts_darwin += -device-option CROSS_COMPILE="" $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) $(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION) endif diff --git a/depends/packages/zlib.mk b/depends/packages/zlib.mk index 4007e0baddcb..becd54cfe90b 100644 --- a/depends/packages/zlib.mk +++ b/depends/packages/zlib.mk @@ -1,16 +1,16 @@ package=zlib -$(package)_version=1.2.11 +$(package)_version=1.3.1 $(package)_download_path=https://www.zlib.net/fossils/ $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 +$(package)_sha256_hash=9A93B2B7DFDAC77CEBA5A558A580E74667DD6FEDE4585B91EEFB60F03B72DF23 define $(package)_set_vars $(package)_config_opts= CC="$($(package)_cc)" $(package)_config_opts+=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC" $(package)_config_opts+=RANLIB="$($(package)_ranlib)" -$(package)_config_opts+=AR="$($(package)_ar)" -$(package)_config_opts_darwin+=AR="$($(package)_libtool)" -$(package)_config_opts_darwin+=ARFLAGS="-o" +$(package)_config_opts+=AR="$($(pbuild_ar))" +$(package)_config_opts_darwin+=AR="$($(build_ar)" +$(package)_config_opts_darwin+=ARFLAGS="--format=darwin r" $(package)_config_opts_android+=CHOST=$(host) endef diff --git a/depends/patches/gmp/include_ldflags_in_configure.patch b/depends/patches/gmp/include_ldflags_in_configure.patch new file mode 100644 index 000000000000..9efd8fc7e595 --- /dev/null +++ b/depends/patches/gmp/include_ldflags_in_configure.patch @@ -0,0 +1,622 @@ +Use LDFLAGS when configure is compiling test programs. + +Needed for macOS cross-compilation support using lld (ld64.lld) as +a linker, done by including '-fuse-ld=lld' in LDFLAGS. Defining it +in CC or CXX will result in unused argument warnings if the compiler +isn't expected to link files. + +diff --git a/acinclude.m4 b/acinclude.m4 +index 9cf9483..99edd43 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -1752,7 +1752,7 @@ AC_CACHE_CHECK([if globals are prefixed by underscore], + cat >conftest.c <conftest.out + if grep "[[ ]]_gurkmacka" conftest.out >/dev/null; then +@@ -1984,7 +1984,7 @@ const int foo[[]] = {1,2,3}; + EOF + echo "Test program:" >&AC_FD_CC + cat conftest.c >&AC_FD_CC +-gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&AC_FD_CC" ++gmp_compile="$CC $CFLAGS $CPPFLAGS $LDFLAGS -S conftest.c >&AC_FD_CC" + if AC_TRY_EVAL(gmp_compile); then + echo "Compiler output:" >&AC_FD_CC + cat conftest.s >&AC_FD_CC +@@ -2382,7 +2382,7 @@ for tmp_underscore in "" "_"; do + ${tmp_gsym_prefix}main$gmp_cv_asm_label_suffix + addl $ ${tmp_underscore}_GLOBAL_OFFSET_TABLE_, %ebx + EOF +- gmp_compile="$CCAS $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.s >&AC_FD_CC && $CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&AC_FD_CC" ++ gmp_compile="$CCAS $CFLAGS $CPPFLAGS $LDFLAGS $lt_prog_compiler_pic conftest.s >&AC_FD_CC && $CC $CFLAGS $CPPFLAGS $LDFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&AC_FD_CC" + if AC_TRY_EVAL(gmp_compile); then + if test "$tmp_underscore" = "_"; then + gmp_cv_asm_x86_got_underscore=yes +@@ -3019,7 +3019,7 @@ int *bar() { return &foo; } + EOF + echo "Test program:" >&AC_FD_CC + cat conftest.c >&AC_FD_CC +-gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&AC_FD_CC" ++gmp_compile="$CC $CFLAGS $CPPFLAGS $LDFLAGS -S conftest.c >&AC_FD_CC" + if AC_TRY_EVAL(gmp_compile); then + echo "Compiler output:" >&AC_FD_CC + cat conftest.s >&AC_FD_CC +@@ -3164,7 +3164,7 @@ AC_DEFUN([GMP_C_ATTRIBUTE_MALLOC], + [cat >conftest.c </dev/null; then + gmp_cv_c_attribute_malloc=no +@@ -3279,7 +3279,7 @@ int main(){ + return 0; + }] + EOF +-gmp_compile="$CC $CFLAGS $CPPFLAGS conftest.c -o conftest$EXEEXT >&AC_FD_CC 2>&1" ++gmp_compile="$CC $CFLAGS $CPPFLAGS $LDFLAGS conftest.c -o conftest$EXEEXT >&AC_FD_CC 2>&1" + if AC_TRY_EVAL(gmp_compile); then + cat >conftest.awk <<\EOF + [ +diff --git a/configure b/configure +index 7910aa0..15121e2 100755 +--- a/configure ++++ b/configure +@@ -5885,7 +5885,7 @@ for abi in $abilist; do + choke me + #endif + EOF +-gmp_compile="$cc -c conftest.c >&5" ++gmp_compile="$cc $LDFLAGS -c conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -5978,7 +5978,7 @@ if test "$gmp_prog_cc_works" = yes; then + int main () { return 0; } + EOF + echo "Test compile: " >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6032,7 +6032,7 @@ void *f() { return g(); } + int main () { return 0; } + EOF + echo "Test compile: function pointer return" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6088,7 +6088,7 @@ int cmov () { return (n >= 0 ? n : 0); } + int main () { return 0; } + EOF + echo "Test compile: cmov instruction" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6145,7 +6145,7 @@ unsigned long gcc303 () { return (unsigned long) d; } + int main () { return 0; } + EOF + echo "Test compile: double -> ulong conversion" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6200,7 +6200,7 @@ unsigned long fneg () { return -fneg_data; } + int main () { return 0; } + EOF + echo "Test compile: double negation" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6256,7 +6256,7 @@ float ftod () { return (float) ftod_data; } + int main () { return 0; } + EOF + echo "Test compile: double -> float conversion" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6341,7 +6341,7 @@ param_init () + int main () { return 0; } + EOF + echo "Test compile: gnupro alpha ev6 char spilling" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6392,7 +6392,7 @@ if test "$gmp_prog_cc_works" = yes; then + int k; int foo () { __builtin_alloca (k); } + EOF + echo "Test compile: __builtin_alloca availability" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6438,7 +6438,7 @@ int foo () + int main () { return 0; } + EOF + echo "Test compile: alloca array" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6516,7 +6516,7 @@ int f () + int main () { return 0; } + EOF + echo "Test compile: abs int -> double conversion" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6581,7 +6581,7 @@ int dummy; + int main () { return 0; } + EOF + echo "Test compile: long long reliability test 1" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6642,7 +6642,7 @@ int dummy; + int main () { return 0; } + EOF + echo "Test compile: long long reliability test 2" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6703,7 +6703,7 @@ int dummy; + int main () { return 0; } + EOF + echo "Test compile: freebsd hacked gcc" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6802,7 +6802,7 @@ main () + + EOF + echo "Test compile: mpn_lshift_com optimization" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6911,7 +6911,7 @@ main () + + EOF + echo "Test compile: mpn_lshift_com optimization 2" >&5 +- gmp_compile="$cc $cflags $cppflags conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -6970,7 +6970,7 @@ int foo; + int bar () { return foo; } + EOF + tmp_got_emitted=no +-gmp_compile="$cc $cflags $cppflags -fPIC -S conftest.c >&5 2>&1" ++gmp_compile="$cc $cflags $cppflags $LDFLAGS -fPIC -S conftest.c >&5 2>&1" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7044,7 +7044,7 @@ cat >conftest.s <<\EOF + .byte 254, 220, 186, 152, 118, 84, 50, 16 + EOF + tmp_got_good=yes +-gmp_compile="$cc $cflags $cppflags -fPIC -o conftest.o -c conftest.s >&5 2>&1" ++gmp_compile="$cc $cflags $cppflags $LDFLAGS -fPIC -o conftest.o -c conftest.s >&5 2>&1" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7094,7 +7094,7 @@ long long bar () { return foo; } + int main () { return 0; } + EOF + gmp_prog_cc_works=no +-gmp_compile="$cc $cflags $cppflags -c conftest.c >&5" ++gmp_compile="$cc $cflags $cppflags $LDFLAGS -c conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7221,7 +7221,7 @@ result=no + cat >conftest.s <&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7256,7 +7256,7 @@ main () + } + EOF + gmp_c_testlist_sizeof=no +-gmp_compile="$cc $cflags -c conftest.c >&5" ++gmp_compile="$cc $cflags $LDFLAGS -c conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7424,7 +7424,7 @@ _main: + xorl %eax, %eax + ret + EOF +- gmp_compile="$cc $cflags $cppflags conftest.s -o conftest >&5" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.s -o conftest >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7489,7 +7489,7 @@ $as_echo_n "checking compiler $cc $cflags -no-cpp-precomp... " >&6; } + cat >conftest.c <&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7522,7 +7522,7 @@ result=no + cat >conftest.c <&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7553,7 +7553,7 @@ result=no + cat >conftest.c <&5 +-gmp_compile="$cc $cflags $cppflags -c conftest.c >&5 2>&1" ++gmp_compile="$cc $cflags $cppflags $LDFLAGS -c conftest.c >&5 2>&1" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7561,7 +7561,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + test $ac_status = 0; }; then : ; + else + # empty fails +- gmp_compile="$cc $cflags $cppflags -Wa,-oldas -c conftest.c >&5 2>&1" ++ gmp_compile="$cc $cflags $cppflags $LDFLAGS -Wa,-oldas -c conftest.c >&5 2>&1" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7597,7 +7597,7 @@ if test "$gmp_prog_cc_works" = yes; then + int main () { return 0; } + EOF + echo "Test compile: " >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7651,7 +7651,7 @@ void *f() { return g(); } + int main () { return 0; } + EOF + echo "Test compile: function pointer return" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7707,7 +7707,7 @@ int cmov () { return (n >= 0 ? n : 0); } + int main () { return 0; } + EOF + echo "Test compile: cmov instruction" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7764,7 +7764,7 @@ unsigned long gcc303 () { return (unsigned long) d; } + int main () { return 0; } + EOF + echo "Test compile: double -> ulong conversion" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7819,7 +7819,7 @@ unsigned long fneg () { return -fneg_data; } + int main () { return 0; } + EOF + echo "Test compile: double negation" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7875,7 +7875,7 @@ float ftod () { return (float) ftod_data; } + int main () { return 0; } + EOF + echo "Test compile: double -> float conversion" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -7960,7 +7960,7 @@ param_init () + int main () { return 0; } + EOF + echo "Test compile: gnupro alpha ev6 char spilling" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -8011,7 +8011,7 @@ if test "$gmp_prog_cc_works" = yes; then + int k; int foo () { __builtin_alloca (k); } + EOF + echo "Test compile: __builtin_alloca availability" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -8057,7 +8057,7 @@ int foo () + int main () { return 0; } + EOF + echo "Test compile: alloca array" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -8135,7 +8135,7 @@ int f () + int main () { return 0; } + EOF + echo "Test compile: abs int -> double conversion" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -8200,7 +8200,7 @@ int dummy; + int main () { return 0; } + EOF + echo "Test compile: long long reliability test 1" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -8261,7 +8261,7 @@ int dummy; + int main () { return 0; } + EOF + echo "Test compile: long long reliability test 2" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -8322,7 +8322,7 @@ int dummy; + int main () { return 0; } + EOF + echo "Test compile: freebsd hacked gcc" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -8421,7 +8421,7 @@ main () + + EOF + echo "Test compile: mpn_lshift_com optimization" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -8530,7 +8530,7 @@ main () + + EOF + echo "Test compile: mpn_lshift_com optimization 2" >&5 +- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" ++ gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -8589,7 +8589,7 @@ int foo; + int bar () { return foo; } + EOF + tmp_got_emitted=no +-gmp_compile="$cc $cflags $cppflags $flag -fPIC -S conftest.c >&5 2>&1" ++gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS -fPIC -S conftest.c >&5 2>&1" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -8663,7 +8663,7 @@ cat >conftest.s <<\EOF + .byte 254, 220, 186, 152, 118, 84, 50, 16 + EOF + tmp_got_good=yes +-gmp_compile="$cc $cflags $cppflags $flag -fPIC -o conftest.o -c conftest.s >&5 2>&1" ++gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS -fPIC -o conftest.o -c conftest.s >&5 2>&1" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -9974,7 +9974,7 @@ main () + return 0; + } + EOF +-gmp_compile="$HOST_CC conftest.c" ++gmp_compile="$HOST_CC $LDFLAGS conftest.c" + cc_for_build_works=no + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 +@@ -10027,7 +10027,7 @@ else + fi + + else +- for i in "$CC" "$CC $CFLAGS $CPPFLAGS" cc gcc c89 c99; do ++ for i in "$CC" "$CC $CFLAGS $CPPFLAGS $LDFLAGS" cc gcc c89 c99; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $i" >&5 + $as_echo_n "checking build system compiler $i... " >&6; } + # remove anything that might look like compiler output to our "||" expression +@@ -10080,7 +10080,7 @@ else + #define FOO BAR + EOF + echo "Test compile: " >&5 +- gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" ++ gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS conftest.cc >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5 + (eval $gmp_cxxcompile) 2>&5 + ac_status=$? +@@ -10570,7 +10570,7 @@ using namespace foo; + int main (void) { return 0; } + EOF + echo "Test compile: namespace" >&5 +- gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" ++ gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS conftest.cc >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5 + (eval $gmp_cxxcompile) 2>&5 + ac_status=$? +@@ -10616,7 +10616,7 @@ void someoutput (void) { std::cout << 123; } + int main (void) { return 0; } + EOF + echo "Test compile: std iostream" >&5 +- gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" ++ gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS conftest.cc >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5 + (eval $gmp_cxxcompile) 2>&5 + ac_status=$? +@@ -23651,7 +23651,7 @@ else + cat >conftest.c <&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -24421,7 +24421,7 @@ int main(){ + return 0; + } + EOF +-gmp_compile="$CC $CFLAGS $CPPFLAGS conftest.c -o conftest$EXEEXT >&5 2>&1" ++gmp_compile="$CC $CFLAGS $CPPFLAGS $LDFLAGS conftest.c -o conftest$EXEEXT >&5 2>&1" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -25833,7 +25833,7 @@ else + cat >conftest.c <&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -25914,7 +25914,7 @@ const int foo[] = {1,2,3}; + EOF + echo "Test program:" >&5 + cat conftest.c >&5 +-gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&5" ++gmp_compile="$CC $CFLAGS $CPPFLAGS $LDFLAGS -S conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -26580,7 +26580,7 @@ int *bar() { return &foo; } + EOF + echo "Test program:" >&5 + cat conftest.c >&5 +-gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&5" ++gmp_compile="$CC $CFLAGS $CPPFLAGS $LDFLAGS -S conftest.c >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +@@ -27031,7 +27031,7 @@ for tmp_underscore in "" "_"; do + ${tmp_gsym_prefix}main$gmp_cv_asm_label_suffix + addl $ ${tmp_underscore}_GLOBAL_OFFSET_TABLE_, %ebx + EOF +- gmp_compile="$CCAS $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.s >&5 && $CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&5" ++ gmp_compile="$CCAS $CFLAGS $CPPFLAGS $LDFLAGS $lt_prog_compiler_pic conftest.s >&5 && $CC $CFLAGS $CPPFLAGS $LDFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&5" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 + (eval $gmp_compile) 2>&5 + ac_status=$? +diff --git a/configure.ac b/configure.ac +index 082077b..f43e1c1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2272,14 +2272,14 @@ for abi in $abilist; do + instrument) cflags="$cflags -finstrument-functions" ;; + esac + +- GMP_PROG_CC_WORKS($cc $cflags $cppflags,,continue) ++ GMP_PROG_CC_WORKS($cc $cflags $cppflags $LDFLAGS,,continue) + + # If we're supposed to be using a "long long" for a limb, check that + # it works. + eval limb_chosen=\"\$limb$abi1\" + test -n "$limb_chosen" || eval limb_chosen=\"\$limb$abi2\" + if test "$limb_chosen" = longlong; then +- GMP_PROG_CC_WORKS_LONGLONG($cc $cflags $cppflags,,continue) ++ GMP_PROG_CC_WORKS_LONGLONG($cc $cflags $cppflags $LDFLAGS,,continue) + fi + + # The tests to perform on this $cc, if any +@@ -2294,8 +2294,8 @@ for abi in $abilist; do + hpc-hppa-2-0) GMP_HPC_HPPA_2_0($cc,,testlist_pass=no) ;; + gcc-arm-umodsi) GMP_GCC_ARM_UMODSI($cc,,testlist_pass=no) ;; + gcc-mips-o32) GMP_GCC_MIPS_O32($cc,,testlist_pass=no) ;; +- hppa-level-2.0) GMP_HPPA_LEVEL_20($cc $cflags,,testlist_pass=no) ;; +- sizeof*) GMP_C_TEST_SIZEOF($cc $cflags,$tst,,testlist_pass=no) ;; ++ hppa-level-2.0) GMP_HPPA_LEVEL_20($cc $cflags $LDFLAGS,,testlist_pass=no) ;; ++ sizeof*) GMP_C_TEST_SIZEOF($cc $cflags $LDFLAGS,$tst,,testlist_pass=no) ;; + esac + if test $testlist_pass = no; then break; fi + done +@@ -2415,8 +2415,8 @@ if test $found_compiler = yes; then + # pentium4 case. + # + if test "$abi" = 32; then +- GMP_GCC_PENTIUM4_SSE2($cc $cflags $cppflags,, continue) +- GMP_OS_X86_XMM($cc $cflags $cppflags,, continue) ++ GMP_GCC_PENTIUM4_SSE2($cc $cflags $cppflags $LDFLAGS,, continue) ++ GMP_OS_X86_XMM($cc $cflags $cppflags $LDFLAGS,, continue) + fi + ;; + -no-cpp-precomp) +@@ -2429,19 +2429,19 @@ if test $found_compiler = yes; then + -Wa,-m*) + case $host in + alpha*-*-*) +- GMP_GCC_WA_MCPU($cc $cflags, $flag, , [continue]) ++ GMP_GCC_WA_MCPU($cc $cflags $LDFLAGS, $flag, , [continue]) + ;; + esac + ;; + -Wa,-oldas) +- GMP_GCC_WA_OLDAS($cc $cflags $cppflags, ++ GMP_GCC_WA_OLDAS($cc $cflags $cppflags $LDFLAGS, + [cflags="$cflags $flag" + break], + [continue]) + ;; + esac + +- GMP_PROG_CC_WORKS($cc $cflags $cppflags $flag, ++ GMP_PROG_CC_WORKS($cc $cflags $cppflags $flag $LDFLAGS, + [cflags="$cflags $flag" + break]) + done + diff --git a/depends/patches/libdispatch/process_macos_sdk.patch b/depends/patches/libdispatch/process_macos_sdk.patch new file mode 100644 index 000000000000..4679b86a9a09 --- /dev/null +++ b/depends/patches/libdispatch/process_macos_sdk.patch @@ -0,0 +1,11 @@ +Patch + +--- a/src/ ++++ b/libs/filesystem/src/directory.cpp +@@ -272,3 +272,3 @@ +-{ ++{ +- int fd = ::dirfd(static_cast< DIR* >(imp.handle)); ++ int fd = dirfd(static_cast< DIR* >(imp.handle)); + if (BOOST_UNLIKELY(fd < 0)) + diff --git a/depends/patches/libevent/cmake_fixups.patch b/depends/patches/libevent/cmake_fixups.patch new file mode 100644 index 000000000000..d80c1a94898c --- /dev/null +++ b/depends/patches/libevent/cmake_fixups.patch @@ -0,0 +1,35 @@ +cmake: set minimum version to 3.5 + +Fix generated pkg-config files, see +https://github.com/libevent/libevent/pull/1165. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,7 +19,7 @@ + # start libevent.sln + # + +-cmake_minimum_required(VERSION 3.1 FATAL_ERROR) ++cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + + if (POLICY CMP0054) + cmake_policy(SET CMP0054 NEW) +diff --git a/cmake/AddEventLibrary.cmake b/cmake/AddEventLibrary.cmake +index 04f5837e..d8ea42c4 100644 +--- a/cmake/AddEventLibrary.cmake ++++ b/cmake/AddEventLibrary.cmake +@@ -20,12 +20,12 @@ macro(generate_pkgconfig LIB_NAME) + + set(LIBS "") + foreach (LIB ${LIB_PLATFORM}) +- set(LIBS "${LIBS} -L${LIB}") ++ set(LIBS "${LIBS} -l${LIB}") + endforeach() + + set(OPENSSL_LIBS "") + foreach(LIB ${OPENSSL_LIBRARIES}) +- set(OPENSSL_LIBS "${OPENSSL_LIBS} -L${LIB}") ++ set(OPENSSL_LIBS "${OPENSSL_LIBS} -l${LIB}") + endforeach() + + configure_file("lib${LIB_NAME}.pc.in" "lib${LIB_NAME}.pc" @ONLY) diff --git a/depends/patches/libevent/fix_mingw_link.patch b/depends/patches/libevent/fix_mingw_link.patch new file mode 100644 index 000000000000..41cbd463c912 --- /dev/null +++ b/depends/patches/libevent/fix_mingw_link.patch @@ -0,0 +1,25 @@ +commit d108099913c5fdbe518f3f4d711f248f8522bd10 +Author: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> +Date: Mon Apr 22 06:39:35 2024 +0100 + + build: Add `Iphlpapi` to `Libs.private` in `*.pc` files on Windows + + It has been required since https://github.com/libevent/libevent/pull/923 + at least for the `if_nametoindex` call. + + See https://github.com/libevent/libevent/pull/1622. + + +diff --git a/configure.ac b/configure.ac +index d00e063a..cd1fce37 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -906,7 +906,7 @@ if(WIN32) + list(APPEND HDR_PRIVATE WIN32-Code/getopt.h) + + set(EVENT__DNS_USE_FTIME_FOR_ID 1) +- set(LIB_PLATFORM ws2_32 shell32 advapi32) ++ set(LIB_PLATFORM ws2_32 shell32 advapi32 iphlpapi) + add_definitions( + -D_CRT_SECURE_NO_WARNINGS + -D_CRT_NONSTDC_NO_DEPRECATE) diff --git a/depends/patches/qrencode/cmake_fixups.patch b/depends/patches/qrencode/cmake_fixups.patch new file mode 100644 index 000000000000..7518d756cb28 --- /dev/null +++ b/depends/patches/qrencode/cmake_fixups.patch @@ -0,0 +1,23 @@ +cmake: set minimum version to 3.5 + +Correct some dev warning output. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 773e037..a558145 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.1.0) ++cmake_minimum_required(VERSION 3.5) + + project(QRencode VERSION 4.1.1 LANGUAGES C) + +@@ -20,7 +20,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + set(CMAKE_THREAD_PREFER_PTHREAD ON) + find_package(Threads) + find_package(PNG) +-find_package(Iconv) ++find_package(ICONV) + + if(CMAKE_USE_PTHREADS_INIT) + add_definitions(-DHAVE_LIBPTHREAD=1) From cb03382c5c23fc4ec480f42e8a223b907dd8e1d3 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 01:00:28 -0500 Subject: [PATCH 167/401] more updates to deps --- depends/packages/libevent.mk | 17 ++++++++--------- depends/packages/packages.mk | 4 +--- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 1a8f7933eaec..98fb701298be 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -16,6 +16,7 @@ define $(package)_set_vars $(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC $(package)_cppflags += -D_GNU_SOURCE $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601 + CMAKE=$(shell $(SHELL) $(.SHELLFLAGS) "command -v cmake") endef define $(package)_preprocess_cmds @@ -24,20 +25,18 @@ define $(package)_preprocess_cmds endef define $(package)_config_cmds - cmake .. + $(CMAKE) -S .. -B . $($(package)_config_opts) endef define $(package)_build_cmds - $(MAKE) -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install + $(MAKE) DESTDIR=$($(package)_staging_prefix_dir) install endef define $(package)_postprocess_cmds - rm -rf bin + mv usr/local/* . && \ + ls -lsa && pwd && \ + rm include/ev*.h && \ + rm include/event2/*_compat.h && \ + rm -rf bin usr endef -# rm include/ev*.h && \ -# rm include/event2/*_compat.h diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index a7567b70ec57..9b584153e411 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -1,4 +1,4 @@ -packages:=boost libevent gmp backtrace cmake +packages:=boost libevent gmp backtrace cmake bdb qt_packages = qrencode @@ -8,8 +8,6 @@ qt_android_packages=qt qt_darwin_packages=qt qt_mingw32_packages=qt -wallet_packages=bdb - zmq_packages=zeromq upnp_packages=miniupnpc From 98930f152764389f28e95a2ff0158dd275e30e83 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 01:15:05 -0500 Subject: [PATCH 168/401] Updated execution bit --- depends/gen_id | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 depends/gen_id diff --git a/depends/gen_id b/depends/gen_id old mode 100644 new mode 100755 From 0113768a49abc4f9d9ad314cda2dba2897d820cc Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 01:34:11 -0500 Subject: [PATCH 169/401] Update qt.mk --- depends/packages/qt.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index cd3e41711840..b34689559a0f 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -138,7 +138,7 @@ ifneq ($(build_os),darwin) $(package)_config_opts_darwin += -xplatform macx-clang-linux $(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK) $(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION) -$(package)_config_opts_darwin += -device-option CROSS_COMPILE="" +$(package)_config_opts_darwin += -device-option CROSS_COMPILE="llvm" $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) $(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION) endif From c6a72f6710353e1a9a4e6626da70d8b2cd126bca Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 02:01:35 -0500 Subject: [PATCH 170/401] depends qt updates --- depends/packages/qt.mk | 14 ++--- depends/patches/qt/darwin_no_libm.patch | 17 ++++++ .../qt/fast_fixed_dtoa_no_optimize.patch | 20 ------- depends/patches/qt/fix-macos-linker.patch | 55 ------------------- .../patches/qt/fix_android_jni_static.patch | 17 ------ depends/patches/qt/fix_qt_configure.patch | 11 ---- depends/patches/qt/fix_qt_pkgconfig.patch | 11 ---- depends/patches/qt/mac-qmake.conf | 1 + depends/patches/qt/memory_resource.patch | 33 ----------- .../patches/qt/no_warnings_for_symbols.patch | 11 ++++ depends/patches/qt/qt.pro | 4 -- 11 files changed, 35 insertions(+), 159 deletions(-) create mode 100644 depends/patches/qt/darwin_no_libm.patch delete mode 100644 depends/patches/qt/fast_fixed_dtoa_no_optimize.patch delete mode 100644 depends/patches/qt/fix-macos-linker.patch delete mode 100644 depends/patches/qt/fix_android_jni_static.patch delete mode 100644 depends/patches/qt/fix_qt_configure.patch delete mode 100644 depends/patches/qt/fix_qt_pkgconfig.patch create mode 100644 depends/patches/qt/no_warnings_for_symbols.patch diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index b34689559a0f..ecdaca54b03c 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -1,35 +1,33 @@ package=qt -$(package)_version=5.15.14 +$(package)_version=5.15.16 $(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules $(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz $(package)_file_name=qtbase-$($(package)_suffix) -$(package)_sha256_hash=500d3b390048e9538c28b5f523dfea6936f9c2e10d24ab46580ff57d430b98be +$(package)_sha256_hash=b04815058c18058b6ba837206756a2c87d1391f07a0dcb0dd314f970fd041592 $(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm $(package)_qt_libs=corelib network widgets gui plugins testlib $(package)_linguist_tools = lrelease lupdate lconvert $(package)_patches = qt.pro $(package)_patches += qttools_src.pro $(package)_patches += mac-qmake.conf -$(package)_patches += fix_qt_pkgconfig.patch $(package)_patches += no-xlib.patch -$(package)_patches += fix_android_jni_static.patch $(package)_patches += dont_hardcode_pwd.patch $(package)_patches += qtbase-moc-ignore-gcc-macro.patch +$(package)_patches += no_warnings_for_symbols.patch $(package)_patches += rcc_hardcode_timestamp.patch $(package)_patches += duplicate_lcqpafonts.patch $(package)_patches += guix_cross_lib_path.patch -$(package)_patches += fast_fixed_dtoa_no_optimize.patch -$(package)_patches += fix-macos-linker.patch $(package)_patches += memory_resource.patch $(package)_patches += clang_18_libpng.patch $(package)_patches += utc_from_string_no_optimize.patch $(package)_patches += windows_lto.patch +$(package)_patches += darwin_no_libm.patch $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) -$(package)_qttranslations_sha256_hash=5b94d1a11b566908622fcca2f8b799744d2f8a68da20be4caa5953ed63b10489 +$(package)_qttranslations_sha256_hash=415dbbb82a75dfc9a7be969e743bee54c0e6867be37bce4cf8f03da39f20112a $(package)_qttools_file_name=qttools-$($(package)_suffix) -$(package)_qttools_sha256_hash=12061a85baf5f4de8fbc795e1d3872b706f340211b9e70962caeffc6f5e89563 +$(package)_qttools_sha256_hash=1cab11887faca54af59f4995ee435c9ad98d194e9e6889c846692c8b6815fc1c $(package)_extra_sources = $($(package)_qttranslations_file_name) $(package)_extra_sources += $($(package)_qttools_file_name) diff --git a/depends/patches/qt/darwin_no_libm.patch b/depends/patches/qt/darwin_no_libm.patch new file mode 100644 index 000000000000..38a94beeb7a6 --- /dev/null +++ b/depends/patches/qt/darwin_no_libm.patch @@ -0,0 +1,17 @@ +build: remove explicit -lm link from qttools + +This causes issues with at least the macOS cross build, and shouldn't +actually be required anywhere else. GCC with libstdc++ will already get libm. + +--- a/qtbase/src/corelib/tools/tools.pri ++++ b/qtbase/src/corelib/tools/tools.pri +@@ -111,9 +111,6 @@ qtConfig(easingcurve) { + tools/qtimeline.cpp + } + +-# Note: libm should be present by default becaue this is C++ +-unix:!macx-icc:!vxworks:!haiku:!integrity:!wasm: LIBS_PRIVATE += -lm +- + TR_EXCLUDE += ../3rdparty/* + + # MIPS DSP diff --git a/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch b/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch deleted file mode 100644 index d4d6539f56dc..000000000000 --- a/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch +++ /dev/null @@ -1,20 +0,0 @@ -Modify the optimisation flags for FastFixedDtoa. -This fixes a non-determinism issue in the asm produced for -this function when cross-compiling on x86_64 and aarch64 for -the arm-linux-gnueabihf HOST. - ---- a/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h -+++ b/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h -@@ -48,9 +48,12 @@ namespace double_conversion { - // - // This method only works for some parameters. If it can't handle the input it - // returns false. The output is null-terminated when the function succeeds. -+#pragma GCC push_options -+#pragma GCC optimize ("-O1") - bool FastFixedDtoa(double v, int fractional_count, - Vector buffer, int* length, int* decimal_point); - -+#pragma GCC pop_options - } // namespace double_conversion - - #endif // DOUBLE_CONVERSION_FIXED_DTOA_H_ diff --git a/depends/patches/qt/fix-macos-linker.patch b/depends/patches/qt/fix-macos-linker.patch deleted file mode 100644 index e43968565655..000000000000 --- a/depends/patches/qt/fix-macos-linker.patch +++ /dev/null @@ -1,55 +0,0 @@ -qmake: Don't error out if QMAKE_DEFAULT_LIBDIRS is empty on macOS - -The new linker in Xcode 15 doesn't provide any default linker or -framework paths when requested via -v, but still seems to use the -default paths documented in the ld man page. - -We trust that linker will do the right thing, even if we don't -know of its default linker paths. - -We also need to opt out of the default fallback logic to -set the libdirs to /lib and /usr/lib. - -This may result in UnixMakefileGenerator::findLibraries finding -different libraries than expected, if additional paths are -passed with -L, which will then take precedence for qmake, -even if the linker itself will use the library from the -SDK's default paths. This should hopefully not be an issue -in practice, as we don't turn -lFoo into absolute paths in -qmake, so the only risk is that we're picking up the wrong -prl files and adding additional dependencies that the lib -in the SDK doesn't have. - -Upstream commits: - - Qt 5.15.16: Not yet publicly available. - - Qt dev: cdf64b0e47115cc473e1afd1472b4b09e130b2a5 - -For other Qt branches see -https://codereview.qt-project.org/q/I2347b26e2df0828471373b0e15b8c9089274c65d - ---- old/qtbase/mkspecs/features/toolchain.prf -+++ new/qtbase/mkspecs/features/toolchain.prf -@@ -288,9 +288,12 @@ isEmpty($${target_prefix}.INCDIRS) { - } - } - } -- isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \ -+ isEmpty(QMAKE_DEFAULT_INCDIRS): \ - !integrity: \ -- error("failed to parse default search paths from compiler output") -+ error("failed to parse default include paths from compiler output") -+ isEmpty(QMAKE_DEFAULT_LIBDIRS): \ -+ !integrity:!darwin: \ -+ error("failed to parse default library paths from compiler output") - QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS) - } else: ghs { - cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp -@@ -412,7 +415,7 @@ isEmpty($${target_prefix}.INCDIRS) { - QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP) - } - -- unix:if(!cross_compile|host_build) { -+ unix:!darwin:if(!cross_compile|host_build) { - isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include - isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib - } diff --git a/depends/patches/qt/fix_android_jni_static.patch b/depends/patches/qt/fix_android_jni_static.patch deleted file mode 100644 index 79824f244aa5..000000000000 --- a/depends/patches/qt/fix_android_jni_static.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- old/qtbase/src/plugins/platforms/android/androidjnimain.cpp -+++ new/qtbase/src/plugins/platforms/android/androidjnimain.cpp -@@ -979,6 +979,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/) - __android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed"); - return -1; - } -+ -+ const jint ret = QT_PREPEND_NAMESPACE(QtAndroidPrivate::initJNI(vm, env)); -+ if (ret != 0) -+ { -+ __android_log_print(ANDROID_LOG_FATAL, "Qt", "initJNI failed"); -+ return ret; -+ } -+ - QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false); - - m_javaVM = vm; diff --git a/depends/patches/qt/fix_qt_configure.patch b/depends/patches/qt/fix_qt_configure.patch deleted file mode 100644 index 3466a6c24d79..000000000000 --- a/depends/patches/qt/fix_qt_configure.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- old/qtbase/configure -+++ new/qtbase/configure -@@ -2846,7 +2846,7 @@ - # with the system. We use 'xcrun' to check the clang version that's part of - # the Xcode installation. - XCRUN=`/usr/bin/xcrun -sdk macosx clang -v 2>&1` -- CLANGVERSION=`echo "$XCRUN" | sed -n 's/.*version \([0-9]\).*/\1/p'` -+ CLANGVERSION=`echo "$XCRUN" | sed -n 's/.*version \([0-9]*\).*/\1/p'` - expr "$CLANGVERSION" : '[0-9]' > /dev/null || { echo "Unable to determine CLANG version from output of xcrun: $XCRUN" ; exit 2 ; } - if [ "$CLANGVERSION" -ge 3 ]; then - PLATFORM=macx-clang diff --git a/depends/patches/qt/fix_qt_pkgconfig.patch b/depends/patches/qt/fix_qt_pkgconfig.patch deleted file mode 100644 index 73f4d89f7354..000000000000 --- a/depends/patches/qt/fix_qt_pkgconfig.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- old/qtbase/mkspecs/features/qt_module.prf -+++ new/qtbase/mkspecs/features/qt_module.prf -@@ -269,7 +269,7 @@ load(qt_installs) - load(qt_targets) - - # this builds on top of qt_common --!internal_module:if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { -+if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { - CONFIG += create_pc - QMAKE_PKGCONFIG_DESTDIR = pkgconfig - host_build: \ diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf index cb94bf07b42d..a29db20004bb 100644 --- a/depends/patches/qt/mac-qmake.conf +++ b/depends/patches/qt/mac-qmake.conf @@ -13,6 +13,7 @@ QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH} QMAKE_MAC_SDK.macosx.platform_name = macosx QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION} QMAKE_MAC_SDK.macosx.PlatformPath = /phony +QMAKE_CXXFLAGS += -fuse-ld=lld !host_build: QMAKE_CFLAGS += -target $${MAC_TARGET} !host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS !host_build: QMAKE_CXXFLAGS += -target $${MAC_TARGET} diff --git a/depends/patches/qt/memory_resource.patch b/depends/patches/qt/memory_resource.patch index 312f0669f631..14e25121c00a 100644 --- a/depends/patches/qt/memory_resource.patch +++ b/depends/patches/qt/memory_resource.patch @@ -14,36 +14,3 @@ and https://bugreports.qt.io/browse/QTBUG-114316 # include # include #else - ---- a/qtbase/src/corelib/global/qcompilerdetection.h -+++ b/qtbase/src/corelib/global/qcompilerdetection.h -@@ -1055,16 +1055,22 @@ - # endif // !_HAS_CONSTEXPR - # endif // !__GLIBCXX__ && !_LIBCPP_VERSION - # endif // Q_OS_QNX --# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \ -- && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) -+# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) -+# if defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) - // Apple has not updated libstdc++ since 2007, which means it does not have - // or std::move. Let's disable these features --# undef Q_COMPILER_INITIALIZER_LISTS --# undef Q_COMPILER_RVALUE_REFS --# undef Q_COMPILER_REF_QUALIFIERS -+# undef Q_COMPILER_INITIALIZER_LISTS -+# undef Q_COMPILER_RVALUE_REFS -+# undef Q_COMPILER_REF_QUALIFIERS - // Also disable , since it's clearly not there --# undef Q_COMPILER_ATOMICS --# endif -+# undef Q_COMPILER_ATOMICS -+# endif -+# if defined(__cpp_lib_memory_resource) \ -+ && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000) \ -+ || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 170000)) -+# undef __cpp_lib_memory_resource // Only supported on macOS 14 and iOS 17 -+# endif -+# endif // (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) - # if defined(Q_CC_CLANG) && defined(Q_CC_INTEL) && Q_CC_INTEL >= 1500 - // ICC 15.x and 16.0 have their own implementation of std::atomic, which is activated when in Clang mode - // (probably because libc++'s on OS X failed to compile), but they're missing some diff --git a/depends/patches/qt/no_warnings_for_symbols.patch b/depends/patches/qt/no_warnings_for_symbols.patch new file mode 100644 index 000000000000..11cdc599ed3d --- /dev/null +++ b/depends/patches/qt/no_warnings_for_symbols.patch @@ -0,0 +1,11 @@ +--- a/qtbase/mkspecs/features/mac/no_warn_empty_obj_files.prf ++++ b/qtbase/mkspecs/features/mac/no_warn_empty_obj_files.prf +@@ -1,7 +1,7 @@ + # Prevent warnings about object files without any symbols. This is a common + # thing in Qt as we tend to build files unconditionally, and then use ifdefs + # to compile out parts that are not relevant. +-QMAKE_RANLIB += -no_warning_for_no_symbols ++# QMAKE_RANLIB += -no_warning_for_no_symbols + + # We have to tell 'ar' to not run ranlib by itself + QMAKE_AR += -S diff --git a/depends/patches/qt/qt.pro b/depends/patches/qt/qt.pro index 8f2e900a840f..6d8b7fdb6a2c 100644 --- a/depends/patches/qt/qt.pro +++ b/depends/patches/qt/qt.pro @@ -3,10 +3,6 @@ cache(, super) !QTDIR_build: cache(CONFIG, add, $$list(QTDIR_build)) -prl = no_install_prl -CONFIG += $$prl -cache(CONFIG, add stash, prl) - TEMPLATE = subdirs SUBDIRS = qtbase qttools qttranslations From f3060e0dbc84c6d851f817adabc1a834caa8b1e2 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 02:32:18 -0500 Subject: [PATCH 171/401] Update qt.mk --- depends/packages/qt.mk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index ecdaca54b03c..02de086f2a8f 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -233,20 +233,18 @@ endef define $(package)_preprocess_cmds cp $($(package)_patch_dir)/qt.pro qt.pro && \ cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \ - patch -p1 -i $($(package)_patch_dir)/fix-macos-linker.patch && \ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \ patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \ patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \ + patch -p1 -i $($(package)_patch_dir)/no_warnings_for_symbols.patch && \ patch -p1 -i $($(package)_patch_dir)/clang_18_libpng.patch && \ patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \ patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \ - patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \ patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \ patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \ + patch -p1 -i $($(package)_patch_dir)/darwin_no_libm.patch && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \ From 8d38b9060a0aa5992d95622b8d0cc7e111293451 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 02:34:33 -0500 Subject: [PATCH 172/401] Update qt.mk --- depends/packages/qt.mk | 54 +++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 02de086f2a8f..d41ac4e784eb 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -39,7 +39,7 @@ $(package)_config_opts_release += -silent $(package)_config_opts_debug = -debug $(package)_config_opts_debug += -optimized-tools $(package)_config_opts += -bindir $(build_prefix)/bin -$(package)_config_opts += -c++std c++17 +$(package)_config_opts += -c++std c++2a $(package)_config_opts += -confirm-license $(package)_config_opts += -hostprefix $(build_prefix) $(package)_config_opts += -no-compile-examples @@ -61,6 +61,7 @@ $(package)_config_opts += -no-mimetype-database $(package)_config_opts += -no-mtdev $(package)_config_opts += -no-openssl $(package)_config_opts += -no-openvg +$(package)_config_opts += -no-pkg-config $(package)_config_opts += -no-reduce-relocations $(package)_config_opts += -no-schannel $(package)_config_opts += -no-sctp @@ -81,7 +82,6 @@ $(package)_config_opts += -nomake examples $(package)_config_opts += -nomake tests $(package)_config_opts += -nomake tools $(package)_config_opts += -opensource -$(package)_config_opts += -pkg-config $(package)_config_opts += -prefix $(host_prefix) $(package)_config_opts += -qt-libpng $(package)_config_opts += -qt-pcre @@ -117,6 +117,7 @@ $(package)_config_opts += -no-feature-textbrowser $(package)_config_opts += -no-feature-textmarkdownwriter $(package)_config_opts += -no-feature-textodfwriter $(package)_config_opts += -no-feature-topleveldomain +$(package)_config_opts += -no-feature-udpsocket $(package)_config_opts += -no-feature-undocommand $(package)_config_opts += -no-feature-undogroup $(package)_config_opts += -no-feature-undostack @@ -136,7 +137,7 @@ ifneq ($(build_os),darwin) $(package)_config_opts_darwin += -xplatform macx-clang-linux $(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK) $(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION) -$(package)_config_opts_darwin += -device-option CROSS_COMPILE="llvm" +$(package)_config_opts_darwin += -device-option CROSS_COMPILE="llvm-" $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) $(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION) endif @@ -157,9 +158,15 @@ $(package)_config_opts_linux += -dbus-runtime ifneq ($(LTO),) $(package)_config_opts_linux += -ltcg endif -$(package)_config_opts_linux += -platform linux-g++ -xplatform bitcoin-linux-g++ -ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx))) -$(package)_config_opts_x86_64_linux = -xplatform linux-clang-libc++ + +ifneq (,$(findstring clang,$($(package)_cxx))) + ifneq (,$(findstring -stdlib=libc++,$($(package)_cxx))) + $(package)_config_opts_linux += -platform linux-clang-libc++ -xplatform linux-clang-libc++ + else + $(package)_config_opts_linux += -platform linux-clang -xplatform linux-clang + endif +else + $(package)_config_opts_linux += -platform linux-g++ -xplatform bitcoin-linux-g++ endif $(package)_config_opts_mingw32 = -no-opengl @@ -177,25 +184,6 @@ $(package)_config_opts_mingw32 += -pch ifneq ($(LTO),) $(package)_config_opts_mingw32 += -ltcg endif - -$(package)_config_opts_android = -xplatform android-clang -$(package)_config_opts_android += -android-sdk $(ANDROID_SDK) -$(package)_config_opts_android += -android-ndk $(ANDROID_NDK) -$(package)_config_opts_android += -android-ndk-platform android-$(ANDROID_API_LEVEL) -$(package)_config_opts_android += -egl -$(package)_config_opts_android += -qpa xcb -$(package)_config_opts_android += -no-dbus -$(package)_config_opts_android += -opengl es2 -$(package)_config_opts_android += -qt-freetype -$(package)_config_opts_android += -no-fontconfig -$(package)_config_opts_android += -L $(host_prefix)/lib -$(package)_config_opts_android += -I $(host_prefix)/include -$(package)_config_opts_android += -pch -$(package)_config_opts_android += -no-feature-vulkan - -$(package)_config_opts_aarch64_android += -android-arch arm64-v8a -$(package)_config_opts_armv7a_android += -android-arch armeabi-v7a -$(package)_config_opts_x86_64_android += -android-arch x86_64 endef define $(package)_fetch_cmds @@ -263,26 +251,22 @@ define $(package)_preprocess_cmds endef define $(package)_config_cmds - export PKG_CONFIG_SYSROOT_DIR=/ && \ - export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \ - export QT_MAC_SDK_NO_VERSION_CHECK=1 && \ cd qtbase && \ - ./configure -top-level $($(package)_config_opts) && \ - echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \ - cd .. + ./configure -top-level $($(package)_config_opts) endef define $(package)_build_cmds $(MAKE) endef +# TODO: Investigate whether specific targets can be used here to minimize the amount of files/components installed. define $(package)_stage_cmds - $(MAKE) -C qtbase/src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && \ - $(MAKE) -C qttools/src/linguist INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_linguist_tools))) && \ + $(MAKE) -C qtbase INSTALL_ROOT=$($(package)_staging_dir) install && \ + $(MAKE) -C qttools INSTALL_ROOT=$($(package)_staging_dir) install && \ $(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets endef define $(package)_postprocess_cmds - rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \ - rm -f lib/lib*.la + rm -rf doc/ native/lib/ lib/pkgconfig/ && \ + rm -f lib/lib*.la lib/Qt5*.la endef From b48d467b2aeb32689999fdef2b1cb0bd3f2686a1 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 02:46:23 -0500 Subject: [PATCH 173/401] Update qt.mk --- depends/packages/qt.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index d41ac4e784eb..81bab8a501a2 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -61,7 +61,7 @@ $(package)_config_opts += -no-mimetype-database $(package)_config_opts += -no-mtdev $(package)_config_opts += -no-openssl $(package)_config_opts += -no-openvg -$(package)_config_opts += -no-pkg-config +#$(package)_config_opts += -no-pkg-config $(package)_config_opts += -no-reduce-relocations $(package)_config_opts += -no-schannel $(package)_config_opts += -no-sctp From 9b7639ff0d6025bfebe50c53320f3c3841848ac8 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 02:55:30 -0500 Subject: [PATCH 174/401] Update qt.mk --- depends/packages/qt.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 81bab8a501a2..490581786962 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -61,7 +61,7 @@ $(package)_config_opts += -no-mimetype-database $(package)_config_opts += -no-mtdev $(package)_config_opts += -no-openssl $(package)_config_opts += -no-openvg -#$(package)_config_opts += -no-pkg-config +$(package)_config_opts += -pkg-config $(package)_config_opts += -no-reduce-relocations $(package)_config_opts += -no-schannel $(package)_config_opts += -no-sctp From 1bf2b99f3364f1f80e59a49e6b0de813e117e80f Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 03:13:17 -0500 Subject: [PATCH 175/401] Update qt.mk --- depends/packages/qt.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 490581786962..c0a78a4e2281 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -267,6 +267,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm -rf doc/ native/lib/ lib/pkgconfig/ && \ - rm -f lib/lib*.la lib/Qt5*.la + rm -rf doc/ endef From f0610f8c873c82df7a878f5f720aa0e31679c146 Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 07:04:43 -0500 Subject: [PATCH 176/401] update qt --- depends/packages/qt.mk | 5 +++++ depends/patches/qt/fix_qt_pkgconfig.patch | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 depends/patches/qt/fix_qt_pkgconfig.patch diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index c0a78a4e2281..b521dab4c22f 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -11,6 +11,7 @@ $(package)_patches = qt.pro $(package)_patches += qttools_src.pro $(package)_patches += mac-qmake.conf $(package)_patches += no-xlib.patch +$(package)_patches += fix_qt_pkgconfig.patch $(package)_patches += dont_hardcode_pwd.patch $(package)_patches += qtbase-moc-ignore-gcc-macro.patch $(package)_patches += no_warnings_for_symbols.patch @@ -221,6 +222,7 @@ endef define $(package)_preprocess_cmds cp $($(package)_patch_dir)/qt.pro qt.pro && \ cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \ + patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \ patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \ patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ @@ -251,6 +253,9 @@ define $(package)_preprocess_cmds endef define $(package)_config_cmds + export PKG_CONFIG_SYSROOT_DIR=/ && \ + export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \ + export QT_MAC_SDK_NO_VERSION_CHECK=1 && \ cd qtbase && \ ./configure -top-level $($(package)_config_opts) endef diff --git a/depends/patches/qt/fix_qt_pkgconfig.patch b/depends/patches/qt/fix_qt_pkgconfig.patch new file mode 100644 index 000000000000..73f4d89f7354 --- /dev/null +++ b/depends/patches/qt/fix_qt_pkgconfig.patch @@ -0,0 +1,11 @@ +--- old/qtbase/mkspecs/features/qt_module.prf ++++ new/qtbase/mkspecs/features/qt_module.prf +@@ -269,7 +269,7 @@ load(qt_installs) + load(qt_targets) + + # this builds on top of qt_common +-!internal_module:if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { ++if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { + CONFIG += create_pc + QMAKE_PKGCONFIG_DESTDIR = pkgconfig + host_build: \ From 10662fc33b05c65ae10340f0892bc639e9192f4f Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 10:09:06 -0500 Subject: [PATCH 177/401] Update Makefile.am --- src/Makefile.am | 69 ++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 5a850e0e0ee9..b91bc4f6589b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,7 +8,7 @@ DIST_SUBDIRS = secp256k1 univalue dashbls AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS) AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS) AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS) -AM_LIBTOOLFLAGS = --preserve-dup-deps +AM_LIBTOOLFLAGS = --preserve-dup-deps --verbose EXTRA_LIBRARIES = if ENABLE_STACKTRACES @@ -42,11 +42,12 @@ endif BITCOIN_INCLUDES=-I$(builddir) $(BDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) -BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include +BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include -I$(srcdir)/univalue/include +BITCOIN_INCLUDES += -isystem$(srcdir)/dashbls/include -isystem$(srcdir)/dashbls/depends/relic/include -isystem$(srcdir)/dashbls/depends/minialloc/include BITCOIN_INCLUDES += $(UNIVALUE_CFLAGS) BITCOIN_INCLUDES += -I$(srcdir)/immer -BLS_LIBS=-ldashbls -lrelic_s +BLS_LIBS=-lbls-dash -lrelic_s LIBBITCOIN_SERVER=libscc_server.a LIBBITCOIN_COMMON=libscc_common.a @@ -55,6 +56,7 @@ LIBBITCOIN_CLI=libscc_cli.a LIBBITCOIN_UTIL=libscc_util.a LIBBITCOIN_CRYPTO_BASE=crypto/libscc_crypto_base.a LIBBITCOINQT=qt/libsccqt.a +LIBDASHBLS=dashbls/libdashbls.la LIBSECP256K1=secp256k1/libsecp256k1.la if ENABLE_ZMQ @@ -86,6 +88,9 @@ LIBBITCOIN_CRYPTO_ARM_SHANI = crypto/libscc_crypto_arm_shani.a LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_ARM_SHANI) endif +$(LIBDASHBLS): + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) + $(LIBSECP256K1): $(wildcard secp256k1/src/*.h) $(wildcard secp256k1/src/*.c) $(wildcard secp256k1/include/*) $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) @@ -164,6 +169,7 @@ BITCOIN_CORE_H = \ compat/sanity.h \ compressor.h \ consensus/consensus.h \ + consensus/params.h \ consensus/tx_check.h \ consensus/tx_verify.h \ core_io.h \ @@ -664,6 +670,7 @@ libscc_consensus_a_SOURCES = \ util/strencodings.h \ version.h + # common: shared between sccd, and scc-qt and non-server tools libscc_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) libscc_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) @@ -766,6 +773,26 @@ libscc_cli_a_SOURCES = \ nodist_libscc_util_a_SOURCES = $(srcdir)/obj/build.h # +# sccconsensus library # +if BUILD_BITCOIN_LIBS +include_HEADERS = script/sccconsensus.h +libsccconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libscc_crypto_base_a_SOURCES) $(libscc_consensus_a_SOURCES) + +if GLIBC_BACK_COMPAT + libsccconsensus_la_SOURCES += compat/glibc_compat.cpp +endif + +libsccconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS) +# $(LIBTOOL_APP_LDFLAGS) +libsccconsensus_la_LIBADD = $(LIBDASHBLS) $(LIBSECP256K1) $(GMP_LIBS) $(BOOST_LIBS) +libsccconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -I$(srcdir)/univalue/include -DBUILD_BITCOIN_INTERNAL +libsccconsensus_la_CPPFLAGS += -isystem$(srcdir)/dashbls/include -isystem$(srcdir)/dashbls/depends/relic/include -isystem$(srcdir)/dashbls/depends/minialloc/include +libsccconsensus_la_CPPFLAGS += -I$(srcdir)/immer +libsccconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) + +endif +# + # sccd binary # sccd_SOURCES = sccd.cpp sccd_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) @@ -788,12 +815,13 @@ sccd_LDADD = \ $(LIBBITCOIN_ZMQ) \ $(LIBBITCOIN_CONSENSUS) \ $(LIBBITCOIN_CRYPTO) \ + $(LIBDASHBLS) \ $(LIBLEVELDB) \ $(LIBLEVELDB_SSE42) \ $(LIBMEMENV) \ $(LIBSECP256K1) -sccd_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS) $(BLS_LIBS) $(GMP_LIBS) +sccd_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS) $(LIBDASHBLS) $(GMP_LIBS) # scc-cli binary # scc_cli_SOURCES = scc-cli.cpp @@ -810,7 +838,7 @@ scc_cli_LDADD = \ $(LIBUNIVALUE) \ $(LIBBITCOIN_UTIL) \ $(LIBBITCOIN_CRYPTO) -scc_cli_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(EVENT_LIBS) $(BLS_LIBS) $(GMP_LIBS) +scc_cli_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(EVENT_LIBS) $(LIBDASHBLS) $(GMP_LIBS) # # scc-tx binary # @@ -829,9 +857,10 @@ scc_tx_LDADD = \ $(LIBBITCOIN_UTIL) \ $(LIBBITCOIN_CONSENSUS) \ $(LIBBITCOIN_CRYPTO) \ + $(LIBDASHBLS) \ $(LIBSECP256K1) -scc_tx_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(BLS_LIBS) $(GMP_LIBS) +scc_tx_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(LIBDASHBLS) $(GMP_LIBS) # # scc-wallet binary # @@ -862,25 +891,7 @@ scc_wallet_LDADD = \ $(LIBSECP256K1) \ $(LIBUNIVALUE) -scc_wallet_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(BDB_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(ZMQ_LIBS) $(BLS_LIBS) $(GMP_LIBS) -# - -# sccconsensus library # -if BUILD_BITCOIN_LIBS -include_HEADERS = script/sccconsensus.h -libsccconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libscc_crypto_base_a_SOURCES) $(libscc_consensus_a_SOURCES) - -if GLIBC_BACK_COMPAT - libsccconsensus_la_SOURCES += compat/glibc_compat.cpp -endif - -libsccconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS) $(LIBTOOL_APP_LDFLAGS) -libsccconsensus_la_LIBADD = $(LIBSECP256K1) $(BLS_LIBS) $(GMP_LIBS) $(BOOST_LIBS) -libsccconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL -libsccconsensus_la_CPPFLAGS += -I$(srcdir)/immer -libsccconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) - -endif +scc_wallet_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(BDB_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(ZMQ_LIBS) $(LIBDASHBLS) $(GMP_LIBS) # CTAES_DIST = crypto/ctaes/bench.c @@ -912,7 +923,12 @@ CLEANFILES += zmq/*.gcda zmq/*.gcno CLEANFILES += obj/build.h IMMER_DIST = immer/immer -EXTRA_DIST = $(CTAES_DIST) $(IMMER_DIST) +LIBDASHBLS_DIST = dashbls + +EXTRA_DIST = \ + $(CTAES_DIST) \ + $(IMMER_DIST) \ + $(LIBDASHBLS_DIST) config/scc-config.h: config/stamp-h1 @$(MAKE) -C $(top_builddir) $(subdir)/$(@) @@ -923,6 +939,7 @@ $(top_srcdir)/$(subdir)/config/scc-config.h.in: $(am__configure_deps) clean-local: + -$(MAKE) -C dashbls clean -$(MAKE) -C secp256k1 clean -$(MAKE) -C univalue clean -rm -f leveldb/*/*.gcda leveldb/*/*.gcno leveldb/helpers/memenv/*.gcda leveldb/helpers/memenv/*.gcno From d16a3a3fbb4c365a09f2fc4fb7720bec3d9d898c Mon Sep 17 00:00:00 2001 From: grigzy28 <30666305+grigzy28@users.noreply.github.com> Date: Mon, 24 Mar 2025 10:19:22 -0500 Subject: [PATCH 178/401] migrate bls-dash migrate bls-dash from depends to main src folder --- src/dashbls/.clang-format | 17 + src/dashbls/.flake8 | 4 + src/dashbls/.github/workflows/build-binds.yml | 84 + src/dashbls/.github/workflows/build-test.yaml | 72 + .../.github/workflows/build-wheels.yml | 357 + src/dashbls/.github/workflows/js-bindings.yml | 60 + .../.github/workflows/relic-nightly.yml | 78 + src/dashbls/.github/workflows/stale-issue.yml | 35 + src/dashbls/.gitignore | 117 + src/dashbls/CMakeLists.txt | 150 + src/dashbls/LICENSE | 177 + src/dashbls/MANIFEST.in | 6 + src/dashbls/Makefile.am | 39 + src/dashbls/Makefile.bench.include | 22 + src/dashbls/Makefile.bls.include | 66 + src/dashbls/Makefile.mimalloc.include | 44 + src/dashbls/Makefile.relic.include | 470 + src/dashbls/Makefile.test.include | 27 + src/dashbls/README.md | 299 + src/dashbls/apple.rust.deps.sh | 374 + src/dashbls/autogen.sh | 12 + .../build-aux/m4/ax_check_compile_flag.m4 | 53 + .../build-aux/m4/ax_check_link_flag.m4 | 53 + .../build-aux/m4/ax_cxx_compile_stdcxx.m4 | 1005 + src/dashbls/build-aux/m4/ax_pthread.m4 | 522 + src/dashbls/cmake_modules/BrewHelper.cmake | 21 + src/dashbls/cmake_modules/Findgmp.cmake | 103 + src/dashbls/cmake_modules/Findsodium.cmake | 294 + src/dashbls/configure.ac | 919 + src/dashbls/depends/catch2/CMakeLists.txt | 37 + .../depends/catch2/include/catch2/catch.hpp | 17976 ++++++++++++++++ src/dashbls/depends/mimalloc/.gitattributes | 12 + src/dashbls/depends/mimalloc/.gitignore | 9 + src/dashbls/depends/mimalloc/CMakeLists.txt | 463 + src/dashbls/depends/mimalloc/LICENSE | 21 + .../depends/mimalloc/azure-pipelines.yml | 181 + .../mimalloc/bin/mimalloc-redirect.dll | Bin 0 -> 56832 bytes .../mimalloc/bin/mimalloc-redirect.lib | Bin 0 -> 2874 bytes .../mimalloc/bin/mimalloc-redirect32.dll | Bin 0 -> 40448 bytes .../mimalloc/bin/mimalloc-redirect32.lib | Bin 0 -> 2928 bytes .../depends/mimalloc/cmake/JoinPaths.cmake | 23 + .../cmake/mimalloc-config-version.cmake | 19 + .../mimalloc/cmake/mimalloc-config.cmake | 14 + .../bench-c5-18xlarge-2020-01-20-a.svg | 887 + .../bench-c5-18xlarge-2020-01-20-b.svg | 1185 + .../bench-c5-18xlarge-2020-01-20-rss-a.svg | 757 + .../bench-c5-18xlarge-2020-01-20-rss-b.svg | 1028 + .../mimalloc/doc/bench-2020/bench-r5a-1.svg | 769 + .../bench-r5a-12xlarge-2020-01-16-a.svg | 868 + .../bench-r5a-12xlarge-2020-01-16-b.svg | 1157 + .../mimalloc/doc/bench-2020/bench-r5a-2.svg | 983 + .../doc/bench-2020/bench-r5a-rss-1.svg | 683 + .../doc/bench-2020/bench-r5a-rss-2.svg | 854 + .../doc/bench-2020/bench-spec-rss.svg | 713 + .../mimalloc/doc/bench-2020/bench-spec.svg | 713 + .../mimalloc/doc/bench-2020/bench-z4-1.svg | 890 + .../mimalloc/doc/bench-2020/bench-z4-2.svg | 1146 + .../doc/bench-2020/bench-z4-rss-1.svg | 796 + .../doc/bench-2020/bench-z4-rss-2.svg | 974 + .../bench-amd5950x-2021-01-30-a.svg | 952 + .../bench-amd5950x-2021-01-30-b.svg | 1255 ++ .../bench-c5-18xlarge-2021-01-30-a.svg | 955 + .../bench-c5-18xlarge-2021-01-30-b.svg | 1269 ++ .../bench-c5-18xlarge-2021-01-30-rss-a.svg | 836 + .../bench-c5-18xlarge-2021-01-30-rss-b.svg | 1131 + .../bench-2021/bench-macmini-2021-01-30.svg | 766 + src/dashbls/depends/mimalloc/doc/doxyfile | 2659 +++ src/dashbls/depends/mimalloc/doc/ds-logo.jpg | Bin 0 -> 181497 bytes src/dashbls/depends/mimalloc/doc/ds-logo.png | Bin 0 -> 121150 bytes .../depends/mimalloc/doc/mimalloc-doc.h | 1281 ++ .../depends/mimalloc/doc/mimalloc-doxygen.css | 49 + .../mimalloc/doc/mimalloc-logo-100.png | Bin 0 -> 3532 bytes .../depends/mimalloc/doc/mimalloc-logo.png | Bin 0 -> 73097 bytes .../depends/mimalloc/doc/mimalloc-logo.svg | 161 + .../depends/mimalloc/doc/spades-logo.png | Bin 0 -> 34583 bytes .../depends/mimalloc/doc/unreal-logo.svg | 43 + .../ide/vs2017/mimalloc-override-test.vcxproj | 190 + .../ide/vs2017/mimalloc-override.vcxproj | 256 + .../ide/vs2017/mimalloc-test-stress.vcxproj | 159 + .../mimalloc/ide/vs2017/mimalloc-test.vcxproj | 158 + .../depends/mimalloc/ide/vs2017/mimalloc.sln | 71 + .../mimalloc/ide/vs2017/mimalloc.vcxproj | 262 + .../ide/vs2019/mimalloc-override-test.vcxproj | 190 + .../ide/vs2019/mimalloc-override.vcxproj | 256 + .../ide/vs2019/mimalloc-test-api.vcxproj | 155 + .../ide/vs2019/mimalloc-test-stress.vcxproj | 159 + .../mimalloc/ide/vs2019/mimalloc-test.vcxproj | 158 + .../depends/mimalloc/ide/vs2019/mimalloc.sln | 81 + .../mimalloc/ide/vs2019/mimalloc.vcxproj | 254 + .../ide/vs2022/mimalloc-override-test.vcxproj | 190 + .../ide/vs2022/mimalloc-override.vcxproj | 257 + .../ide/vs2022/mimalloc-test-api.vcxproj | 155 + .../ide/vs2022/mimalloc-test-stress.vcxproj | 159 + .../mimalloc/ide/vs2022/mimalloc-test.vcxproj | 158 + .../depends/mimalloc/ide/vs2022/mimalloc.sln | 81 + .../mimalloc/ide/vs2022/mimalloc.vcxproj | 255 + .../mimalloc/include/mimalloc-atomic.h | 338 + .../mimalloc/include/mimalloc-internal.h | 1093 + .../mimalloc/include/mimalloc-new-delete.h | 57 + .../mimalloc/include/mimalloc-override.h | 67 + .../depends/mimalloc/include/mimalloc-track.h | 43 + .../depends/mimalloc/include/mimalloc-types.h | 602 + .../depends/mimalloc/include/mimalloc.h | 469 + src/dashbls/depends/mimalloc/mimalloc.pc.in | 11 + src/dashbls/depends/mimalloc/readme.md | 757 + .../depends/mimalloc/src/alloc-aligned.c | 272 + .../depends/mimalloc/src/alloc-override-osx.c | 458 + .../depends/mimalloc/src/alloc-override.c | 281 + .../depends/mimalloc/src/alloc-posix.c | 184 + src/dashbls/depends/mimalloc/src/alloc.c | 958 + src/dashbls/depends/mimalloc/src/arena.c | 535 + src/dashbls/depends/mimalloc/src/bitmap.c | 414 + src/dashbls/depends/mimalloc/src/bitmap.h | 111 + src/dashbls/depends/mimalloc/src/heap.c | 589 + src/dashbls/depends/mimalloc/src/init.c | 695 + src/dashbls/depends/mimalloc/src/options.c | 627 + src/dashbls/depends/mimalloc/src/os.c | 1443 ++ src/dashbls/depends/mimalloc/src/page-queue.c | 331 + src/dashbls/depends/mimalloc/src/page.c | 902 + src/dashbls/depends/mimalloc/src/random.c | 369 + src/dashbls/depends/mimalloc/src/region.c | 506 + .../depends/mimalloc/src/segment-cache.c | 368 + src/dashbls/depends/mimalloc/src/segment.c | 1553 ++ src/dashbls/depends/mimalloc/src/static.c | 39 + src/dashbls/depends/mimalloc/src/stats.c | 584 + .../depends/mimalloc/test/CMakeLists.txt | 54 + .../mimalloc/test/main-override-static.c | 401 + .../depends/mimalloc/test/main-override.c | 36 + .../depends/mimalloc/test/main-override.cpp | 289 + src/dashbls/depends/mimalloc/test/main.c | 46 + src/dashbls/depends/mimalloc/test/readme.md | 16 + .../depends/mimalloc/test/test-api-fill.c | 342 + src/dashbls/depends/mimalloc/test/test-api.c | 285 + .../depends/mimalloc/test/test-stress.c | 345 + .../depends/mimalloc/test/test-wrong.c | 70 + .../depends/mimalloc/test/testhelper.h | 49 + src/dashbls/depends/relic/.editorconfig | 7 + .../depends/relic/.github/workflows/16bit.yml | 48 + .../depends/relic/.github/workflows/32bit.yml | 97 + .../depends/relic/.github/workflows/8bit.yml | 48 + .../relic/.github/workflows/bls12-381.yml | 91 + .../depends/relic/.github/workflows/easy.yml | 97 + .../relic/.github/workflows/gmp-sec.yml | 88 + .../depends/relic/.github/workflows/gmp.yml | 88 + src/dashbls/depends/relic/.gitignore | 31 + src/dashbls/depends/relic/.indent.pro | 64 + src/dashbls/depends/relic/.travis.yml | 33 + src/dashbls/depends/relic/CMakeLists.txt | 341 + src/dashbls/depends/relic/COPYRIGHT | 11 + src/dashbls/depends/relic/LICENSE | 1 + src/dashbls/depends/relic/LICENSE.Apache-2.0 | 202 + src/dashbls/depends/relic/LICENSE.LGPL-2.1 | 520 + src/dashbls/depends/relic/README.md | 66 + src/dashbls/depends/relic/art/rlc_logo.png | Bin 0 -> 6322 bytes src/dashbls/depends/relic/art/rlc_logo.svg | 1694 ++ .../depends/relic/bench/CMakeLists.txt | 80 + src/dashbls/depends/relic/bench/bench_bn.c | 943 + src/dashbls/depends/relic/bench/bench_cp.c | 1809 ++ src/dashbls/depends/relic/bench/bench_dv.c | 111 + src/dashbls/depends/relic/bench/bench_eb.c | 660 + src/dashbls/depends/relic/bench/bench_ec.c | 317 + src/dashbls/depends/relic/bench/bench_ed.c | 679 + src/dashbls/depends/relic/bench/bench_ep.c | 651 + src/dashbls/depends/relic/bench/bench_epx.c | 1108 + src/dashbls/depends/relic/bench/bench_err.c | 76 + src/dashbls/depends/relic/bench/bench_fb.c | 569 + src/dashbls/depends/relic/bench/bench_fbx.c | 165 + src/dashbls/depends/relic/bench/bench_fp.c | 632 + src/dashbls/depends/relic/bench/bench_fpx.c | 3340 +++ src/dashbls/depends/relic/bench/bench_md.c | 63 + src/dashbls/depends/relic/bench/bench_mpc.c | 311 + src/dashbls/depends/relic/bench/bench_pc.c | 802 + src/dashbls/depends/relic/bench/bench_pp.c | 794 + src/dashbls/depends/relic/bench/bench_rand.c | 109 + src/dashbls/depends/relic/cmake/arch.cmake | 52 + src/dashbls/depends/relic/cmake/bn.cmake | 75 + src/dashbls/depends/relic/cmake/cp.cmake | 16 + src/dashbls/depends/relic/cmake/doxygen.cmake | 39 + src/dashbls/depends/relic/cmake/eb.cmake | 64 + src/dashbls/depends/relic/cmake/ec.cmake | 23 + src/dashbls/depends/relic/cmake/ed.cmake | 58 + src/dashbls/depends/relic/cmake/ep.cmake | 68 + src/dashbls/depends/relic/cmake/err.cmake | 9 + src/dashbls/depends/relic/cmake/fb.cmake | 99 + src/dashbls/depends/relic/cmake/fiat.cmake | 39 + src/dashbls/depends/relic/cmake/fp.cmake | 81 + src/dashbls/depends/relic/cmake/fpx.cmake | 29 + src/dashbls/depends/relic/cmake/gmp.cmake | 56 + src/dashbls/depends/relic/cmake/ios.cmake | 443 + src/dashbls/depends/relic/cmake/md.cmake | 21 + src/dashbls/depends/relic/cmake/pp.cmake | 25 + src/dashbls/depends/relic/cmake/rand.cmake | 29 + .../depends/relic/cmake/relic-config.cmake | 10 + src/dashbls/depends/relic/cmake/with.cmake | 130 + .../relic/demo/cert-input/test-bench.c | 471 + .../depends/relic/demo/ers-etrs/test-bench.c | 226 + .../relic/demo/general-paillier/test.c | 92 + .../depends/relic/demo/link-test/test.c | 4 + .../depends/relic/demo/link-test/test1.c | 37 + .../depends/relic/demo/link-test/test2.c | 37 + .../depends/relic/demo/public-stats/csv.c | 153 + .../depends/relic/demo/public-stats/csv.h | 12 + .../depends/relic/demo/public-stats/main.c | 349 + .../depends/relic/demo/tweedledum/main.c | 88 + .../depends/relic/doc/relic.doxygen.in | 2309 ++ .../depends/relic/include/low/relic_bn_low.h | 285 + .../depends/relic/include/low/relic_dv_low.h | 82 + .../depends/relic/include/low/relic_fb_low.h | 270 + .../depends/relic/include/low/relic_fp_low.h | 326 + .../depends/relic/include/low/relic_fpx_low.h | 390 + src/dashbls/depends/relic/include/relic.h | 106 + .../depends/relic/include/relic_alloc.h | 91 + .../depends/relic/include/relic_arch.h | 111 + src/dashbls/depends/relic/include/relic_bc.h | 84 + .../depends/relic/include/relic_bench.h | 219 + src/dashbls/depends/relic/include/relic_bn.h | 1391 ++ .../depends/relic/include/relic_core.h | 482 + src/dashbls/depends/relic/include/relic_cp.h | 2356 ++ src/dashbls/depends/relic/include/relic_dv.h | 247 + src/dashbls/depends/relic/include/relic_eb.h | 950 + src/dashbls/depends/relic/include/relic_ec.h | 463 + src/dashbls/depends/relic/include/relic_ed.h | 910 + src/dashbls/depends/relic/include/relic_ep.h | 1250 ++ src/dashbls/depends/relic/include/relic_epx.h | 1819 ++ src/dashbls/depends/relic/include/relic_err.h | 353 + src/dashbls/depends/relic/include/relic_fb.h | 988 + src/dashbls/depends/relic/include/relic_fbx.h | 204 + src/dashbls/depends/relic/include/relic_fp.h | 1089 + src/dashbls/depends/relic/include/relic_fpx.h | 4703 ++++ .../depends/relic/include/relic_label.h | 2720 +++ src/dashbls/depends/relic/include/relic_md.h | 274 + src/dashbls/depends/relic/include/relic_mpc.h | 387 + .../depends/relic/include/relic_multi.h | 82 + src/dashbls/depends/relic/include/relic_pc.h | 1031 + src/dashbls/depends/relic/include/relic_pp.h | 1027 + .../depends/relic/include/relic_rand.h | 128 + .../depends/relic/include/relic_test.h | 104 + .../depends/relic/include/relic_types.h | 211 + .../depends/relic/include/relic_util.h | 310 + .../depends/relic/preset/ardue-pbc-bn254.sh | 3 + .../depends/relic/preset/arm-pbc-bn254.sh | 3 + .../relic/preset/armdroid-pbc-bn254.sh | 13 + .../depends/relic/preset/armduino-ecc-128k.sh | 3 + .../depends/relic/preset/armega-pbc-bn254.sh | 3 + .../depends/relic/preset/armios-pbc-bn254.sh | 12 + .../depends/relic/preset/avr-ecc-80k-sim.sh | 2 + .../depends/relic/preset/avr-ecc-80k.sh | 2 + .../depends/relic/preset/avr-pbc-80.sh | 2 + .../relic/preset/curve2251-clmul-gcc.sh | 2 + .../relic/preset/curve2251-clmul-icc.sh | 2 + .../relic/preset/curve2251-ssse3-gcc.sh | 2 + .../relic/preset/curve2251-ssse3-icc.sh | 2 + .../depends/relic/preset/fiat-pbc-bls381.sh | 2 + .../depends/relic/preset/gmp-ecc-128.sh | 2 + .../relic/preset/gmp-ecc-tweedledum.sh | 2 + .../depends/relic/preset/gmp-paillier-4096.sh | 2 + .../depends/relic/preset/gmp-pbc-bls381.sh | 2 + .../depends/relic/preset/gmp-pbc-bn254.sh | 2 + .../depends/relic/preset/gmp-pbc-ss1536.sh | 2 + .../depends/relic/preset/msp-ecc-128.sh | 2 + .../depends/relic/preset/msp-ecc-128k.sh | 2 + .../depends/relic/preset/msp-ecc-80.sh | 2 + .../depends/relic/preset/msp-ecc-80k.sh | 2 + .../depends/relic/preset/msp-pbc-bn158.sh | 2 + .../depends/relic/preset/msp-pbc-bn254.sh | 2 + .../depends/relic/preset/valgrind-debug.sh | 2 + .../depends/relic/preset/x64-ecc-128.sh | 2 + .../depends/relic/preset/x64-pbc-bls12-381.sh | 2 + .../depends/relic/preset/x64-pbc-bls12-446.sh | 2 + .../depends/relic/preset/x64-pbc-bls12-455.sh | 2 + .../depends/relic/preset/x64-pbc-bls12-638.sh | 2 + .../depends/relic/preset/x64-pbc-bls24-509.sh | 2 + .../depends/relic/preset/x64-pbc-bls48-575.sh | 2 + .../depends/relic/preset/x64-pbc-bn254.sh | 2 + .../depends/relic/preset/x64-pbc-bn382.sh | 2 + .../depends/relic/preset/x64-pbc-bn446.sh | 2 + src/dashbls/depends/relic/src/CMakeLists.txt | 231 + src/dashbls/depends/relic/src/arch/lzcnt.inc | 431 + .../depends/relic/src/arch/relic_arch_arm.c | 113 + .../depends/relic/src/arch/relic_arch_avr.c | 64 + .../depends/relic/src/arch/relic_arch_msp.c | 121 + .../depends/relic/src/arch/relic_arch_none.c | 89 + .../depends/relic/src/arch/relic_arch_x64.c | 109 + .../depends/relic/src/arch/relic_arch_x86.c | 79 + .../depends/relic/src/bc/relic_bc_aes.c | 87 + .../depends/relic/src/bc/rijndael-alg-fst.c | 1401 ++ .../depends/relic/src/bc/rijndael-alg-fst.h | 47 + .../depends/relic/src/bc/rijndael-api-fst.c | 555 + .../depends/relic/src/bc/rijndael-api-fst.h | 115 + .../depends/relic/src/bn/relic_bn_add.c | 245 + .../depends/relic/src/bn/relic_bn_cmp.c | 92 + .../depends/relic/src/bn/relic_bn_div.c | 230 + .../depends/relic/src/bn/relic_bn_factor.c | 106 + .../depends/relic/src/bn/relic_bn_gcd.c | 1036 + .../depends/relic/src/bn/relic_bn_inv.c | 65 + .../depends/relic/src/bn/relic_bn_lcm.c | 66 + .../depends/relic/src/bn/relic_bn_mem.c | 152 + .../depends/relic/src/bn/relic_bn_mod.c | 341 + .../depends/relic/src/bn/relic_bn_mul.c | 249 + .../depends/relic/src/bn/relic_bn_mxp.c | 387 + .../depends/relic/src/bn/relic_bn_prime.c | 525 + .../depends/relic/src/bn/relic_bn_rec.c | 1019 + .../depends/relic/src/bn/relic_bn_shift.c | 129 + .../depends/relic/src/bn/relic_bn_smb.c | 150 + .../depends/relic/src/bn/relic_bn_sqr.c | 215 + .../depends/relic/src/bn/relic_bn_srt.c | 90 + .../depends/relic/src/bn/relic_bn_util.c | 534 + .../depends/relic/src/cp/relic_cp_bbs.c | 165 + .../depends/relic/src/cp/relic_cp_bdpe.c | 205 + .../depends/relic/src/cp/relic_cp_bgn.c | 371 + .../depends/relic/src/cp/relic_cp_bls.c | 121 + .../depends/relic/src/cp/relic_cp_cls.c | 502 + .../depends/relic/src/cp/relic_cp_cmlhs.c | 381 + .../depends/relic/src/cp/relic_cp_ecdh.c | 100 + .../depends/relic/src/cp/relic_cp_ecdsa.c | 198 + .../depends/relic/src/cp/relic_cp_ecies.c | 159 + .../depends/relic/src/cp/relic_cp_ecmqv.c | 118 + .../depends/relic/src/cp/relic_cp_ecss.c | 189 + .../depends/relic/src/cp/relic_cp_ers.c | 195 + .../depends/relic/src/cp/relic_cp_etrs.c | 394 + .../depends/relic/src/cp/relic_cp_ghpe.c | 216 + .../depends/relic/src/cp/relic_cp_ibe.c | 193 + .../depends/relic/src/cp/relic_cp_mklhs.c | 368 + .../depends/relic/src/cp/relic_cp_mpss.c | 438 + .../depends/relic/src/cp/relic_cp_pcdel.c | 461 + .../depends/relic/src/cp/relic_cp_phpe.c | 215 + .../depends/relic/src/cp/relic_cp_pok.c | 265 + .../depends/relic/src/cp/relic_cp_pss.c | 255 + .../depends/relic/src/cp/relic_cp_rabin.c | 271 + .../depends/relic/src/cp/relic_cp_rsa.c | 1052 + .../depends/relic/src/cp/relic_cp_sok.c | 310 + .../depends/relic/src/cp/relic_cp_sokaka.c | 144 + .../depends/relic/src/cp/relic_cp_vbnn.c | 275 + .../depends/relic/src/cp/relic_cp_zss.c | 161 + .../depends/relic/src/dv/relic_dv_mem.c | 85 + .../depends/relic/src/dv/relic_dv_util.c | 151 + .../depends/relic/src/eb/relic_eb_add.c | 484 + .../depends/relic/src/eb/relic_eb_cmp.c | 89 + .../depends/relic/src/eb/relic_eb_curve.c | 158 + .../depends/relic/src/eb/relic_eb_dbl.c | 227 + .../depends/relic/src/eb/relic_eb_frb.c | 58 + .../depends/relic/src/eb/relic_eb_hlv.c | 100 + .../depends/relic/src/eb/relic_eb_map.c | 101 + .../depends/relic/src/eb/relic_eb_mul.c | 1119 + .../depends/relic/src/eb/relic_eb_mul_fix.c | 425 + .../depends/relic/src/eb/relic_eb_mul_sim.c | 558 + .../depends/relic/src/eb/relic_eb_neg.c | 104 + .../depends/relic/src/eb/relic_eb_norm.c | 152 + .../depends/relic/src/eb/relic_eb_param.c | 492 + .../depends/relic/src/eb/relic_eb_pck.c | 97 + .../depends/relic/src/eb/relic_eb_util.c | 597 + .../depends/relic/src/ed/relic_ed_add.c | 320 + .../depends/relic/src/ed/relic_ed_cmp.c | 94 + .../depends/relic/src/ed/relic_ed_curve.c | 81 + .../depends/relic/src/ed/relic_ed_dbl.c | 232 + .../depends/relic/src/ed/relic_ed_map.c | 259 + .../depends/relic/src/ed/relic_ed_mul.c | 452 + .../depends/relic/src/ed/relic_ed_mul_fix.c | 370 + .../depends/relic/src/ed/relic_ed_mul_sim.c | 398 + .../depends/relic/src/ed/relic_ed_neg.c | 72 + .../depends/relic/src/ed/relic_ed_norm.c | 127 + .../depends/relic/src/ed/relic_ed_param.c | 200 + .../depends/relic/src/ed/relic_ed_pck.c | 87 + .../depends/relic/src/ed/relic_ed_util.c | 341 + .../depends/relic/src/ep/relic_ep_add.c | 797 + .../depends/relic/src/ep/relic_ep_cmp.c | 103 + .../depends/relic/src/ep/relic_ep_curve.c | 501 + .../depends/relic/src/ep/relic_ep_dbl.c | 532 + .../depends/relic/src/ep/relic_ep_map.c | 210 + .../depends/relic/src/ep/relic_ep_mul.c | 786 + .../depends/relic/src/ep/relic_ep_mul_fix.c | 567 + .../depends/relic/src/ep/relic_ep_mul_sim.c | 972 + .../depends/relic/src/ep/relic_ep_neg.c | 52 + .../depends/relic/src/ep/relic_ep_norm.c | 149 + .../depends/relic/src/ep/relic_ep_param.c | 1581 ++ .../depends/relic/src/ep/relic_ep_pck.c | 136 + .../depends/relic/src/ep/relic_ep_psi.c | 58 + .../depends/relic/src/ep/relic_ep_util.c | 332 + .../depends/relic/src/epx/relic_ep2_add.c | 434 + .../depends/relic/src/epx/relic_ep2_cmp.c | 82 + .../depends/relic/src/epx/relic_ep2_curve.c | 903 + .../depends/relic/src/epx/relic_ep2_dbl.c | 273 + .../depends/relic/src/epx/relic_ep2_frb.c | 50 + .../depends/relic/src/epx/relic_ep2_map.c | 193 + .../depends/relic/src/epx/relic_ep2_mul.c | 429 + .../depends/relic/src/epx/relic_ep2_mul_cof.c | 181 + .../depends/relic/src/epx/relic_ep2_mul_fix.c | 393 + .../depends/relic/src/epx/relic_ep2_mul_sim.c | 723 + .../depends/relic/src/epx/relic_ep2_neg.c | 53 + .../depends/relic/src/epx/relic_ep2_norm.c | 138 + .../depends/relic/src/epx/relic_ep2_pck.c | 132 + .../depends/relic/src/epx/relic_ep2_util.c | 339 + .../depends/relic/src/epx/relic_ep4_add.c | 434 + .../depends/relic/src/epx/relic_ep4_cmp.c | 82 + .../depends/relic/src/epx/relic_ep4_curve.c | 377 + .../depends/relic/src/epx/relic_ep4_dbl.c | 276 + .../depends/relic/src/epx/relic_ep4_frb.c | 48 + .../depends/relic/src/epx/relic_ep4_map.c | 79 + .../depends/relic/src/epx/relic_ep4_mul.c | 449 + .../depends/relic/src/epx/relic_ep4_mul_cof.c | 93 + .../depends/relic/src/epx/relic_ep4_mul_fix.c | 393 + .../depends/relic/src/epx/relic_ep4_mul_sim.c | 628 + .../depends/relic/src/epx/relic_ep4_neg.c | 53 + .../depends/relic/src/epx/relic_ep4_norm.c | 138 + .../depends/relic/src/epx/relic_ep4_util.c | 318 + .../depends/relic/src/fb/relic_fb_add.c | 50 + .../depends/relic/src/fb/relic_fb_cmp.c | 52 + .../depends/relic/src/fb/relic_fb_exp.c | 196 + .../depends/relic/src/fb/relic_fb_inv.c | 702 + .../depends/relic/src/fb/relic_fb_itr.c | 95 + .../depends/relic/src/fb/relic_fb_mul.c | 308 + .../depends/relic/src/fb/relic_fb_param.c | 249 + .../depends/relic/src/fb/relic_fb_poly.c | 499 + .../depends/relic/src/fb/relic_fb_rdc.c | 104 + .../depends/relic/src/fb/relic_fb_shift.c | 89 + .../depends/relic/src/fb/relic_fb_slv.c | 83 + .../depends/relic/src/fb/relic_fb_sqr.c | 95 + .../depends/relic/src/fb/relic_fb_srt.c | 64 + .../depends/relic/src/fb/relic_fb_trc.c | 73 + .../depends/relic/src/fb/relic_fb_util.c | 341 + .../depends/relic/src/fbx/relic_fb2_inv.c | 68 + .../depends/relic/src/fbx/relic_fb2_mul.c | 87 + .../depends/relic/src/fbx/relic_fb2_slv.c | 51 + .../depends/relic/src/fbx/relic_fb2_sqr.c | 43 + .../depends/relic/src/fp/relic_fp_add.c | 206 + .../depends/relic/src/fp/relic_fp_cmp.c | 59 + .../depends/relic/src/fp/relic_fp_exp.c | 191 + .../depends/relic/src/fp/relic_fp_inv.c | 565 + .../depends/relic/src/fp/relic_fp_mul.c | 269 + .../depends/relic/src/fp/relic_fp_param.c | 670 + .../depends/relic/src/fp/relic_fp_prime.c | 573 + .../depends/relic/src/fp/relic_fp_rdc.c | 108 + .../depends/relic/src/fp/relic_fp_shift.c | 88 + .../depends/relic/src/fp/relic_fp_sqr.c | 251 + .../depends/relic/src/fp/relic_fp_srt.c | 137 + .../depends/relic/src/fp/relic_fp_util.c | 289 + .../depends/relic/src/fpx/relic_fp12_mul.c | 441 + .../depends/relic/src/fpx/relic_fp12_sqr.c | 528 + .../depends/relic/src/fpx/relic_fp18_mul.c | 225 + .../depends/relic/src/fpx/relic_fp18_sqr.c | 145 + .../depends/relic/src/fpx/relic_fp24_mul.c | 291 + .../depends/relic/src/fpx/relic_fp24_sqr.c | 410 + .../depends/relic/src/fpx/relic_fp2_mul.c | 255 + .../depends/relic/src/fpx/relic_fp2_sqr.c | 110 + .../depends/relic/src/fpx/relic_fp3_mul.c | 211 + .../depends/relic/src/fpx/relic_fp3_sqr.c | 130 + .../depends/relic/src/fpx/relic_fp48_mul.c | 174 + .../depends/relic/src/fpx/relic_fp48_sqr.c | 421 + .../depends/relic/src/fpx/relic_fp4_mul.c | 194 + .../depends/relic/src/fpx/relic_fp4_sqr.c | 127 + .../depends/relic/src/fpx/relic_fp54_mul.c | 202 + .../depends/relic/src/fpx/relic_fp54_sqr.c | 372 + .../depends/relic/src/fpx/relic_fp6_mul.c | 299 + .../depends/relic/src/fpx/relic_fp6_sqr.c | 233 + .../depends/relic/src/fpx/relic_fp8_mul.c | 275 + .../depends/relic/src/fpx/relic_fp8_sqr.c | 168 + .../depends/relic/src/fpx/relic_fp9_mul.c | 280 + .../depends/relic/src/fpx/relic_fp9_sqr.c | 222 + .../depends/relic/src/fpx/relic_fpx_add.c | 330 + .../depends/relic/src/fpx/relic_fpx_cmp.c | 147 + .../depends/relic/src/fpx/relic_fpx_cyc.c | 2155 ++ .../depends/relic/src/fpx/relic_fpx_exp.c | 714 + .../depends/relic/src/fpx/relic_fpx_field.c | 253 + .../depends/relic/src/fpx/relic_fpx_frb.c | 207 + .../depends/relic/src/fpx/relic_fpx_inv.c | 808 + .../depends/relic/src/fpx/relic_fpx_pck.c | 222 + .../depends/relic/src/fpx/relic_fpx_rdc.c | 72 + .../depends/relic/src/fpx/relic_fpx_srt.c | 299 + .../depends/relic/src/fpx/relic_fpx_util.c | 846 + .../src/low/arm-asm-254/relic_fp_add_low.c | 154 + .../src/low/arm-asm-254/relic_fp_add_low.s | 717 + .../src/low/arm-asm-254/relic_fp_mul_low.c | 102 + .../src/low/arm-asm-254/relic_fp_mul_low.s | 634 + .../src/low/arm-asm-254/relic_fp_rdc_low.c | 101 + .../src/low/arm-asm-254/relic_fp_rdc_low.s | 857 + .../src/low/avr-asm-158/relic_bn_add_low.s | 153 + .../src/low/avr-asm-158/relic_bn_shift_low.c | 81 + .../src/low/avr-asm-158/relic_bn_shift_low.s | 81 + .../src/low/avr-asm-158/relic_fp_add_low.c | 181 + .../src/low/avr-asm-158/relic_fp_add_low.s | 167 + .../src/low/avr-asm-158/relic_fp_mul_low.c | 102 + .../src/low/avr-asm-158/relic_fp_mul_low.s | 2076 ++ .../src/low/avr-asm-158/relic_fp_rdc_low.c | 52 + .../src/low/avr-asm-158/relic_fp_rdc_low.s | 1749 ++ .../src/low/avr-asm-158/relic_fp_shift_low.c | 77 + .../src/low/avr-asm-158/relic_fp_shift_low.s | 88 + .../src/low/avr-asm-158/relic_fp_sqr_low.c | 85 + .../src/low/avr-asm-158/relic_fp_sqr_low.s | 1769 ++ .../src/low/avr-asm-163/relic_bn_add_low.s | 153 + .../src/low/avr-asm-163/relic_bn_shift_low.c | 77 + .../src/low/avr-asm-163/relic_bn_shift_low.s | 79 + .../src/low/avr-asm-163/relic_fb_add_low.c | 40 + .../src/low/avr-asm-163/relic_fb_add_low.s | 113 + .../src/low/avr-asm-163/relic_fb_mul_low.c | 61 + .../src/low/avr-asm-163/relic_fb_mul_low.s | 622 + .../src/low/avr-asm-163/relic_fb_shift_low.c | 155 + .../src/low/avr-asm-163/relic_fb_shift_low.s | 315 + .../src/low/avr-asm-163/relic_fb_sqr_low.c | 47 + .../src/low/avr-asm-163/relic_fb_sqr_low.s | 305 + .../src/low/curve2251-sse/CMakeLists.txt | 6 + .../relic/src/low/curve2251-sse/macros.h | 96 + .../src/low/curve2251-sse/relic_fb_add_low.c | 75 + .../src/low/curve2251-sse/relic_fb_inv_low.c | 98 + .../src/low/curve2251-sse/relic_fb_itr_low.c | 70 + .../src/low/curve2251-sse/relic_fb_mul_low.c | 122 + .../low/curve2251-sse/relic_fb_mul_low_cl.c | 259 + .../low/curve2251-sse/relic_fb_mul_low_ld.c | 485 + .../low/curve2251-sse/relic_fb_mul_low_sf.c | 366 + .../src/low/curve2251-sse/relic_fb_rdc_low.c | 158 + .../src/low/curve2251-sse/relic_fb_slv_low.c | 203 + .../src/low/curve2251-sse/relic_fb_sqr_low.c | 253 + .../src/low/curve2251-sse/relic_fb_srt_low.c | 183 + .../src/low/curve2251-sse/relic_fb_trc_low.c | 41 + .../relic/src/low/easy/relic_bn_add_low.c | 101 + .../relic/src/low/easy/relic_bn_div_low.c | 139 + .../relic/src/low/easy/relic_bn_mod_low.c | 87 + .../relic/src/low/easy/relic_bn_mul_low.c | 140 + .../relic/src/low/easy/relic_bn_shift_low.c | 128 + .../relic/src/low/easy/relic_bn_sqr_low.c | 149 + .../relic/src/low/easy/relic_fb_add_low.c | 65 + .../relic/src/low/easy/relic_fb_inv_low.c | 130 + .../relic/src/low/easy/relic_fb_itr_low.c | 59 + .../relic/src/low/easy/relic_fb_mul_low.c | 231 + .../relic/src/low/easy/relic_fb_rdc_low.c | 335 + .../relic/src/low/easy/relic_fb_shift_low.c | 137 + .../relic/src/low/easy/relic_fb_slv_low.c | 91 + .../relic/src/low/easy/relic_fb_sqr_low.c | 164 + .../relic/src/low/easy/relic_fb_srt_low.c | 260 + .../relic/src/low/easy/relic_fb_trc_low.c | 64 + .../relic/src/low/easy/relic_fp_add_low.c | 253 + .../relic/src/low/easy/relic_fp_inv_low.c | 58 + .../relic/src/low/easy/relic_fp_mul_low.c | 105 + .../relic/src/low/easy/relic_fp_rdc_low.c | 155 + .../relic/src/low/easy/relic_fp_shift_low.c | 113 + .../relic/src/low/easy/relic_fp_sqr_low.c | 87 + .../relic/src/low/easy/relic_fpx_add_low.c | 310 + .../relic/src/low/easy/relic_fpx_mul_low.c | 224 + .../relic/src/low/easy/relic_fpx_rdc_low.c | 60 + .../relic/src/low/easy/relic_fpx_sqr_low.c | 208 + .../depends/relic/src/low/fiat/CMakeLists.txt | 12 + .../relic/src/low/fiat/relic_fp_add_low.tmpl | 138 + .../relic/src/low/fiat/relic_fp_mul_low.tmpl | 57 + .../relic/src/low/fiat/relic_fp_sqr_low.tmpl | 49 + .../relic/src/low/gmp-sec/relic_bn_add_low.c | 63 + .../relic/src/low/gmp-sec/relic_bn_div_low.c | 57 + .../relic/src/low/gmp-sec/relic_bn_mod_low.c | 58 + .../relic/src/low/gmp-sec/relic_bn_mul_low.c | 70 + .../src/low/gmp-sec/relic_bn_shift_low.c | 58 + .../relic/src/low/gmp-sec/relic_bn_sqr_low.c | 62 + .../relic/src/low/gmp-sec/relic_fp_add_low.c | 129 + .../relic/src/low/gmp-sec/relic_fp_inv_low.c | 68 + .../relic/src/low/gmp-sec/relic_fp_mul_low.c | 60 + .../relic/src/low/gmp-sec/relic_fp_rdc_low.c | 124 + .../src/low/gmp-sec/relic_fp_shift_low.c | 55 + .../relic/src/low/gmp-sec/relic_fp_sqr_low.c | 52 + .../relic/src/low/gmp/relic_bn_add_low.c | 56 + .../relic/src/low/gmp/relic_bn_div_low.c | 47 + .../relic/src/low/gmp/relic_bn_mod_low.c | 64 + .../relic/src/low/gmp/relic_bn_mul_low.c | 60 + .../relic/src/low/gmp/relic_bn_shift_low.c | 58 + .../relic/src/low/gmp/relic_bn_sqr_low.c | 57 + .../relic/src/low/gmp/relic_fb_add_low.c | 58 + .../relic/src/low/gmp/relic_fb_shift_low.c | 79 + .../relic/src/low/gmp/relic_fp_add_low.c | 148 + .../relic/src/low/gmp/relic_fp_inv_low.c | 69 + .../relic/src/low/gmp/relic_fp_mul_low.c | 58 + .../relic/src/low/gmp/relic_fp_rdc_low.c | 124 + .../relic/src/low/gmp/relic_fp_shift_low.c | 55 + .../relic/src/low/gmp/relic_fp_sqr_low.c | 50 + .../relic/src/low/msp-asm/fb_mul_163_ld.inc | 2344 ++ .../relic/src/low/msp-asm/fb_mul_271_ld.inc | 6416 ++++++ .../src/low/msp-asm/fb_mul_271_ld_k2.inc | 1884 ++ .../relic/src/low/msp-asm/fb_mul_283_ld.inc | 6776 ++++++ .../src/low/msp-asm/fb_mul_353_ld_k2.inc | 2698 +++ .../src/low/msp-asm/fb_mul_353_ld_k3.inc | 1603 ++ .../src/low/msp-asm/fb_srt_271_penta.inc | 498 + .../src/low/msp-asm/fb_srt_353_trino.inc | 667 + .../src/low/msp-asm/fp_mul32_160_comba.inc | 376 + .../src/low/msp-asm/fp_mul32_256_comba.inc | 817 + .../src/low/msp-asm/fp_mul_128_comba.inc | 623 + .../src/low/msp-asm/fp_mul_160_comba.inc | 919 + .../fp_rdc32_160_montgomery_sparse.inc | 471 + .../fp_rdc32_256_montgomery_sparse.inc | 998 + .../msp-asm/fp_rdc_160_montgomery_sparse.inc | 946 + .../msp-asm/fp_rdc_256_montgomery_sparse.inc | 1960 ++ .../relic/src/low/msp-asm/fp_rdc_256p1.inc | 675 + .../src/low/msp-asm/fp_sqr32_160_comba.inc | 245 + .../src/low/msp-asm/fp_sqr32_256_comba.inc | 509 + .../src/low/msp-asm/fp_sqr_128_comba.inc | 353 + .../src/low/msp-asm/fp_sqr_160_comba.inc | 510 + .../relic/src/low/msp-asm/relic_bn_add_low.c | 100 + .../relic/src/low/msp-asm/relic_bn_add_low.s | 66 + .../src/low/msp-asm/relic_bn_shift_low.c | 111 + .../src/low/msp-asm/relic_bn_shift_low.s | 38 + .../relic/src/low/msp-asm/relic_fb_add_low.c | 54 + .../relic/src/low/msp-asm/relic_fb_add_low.s | 115 + .../relic/src/low/msp-asm/relic_fb_mul_low.c | 232 + .../relic/src/low/msp-asm/relic_fb_mul_low.s | 37 + .../src/low/msp-asm/relic_fb_mul_low_163.s | 341 + .../src/low/msp-asm/relic_fb_mul_low_271.s | 349 + .../src/low/msp-asm/relic_fb_mul_low_283.s | 379 + .../src/low/msp-asm/relic_fb_mul_low_353.s | 503 + .../src/low/msp-asm/relic_fb_mul_low_353_k3.s | 487 + .../relic/src/low/msp-asm/relic_fb_rdc_low.c | 133 + .../relic/src/low/msp-asm/relic_fb_rdc_low.s | 51 + .../src/low/msp-asm/relic_fb_rdc_low_163.s | 104 + .../src/low/msp-asm/relic_fb_rdc_low_271.s | 194 + .../src/low/msp-asm/relic_fb_rdc_low_283.s | 175 + .../src/low/msp-asm/relic_fb_rdc_low_353.s | 170 + .../src/low/msp-asm/relic_fb_shift_low.c | 158 + .../src/low/msp-asm/relic_fb_shift_low.s | 278 + .../relic/src/low/msp-asm/relic_fb_sqr_low.c | 70 + .../relic/src/low/msp-asm/relic_fb_sqr_low.s | 90 + .../relic/src/low/msp-asm/relic_fb_srt_low.c | 306 + .../relic/src/low/msp-asm/relic_fb_srt_low.s | 98 + .../relic/src/low/msp-asm/relic_fp_add_low.c | 83 + .../relic/src/low/msp-asm/relic_fp_add_low.s | 474 + .../relic/src/low/msp-asm/relic_fp_inv_low.c | 86 + .../relic/src/low/msp-asm/relic_fp_mul_low.c | 71 + .../relic/src/low/msp-asm/relic_fp_mul_low.s | 58 + .../src/low/msp-asm/relic_fp_mul_low_160.s | 32 + .../src/low/msp-asm/relic_fp_mul_low_256.s | 340 + .../relic/src/low/msp-asm/relic_fp_rdc_low.s | 214 + .../src/low/msp-asm/relic_fp_rdc_low_160k1.s | 234 + .../src/low/msp-asm/relic_fp_rdc_low_160p1.s | 210 + .../src/low/msp-asm/relic_fp_rdc_low_256k1.s | 350 + .../src/low/msp-asm/relic_fp_rdc_low_256p1.s | 134 + .../relic/src/low/msp-asm/relic_fp_sqr_low.s | 66 + .../src/low/msp-asm/relic_fp_sqr_low_160.s | 33 + .../src/low/msp-asm/relic_fp_sqr_low_256.s | 170 + .../relic/src/low/msp-asm/relic_fpx_add_low.c | 223 + .../relic/src/low/x64-asm-446/CMakeLists.txt | 6 + .../depends/relic/src/low/x64-asm-446/macro.s | 267 + .../src/low/x64-asm-446/relic_fp_add_low.s | 605 + .../src/low/x64-asm-446/relic_fp_inv_low.c | 70 + .../src/low/x64-asm-446/relic_fp_inv_low.s | 292 + .../src/low/x64-asm-446/relic_fp_mul_low.c | 48 + .../src/low/x64-asm-446/relic_fp_mul_low.s | 68 + .../src/low/x64-asm-446/relic_fp_rdc_low.c | 108 + .../src/low/x64-asm-446/relic_fp_rdc_low.s | 62 + .../src/low/x64-asm-446/relic_fp_shift_low.c | 47 + .../src/low/x64-asm-446/relic_fp_shift_low.s | 87 + .../src/low/x64-asm-446/relic_fp_sqr_low.c | 48 + .../relic/src/low/x64-asm-455/CMakeLists.txt | 6 + .../depends/relic/src/low/x64-asm-455/macro.s | 266 + .../src/low/x64-asm-455/relic_fp_add_low.s | 789 + .../src/low/x64-asm-455/relic_fp_inv_low.c | 70 + .../src/low/x64-asm-455/relic_fp_inv_low.s | 296 + .../src/low/x64-asm-455/relic_fp_mul_low.c | 48 + .../src/low/x64-asm-455/relic_fp_mul_low.s | 68 + .../src/low/x64-asm-455/relic_fp_rdc_low.c | 108 + .../src/low/x64-asm-455/relic_fp_rdc_low.s | 62 + .../src/low/x64-asm-455/relic_fp_shift_low.c | 47 + .../src/low/x64-asm-455/relic_fp_shift_low.s | 93 + .../src/low/x64-asm-455/relic_fp_sqr_low.c | 48 + .../relic/src/low/x64-asm-4l/CMakeLists.txt | 6 + .../depends/relic/src/low/x64-asm-4l/macro.s | 536 + .../src/low/x64-asm-4l/relic_fp_add_low.s | 447 + .../src/low/x64-asm-4l/relic_fp_inv_low.c | 70 + .../src/low/x64-asm-4l/relic_fp_mul_low.c | 47 + .../src/low/x64-asm-4l/relic_fp_mul_low.s | 51 + .../src/low/x64-asm-4l/relic_fp_rdc_low.c | 111 + .../src/low/x64-asm-4l/relic_fp_rdc_low.s | 55 + .../src/low/x64-asm-4l/relic_fp_shift_low.c | 47 + .../src/low/x64-asm-4l/relic_fp_shift_low.s | 61 + .../src/low/x64-asm-4l/relic_fp_sqr_low.c | 44 + .../src/low/x64-asm-4l/relic_fp_sqr_low.s | 136 + .../src/low/x64-asm-4l/relic_fpx_add_low.c | 121 + .../src/low/x64-asm-4l/relic_fpx_add_low.s | 913 + .../src/low/x64-asm-4l/relic_fpx_mul_low.c | 128 + .../src/low/x64-asm-4l/relic_fpx_mul_low.s | 418 + .../src/low/x64-asm-4l/relic_fpx_rdc_low.c | 49 + .../src/low/x64-asm-4l/relic_fpx_rdc_low.s | 43 + .../src/low/x64-asm-4l/relic_fpx_sqr_low.c | 120 + .../src/low/x64-asm-4l/relic_fpx_sqr_low.s | 193 + .../relic/src/low/x64-asm-544/CMakeLists.txt | 6 + .../depends/relic/src/low/x64-asm-544/macro.s | 290 + .../src/low/x64-asm-544/relic_fp_add_low.s | 804 + .../src/low/x64-asm-544/relic_fp_mul_low.c | 47 + .../src/low/x64-asm-544/relic_fp_mul_low.s | 68 + .../src/low/x64-asm-544/relic_fp_rdc_low.c | 111 + .../src/low/x64-asm-544/relic_fp_rdc_low.s | 62 + .../src/low/x64-asm-544/relic_fp_sqr_low.c | 48 + .../src/low/x64-asm-544/relic_fpx_add_low.c | 226 + .../src/low/x64-asm-544/relic_fpx_mul_low.c | 184 + .../src/low/x64-asm-544/relic_fpx_rdc_low.c | 50 + .../src/low/x64-asm-544/relic_fpx_rdc_low.s | 65 + .../src/low/x64-asm-544/relic_fpx_sqr_low.c | 172 + .../relic/src/low/x64-asm-638/CMakeLists.txt | 6 + .../depends/relic/src/low/x64-asm-638/macro.s | 308 + .../src/low/x64-asm-638/relic_fp_add_low.s | 827 + .../src/low/x64-asm-638/relic_fp_mul_low.c | 47 + .../src/low/x64-asm-638/relic_fp_mul_low.s | 68 + .../src/low/x64-asm-638/relic_fp_rdc_low.c | 111 + .../src/low/x64-asm-638/relic_fp_rdc_low.s | 62 + .../src/low/x64-asm-638/relic_fp_sqr_low.c | 48 + .../src/low/x64-asm-638/relic_fpx_rdc_low.c | 50 + .../src/low/x64-asm-638/relic_fpx_rdc_low.s | 65 + .../relic/src/low/x64-asm-6l/CMakeLists.txt | 6 + .../depends/relic/src/low/x64-asm-6l/macro.s | 262 + .../src/low/x64-asm-6l/relic_fp_add_low.s | 595 + .../src/low/x64-asm-6l/relic_fp_inv_low.c | 70 + .../src/low/x64-asm-6l/relic_fp_mul_low.c | 47 + .../src/low/x64-asm-6l/relic_fp_mul_low.s | 69 + .../src/low/x64-asm-6l/relic_fp_rdc_low.c | 108 + .../src/low/x64-asm-6l/relic_fp_rdc_low.s | 63 + .../src/low/x64-asm-6l/relic_fp_shift_low.c | 47 + .../src/low/x64-asm-6l/relic_fp_shift_low.s | 81 + .../src/low/x64-asm-6l/relic_fp_sqr_low.c | 48 + .../relic/src/low/x64-asm-8l/CMakeLists.txt | 6 + .../depends/relic/src/low/x64-asm-8l/macro.s | 278 + .../src/low/x64-asm-8l/relic_fp_add_low.s | 789 + .../src/low/x64-asm-8l/relic_fp_inv_low.c | 70 + .../src/low/x64-asm-8l/relic_fp_inv_low.s | 296 + .../src/low/x64-asm-8l/relic_fp_mul_low.c | 48 + .../src/low/x64-asm-8l/relic_fp_mul_low.s | 68 + .../src/low/x64-asm-8l/relic_fp_rdc_low.c | 108 + .../src/low/x64-asm-8l/relic_fp_rdc_low.s | 62 + .../src/low/x64-asm-8l/relic_fp_shift_low.c | 47 + .../src/low/x64-asm-8l/relic_fp_shift_low.s | 93 + .../src/low/x64-asm-8l/relic_fp_sqr_low.c | 48 + .../relic/src/low/x64-asm-9l/CMakeLists.txt | 6 + .../depends/relic/src/low/x64-asm-9l/macro.s | 295 + .../src/low/x64-asm-9l/relic_fp_add_low.s | 774 + .../src/low/x64-asm-9l/relic_fp_mul_low.c | 47 + .../src/low/x64-asm-9l/relic_fp_mul_low.s | 68 + .../src/low/x64-asm-9l/relic_fp_rdc_low.c | 111 + .../src/low/x64-asm-9l/relic_fp_rdc_low.s | 62 + .../src/low/x64-asm-9l/relic_fp_sqr_low.c | 48 + .../src/low/x64-asm-9l/relic_fpx_rdc_low.c | 50 + .../src/low/x64-asm-9l/relic_fpx_rdc_low.s | 65 + .../relic/src/low/x64-fiat-381/CMakeLists.txt | 6 + .../src/low/x64-fiat-381/bls12_381_q_64.c | 2920 +++ .../src/low/x64-fiat-381/relic_fp_add_low.c | 138 + .../src/low/x64-fiat-381/relic_fp_inv_low.c | 78 + .../src/low/x64-fiat-381/relic_fp_mul_low.c | 57 + .../src/low/x64-fiat-381/relic_fp_sqr_low.c | 49 + .../depends/relic/src/md/blake2-impl.h | 160 + src/dashbls/depends/relic/src/md/blake2.h | 195 + .../depends/relic/src/md/blake2_COPYING | 121 + .../depends/relic/src/md/blake2s-ref.c | 367 + .../depends/relic/src/md/relic_md_blake2s.c | 60 + .../depends/relic/src/md/relic_md_hmac.c | 78 + .../depends/relic/src/md/relic_md_kdf.c | 69 + .../depends/relic/src/md/relic_md_mgf.c | 70 + .../depends/relic/src/md/relic_md_sha224.c | 60 + .../depends/relic/src/md/relic_md_sha256.c | 60 + .../depends/relic/src/md/relic_md_sha384.c | 60 + .../depends/relic/src/md/relic_md_sha512.c | 60 + .../depends/relic/src/md/relic_md_xmd.c | 132 + src/dashbls/depends/relic/src/md/sha.h | 195 + src/dashbls/depends/relic/src/md/sha224-256.c | 592 + src/dashbls/depends/relic/src/md/sha384-512.c | 1042 + .../depends/relic/src/md/sha_private.h | 31 + .../depends/relic/src/mpc/relic_mt_mpc.c | 133 + .../depends/relic/src/mpc/relic_pc_mpc.c | 363 + .../depends/relic/src/pc/relic_pc_core.c | 77 + .../depends/relic/src/pc/relic_pc_exp.c | 253 + .../depends/relic/src/pc/relic_pc_util.c | 376 + .../depends/relic/src/pp/relic_pp_add_k12.c | 322 + .../depends/relic/src/pp/relic_pp_add_k2.c | 245 + .../depends/relic/src/pp/relic_pp_add_k24.c | 160 + .../depends/relic/src/pp/relic_pp_add_k48.c | 240 + .../depends/relic/src/pp/relic_pp_add_k54.c | 243 + .../depends/relic/src/pp/relic_pp_add_k8.c | 269 + .../depends/relic/src/pp/relic_pp_dbl_k12.c | 488 + .../depends/relic/src/pp/relic_pp_dbl_k2.c | 260 + .../depends/relic/src/pp/relic_pp_dbl_k24.c | 177 + .../depends/relic/src/pp/relic_pp_dbl_k48.c | 250 + .../depends/relic/src/pp/relic_pp_dbl_k54.c | 253 + .../depends/relic/src/pp/relic_pp_dbl_k8.c | 453 + .../depends/relic/src/pp/relic_pp_exp_k12.c | 229 + .../depends/relic/src/pp/relic_pp_exp_k2.c | 65 + .../depends/relic/src/pp/relic_pp_exp_k24.c | 107 + .../depends/relic/src/pp/relic_pp_exp_k48.c | 176 + .../depends/relic/src/pp/relic_pp_exp_k54.c | 267 + .../depends/relic/src/pp/relic_pp_exp_k8.c | 132 + .../depends/relic/src/pp/relic_pp_map.c | 48 + .../depends/relic/src/pp/relic_pp_map_k12.c | 601 + .../depends/relic/src/pp/relic_pp_map_k2.c | 382 + .../depends/relic/src/pp/relic_pp_map_k24.c | 249 + .../depends/relic/src/pp/relic_pp_map_k48.c | 135 + .../depends/relic/src/pp/relic_pp_map_k54.c | 192 + .../depends/relic/src/pp/relic_pp_map_k8.c | 164 + .../depends/relic/src/pp/relic_pp_norm.c | 102 + .../depends/relic/src/rand/relic_rand_call.c | 98 + .../depends/relic/src/rand/relic_rand_core.c | 218 + .../depends/relic/src/rand/relic_rand_hashd.c | 215 + .../depends/relic/src/rand/relic_rand_rdrnd.c | 66 + .../depends/relic/src/rand/relic_rand_udev.c | 73 + src/dashbls/depends/relic/src/relic_bench.c | 250 + src/dashbls/depends/relic/src/relic_conf.c | 149 + src/dashbls/depends/relic/src/relic_core.c | 215 + src/dashbls/depends/relic/src/relic_err.c | 106 + src/dashbls/depends/relic/src/relic_test.c | 152 + src/dashbls/depends/relic/src/relic_util.c | 216 + .../depends/relic/src/tmpl/relic_tmpl_map.h | 324 + src/dashbls/depends/relic/test/CMakeLists.txt | 82 + src/dashbls/depends/relic/test/test_bn.c | 2247 ++ src/dashbls/depends/relic/test/test_core.c | 171 + src/dashbls/depends/relic/test/test_cp.c | 2137 ++ src/dashbls/depends/relic/test/test_dv.c | 235 + src/dashbls/depends/relic/test/test_eb.c | 1347 ++ src/dashbls/depends/relic/test/test_ec.c | 727 + src/dashbls/depends/relic/test/test_ed.c | 1278 ++ src/dashbls/depends/relic/test/test_ep.c | 1465 ++ src/dashbls/depends/relic/test/test_epx.c | 2277 ++ src/dashbls/depends/relic/test/test_err.c | 168 + src/dashbls/depends/relic/test/test_fb.c | 1136 + src/dashbls/depends/relic/test/test_fbx.c | 420 + src/dashbls/depends/relic/test/test_fp.c | 1169 + src/dashbls/depends/relic/test/test_fpx.c | 7949 +++++++ src/dashbls/depends/relic/test/test_md.c | 585 + src/dashbls/depends/relic/test/test_mpc.c | 418 + src/dashbls/depends/relic/test/test_pc.c | 1836 ++ src/dashbls/depends/relic/test/test_pp.c | 2580 +++ src/dashbls/depends/relic/test/test_rand.c | 449 + .../depends/relic/tools/git-creation-date.sh | 10 + .../depends/relic/tools/relic_gen_label.sh | 254 + src/dashbls/emsdk_build.sh | 10 + src/dashbls/go-bindings/.gitignore | 1 + src/dashbls/go-bindings/Makefile | 52 + src/dashbls/go-bindings/README.md | 195 + src/dashbls/go-bindings/blschia.cpp | 54 + src/dashbls/go-bindings/blschia.h | 46 + src/dashbls/go-bindings/elements.cpp | 154 + src/dashbls/go-bindings/elements.go | 193 + src/dashbls/go-bindings/elements.h | 56 + src/dashbls/go-bindings/error.go | 23 + src/dashbls/go-bindings/error.h | 21 + src/dashbls/go-bindings/go.mod | 5 + src/dashbls/go-bindings/go.sum | 11 + src/dashbls/go-bindings/privatekey.cpp | 113 + src/dashbls/go-bindings/privatekey.go | 132 + src/dashbls/go-bindings/privatekey.h | 39 + src/dashbls/go-bindings/schemes.cpp | 229 + src/dashbls/go-bindings/schemes.go | 416 + src/dashbls/go-bindings/schemes.h | 100 + src/dashbls/go-bindings/schemes_test.go | 661 + src/dashbls/go-bindings/threshold.cpp | 168 + src/dashbls/go-bindings/threshold.go | 233 + src/dashbls/go-bindings/threshold.h | 55 + src/dashbls/go-bindings/threshold_test.go | 135 + src/dashbls/go-bindings/util.go | 58 + src/dashbls/go-bindings/util_test.go | 49 + src/dashbls/go-bindings/utils.cpp | 40 + src/dashbls/go-bindings/utils.hpp | 34 + src/dashbls/include/dashbls/bls.hpp | 48 + src/dashbls/include/dashbls/chaincode.hpp | 59 + src/dashbls/include/dashbls/elements.hpp | 147 + .../include/dashbls/extendedprivatekey.hpp | 116 + .../include/dashbls/extendedpublickey.hpp | 109 + src/dashbls/include/dashbls/hdkeys.hpp | 222 + src/dashbls/include/dashbls/hkdf.hpp | 94 + src/dashbls/include/dashbls/legacy.hpp | 31 + src/dashbls/include/dashbls/privatekey.hpp | 118 + src/dashbls/include/dashbls/schemes.hpp | 274 + src/dashbls/include/dashbls/test-utils.hpp | 56 + src/dashbls/include/dashbls/threshold.hpp | 29 + src/dashbls/include/dashbls/util.hpp | 162 + src/dashbls/js-bindings/CMakeLists.txt | 38 + src/dashbls/js-bindings/README.md | 178 + src/dashbls/js-bindings/blsjs.d.ts | 107 + .../js-bindings/bundle_wasm_for_web.js | 37 + src/dashbls/js-bindings/helpers.cpp | 90 + src/dashbls/js-bindings/helpers.h | 70 + src/dashbls/js-bindings/jsbindings.cpp | 110 + src/dashbls/js-bindings/package-lock.json | 7366 +++++++ src/dashbls/js-bindings/package.json | 65 + .../js-bindings/tests/PrivateKey.spec.js | 128 + .../js-bindings/tests/PublicKey.spec.js | 85 + .../js-bindings/tests/Signature.spec.js | 162 + src/dashbls/js-bindings/tests/karma.conf.js | 65 + src/dashbls/js-bindings/tests/karma.test.js | 5 + src/dashbls/js-bindings/tests/test.js | 409 + src/dashbls/js-bindings/tests/typings.spec.ts | 109 + .../js-bindings/tests/webpack.config.js | 19 + src/dashbls/js-bindings/tests/yarn.lock | 300 + .../js-bindings/wrappers/BignumWrapper.cpp | 48 + .../js-bindings/wrappers/BignumWrapper.h | 42 + .../js-bindings/wrappers/G1ElementWrapper.cpp | 76 + .../js-bindings/wrappers/G1ElementWrapper.h | 53 + .../js-bindings/wrappers/G2ElementWrapper.cpp | 83 + .../js-bindings/wrappers/G2ElementWrapper.h | 55 + src/dashbls/js-bindings/wrappers/JSWrapper.h | 32 + .../wrappers/PrivateKeyWrapper.cpp | 79 + .../js-bindings/wrappers/PrivateKeyWrapper.h | 55 + .../js-bindings/wrappers/SchemeMPLWrapper.cpp | 21 + .../js-bindings/wrappers/SchemeMPLWrapper.h | 128 + .../js-bindings/wrappers/UtilWrapper.cpp | 28 + .../js-bindings/wrappers/UtilWrapper.h | 29 + src/dashbls/js_build.sh | 9 + src/dashbls/js_build_docker.sh | 18 + src/dashbls/js_test.sh | 15 + src/dashbls/lgtm.yml | 12 + src/dashbls/mypi.ini | 2 + src/dashbls/pyproject.toml | 6 + src/dashbls/python-bindings/CMakeLists.txt | 17 + src/dashbls/python-bindings/README.md | 149 + src/dashbls/python-bindings/benchmark.py | 66 + .../python-bindings/pythonbindings.cpp | 753 + src/dashbls/python-bindings/test.py | 393 + src/dashbls/python-impl/README.md | 12 + src/dashbls/python-impl/bls12381.py | 101 + src/dashbls/python-impl/ec.py | 586 + src/dashbls/python-impl/fields.py | 763 + src/dashbls/python-impl/hash_to_field.py | 99 + src/dashbls/python-impl/hd_keys.py | 90 + src/dashbls/python-impl/hkdf.py | 53 + src/dashbls/python-impl/impl-test.py | 663 + src/dashbls/python-impl/op_swu_g2.py | 214 + src/dashbls/python-impl/pairing.py | 136 + src/dashbls/python-impl/private_key.py | 81 + src/dashbls/python-impl/schemes.py | 209 + src/dashbls/python-impl/util.py | 49 + src/dashbls/rust-bindings/.gitignore | 2 + .../rust-bindings/bls-dash-sys/.rustfmt.toml | 17 + .../rust-bindings/bls-dash-sys/Cargo.toml | 15 + .../rust-bindings/bls-dash-sys/bindings.rs | 435 + .../rust-bindings/bls-dash-sys/build.rs | 443 + .../c-bindings/bip32/chaincode.cpp | 25 + .../bls-dash-sys/c-bindings/bip32/chaincode.h | 21 + .../c-bindings/bip32/extendedprivatekey.cpp | 128 + .../c-bindings/bip32/extendedprivatekey.h | 48 + .../c-bindings/bip32/extendedpublickey.cpp | 72 + .../c-bindings/bip32/extendedpublickey.h | 38 + .../bls-dash-sys/c-bindings/blschia.cpp | 56 + .../bls-dash-sys/c-bindings/blschia.h | 46 + .../bls-dash-sys/c-bindings/elements.cpp | 162 + .../bls-dash-sys/c-bindings/elements.h | 58 + .../bls-dash-sys/c-bindings/error.h | 21 + .../bls-dash-sys/c-bindings/privatekey.cpp | 120 + .../bls-dash-sys/c-bindings/privatekey.h | 40 + .../bls-dash-sys/c-bindings/schemes.cpp | 388 + .../bls-dash-sys/c-bindings/schemes.h | 184 + .../bls-dash-sys/c-bindings/threshold.cpp | 168 + .../bls-dash-sys/c-bindings/threshold.h | 55 + .../bls-dash-sys/c-bindings/utils.cpp | 40 + .../bls-dash-sys/c-bindings/utils.hpp | 34 + .../rust-bindings/bls-dash-sys/include.h | 8 + .../rust-bindings/bls-dash-sys/src/lib.rs | 6 + .../bls-dash-sys/tests/sign_and_verify.rs | 79 + .../bls-signatures/.rustfmt.toml | 17 + .../rust-bindings/bls-signatures/Cargo.toml | 19 + .../bls-signatures/src/bip32/chain_code.rs | 33 + .../bls-signatures/src/bip32/mod.rs | 7 + .../bls-signatures/src/bip32/private_key.rs | 205 + .../bls-signatures/src/bip32/public_key.rs | 119 + .../bls-signatures/src/elements.rs | 411 + .../bls-signatures/src/legacy/bip32/mod.rs | 2 + .../src/legacy/bip32/private_key.rs | 58 + .../src/legacy/bip32/public_key.rs | 40 + .../bls-signatures/src/legacy/elements.rs | 33 + .../bls-signatures/src/legacy/mod.rs | 2 + .../rust-bindings/bls-signatures/src/lib.rs | 126 + .../bls-signatures/src/private_key.rs | 322 + .../bls-signatures/src/schemes.rs | 434 + .../rust-bindings/bls-signatures/src/utils.rs | 71 + src/dashbls/rust-bindings/example/Cargo.toml | 7 + src/dashbls/rust-bindings/example/src/main.rs | 51 + src/dashbls/setjmp_patch.diff | 41 + src/dashbls/setup.py | 219 + src/dashbls/src/CMakeLists.txt | 54 + src/dashbls/src/bls.cpp | 94 + src/dashbls/src/chaincode.cpp | 60 + src/dashbls/src/elements.cpp | 574 + src/dashbls/src/extendedprivatekey.cpp | 200 + src/dashbls/src/extendedpublickey.cpp | 136 + src/dashbls/src/legacy.cpp | 433 + src/dashbls/src/privatekey.cpp | 332 + src/dashbls/src/schemes.cpp | 716 + src/dashbls/src/test-bench.cpp | 177 + src/dashbls/src/test.cpp | 1571 ++ src/dashbls/src/threshold.cpp | 301 + 974 files changed, 324282 insertions(+) create mode 100644 src/dashbls/.clang-format create mode 100644 src/dashbls/.flake8 create mode 100644 src/dashbls/.github/workflows/build-binds.yml create mode 100644 src/dashbls/.github/workflows/build-test.yaml create mode 100644 src/dashbls/.github/workflows/build-wheels.yml create mode 100644 src/dashbls/.github/workflows/js-bindings.yml create mode 100644 src/dashbls/.github/workflows/relic-nightly.yml create mode 100644 src/dashbls/.github/workflows/stale-issue.yml create mode 100644 src/dashbls/.gitignore create mode 100644 src/dashbls/CMakeLists.txt create mode 100644 src/dashbls/LICENSE create mode 100644 src/dashbls/MANIFEST.in create mode 100644 src/dashbls/Makefile.am create mode 100644 src/dashbls/Makefile.bench.include create mode 100644 src/dashbls/Makefile.bls.include create mode 100644 src/dashbls/Makefile.mimalloc.include create mode 100644 src/dashbls/Makefile.relic.include create mode 100644 src/dashbls/Makefile.test.include create mode 100644 src/dashbls/README.md create mode 100644 src/dashbls/apple.rust.deps.sh create mode 100644 src/dashbls/autogen.sh create mode 100644 src/dashbls/build-aux/m4/ax_check_compile_flag.m4 create mode 100644 src/dashbls/build-aux/m4/ax_check_link_flag.m4 create mode 100644 src/dashbls/build-aux/m4/ax_cxx_compile_stdcxx.m4 create mode 100644 src/dashbls/build-aux/m4/ax_pthread.m4 create mode 100644 src/dashbls/cmake_modules/BrewHelper.cmake create mode 100644 src/dashbls/cmake_modules/Findgmp.cmake create mode 100644 src/dashbls/cmake_modules/Findsodium.cmake create mode 100644 src/dashbls/configure.ac create mode 100644 src/dashbls/depends/catch2/CMakeLists.txt create mode 100644 src/dashbls/depends/catch2/include/catch2/catch.hpp create mode 100644 src/dashbls/depends/mimalloc/.gitattributes create mode 100644 src/dashbls/depends/mimalloc/.gitignore create mode 100644 src/dashbls/depends/mimalloc/CMakeLists.txt create mode 100644 src/dashbls/depends/mimalloc/LICENSE create mode 100644 src/dashbls/depends/mimalloc/azure-pipelines.yml create mode 100644 src/dashbls/depends/mimalloc/bin/mimalloc-redirect.dll create mode 100644 src/dashbls/depends/mimalloc/bin/mimalloc-redirect.lib create mode 100644 src/dashbls/depends/mimalloc/bin/mimalloc-redirect32.dll create mode 100644 src/dashbls/depends/mimalloc/bin/mimalloc-redirect32.lib create mode 100644 src/dashbls/depends/mimalloc/cmake/JoinPaths.cmake create mode 100644 src/dashbls/depends/mimalloc/cmake/mimalloc-config-version.cmake create mode 100644 src/dashbls/depends/mimalloc/cmake/mimalloc-config.cmake create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-a.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-b.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-a.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-b.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-r5a-1.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-r5a-2.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-r5a-rss-1.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-r5a-rss-2.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-spec-rss.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-spec.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-z4-1.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-z4-2.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-z4-rss-1.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2020/bench-z4-rss-2.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2021/bench-amd5950x-2021-01-30-a.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2021/bench-amd5950x-2021-01-30-b.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-a.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-b.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-a.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-b.svg create mode 100644 src/dashbls/depends/mimalloc/doc/bench-2021/bench-macmini-2021-01-30.svg create mode 100644 src/dashbls/depends/mimalloc/doc/doxyfile create mode 100644 src/dashbls/depends/mimalloc/doc/ds-logo.jpg create mode 100644 src/dashbls/depends/mimalloc/doc/ds-logo.png create mode 100644 src/dashbls/depends/mimalloc/doc/mimalloc-doc.h create mode 100644 src/dashbls/depends/mimalloc/doc/mimalloc-doxygen.css create mode 100644 src/dashbls/depends/mimalloc/doc/mimalloc-logo-100.png create mode 100644 src/dashbls/depends/mimalloc/doc/mimalloc-logo.png create mode 100644 src/dashbls/depends/mimalloc/doc/mimalloc-logo.svg create mode 100644 src/dashbls/depends/mimalloc/doc/spades-logo.png create mode 100644 src/dashbls/depends/mimalloc/doc/unreal-logo.svg create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override-test.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-test-stress.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-test.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc.sln create mode 100644 src/dashbls/depends/mimalloc/ide/vs2017/mimalloc.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2019/mimalloc-override-test.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2019/mimalloc-override.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2019/mimalloc-test-api.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2019/mimalloc-test-stress.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2019/mimalloc-test.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2019/mimalloc.sln create mode 100644 src/dashbls/depends/mimalloc/ide/vs2019/mimalloc.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2022/mimalloc-override-test.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2022/mimalloc-override.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2022/mimalloc-test-api.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2022/mimalloc-test-stress.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2022/mimalloc-test.vcxproj create mode 100644 src/dashbls/depends/mimalloc/ide/vs2022/mimalloc.sln create mode 100644 src/dashbls/depends/mimalloc/ide/vs2022/mimalloc.vcxproj create mode 100644 src/dashbls/depends/mimalloc/include/mimalloc-atomic.h create mode 100644 src/dashbls/depends/mimalloc/include/mimalloc-internal.h create mode 100644 src/dashbls/depends/mimalloc/include/mimalloc-new-delete.h create mode 100644 src/dashbls/depends/mimalloc/include/mimalloc-override.h create mode 100644 src/dashbls/depends/mimalloc/include/mimalloc-track.h create mode 100644 src/dashbls/depends/mimalloc/include/mimalloc-types.h create mode 100644 src/dashbls/depends/mimalloc/include/mimalloc.h create mode 100644 src/dashbls/depends/mimalloc/mimalloc.pc.in create mode 100644 src/dashbls/depends/mimalloc/readme.md create mode 100644 src/dashbls/depends/mimalloc/src/alloc-aligned.c create mode 100644 src/dashbls/depends/mimalloc/src/alloc-override-osx.c create mode 100644 src/dashbls/depends/mimalloc/src/alloc-override.c create mode 100644 src/dashbls/depends/mimalloc/src/alloc-posix.c create mode 100644 src/dashbls/depends/mimalloc/src/alloc.c create mode 100644 src/dashbls/depends/mimalloc/src/arena.c create mode 100644 src/dashbls/depends/mimalloc/src/bitmap.c create mode 100644 src/dashbls/depends/mimalloc/src/bitmap.h create mode 100644 src/dashbls/depends/mimalloc/src/heap.c create mode 100644 src/dashbls/depends/mimalloc/src/init.c create mode 100644 src/dashbls/depends/mimalloc/src/options.c create mode 100644 src/dashbls/depends/mimalloc/src/os.c create mode 100644 src/dashbls/depends/mimalloc/src/page-queue.c create mode 100644 src/dashbls/depends/mimalloc/src/page.c create mode 100644 src/dashbls/depends/mimalloc/src/random.c create mode 100644 src/dashbls/depends/mimalloc/src/region.c create mode 100644 src/dashbls/depends/mimalloc/src/segment-cache.c create mode 100644 src/dashbls/depends/mimalloc/src/segment.c create mode 100644 src/dashbls/depends/mimalloc/src/static.c create mode 100644 src/dashbls/depends/mimalloc/src/stats.c create mode 100644 src/dashbls/depends/mimalloc/test/CMakeLists.txt create mode 100644 src/dashbls/depends/mimalloc/test/main-override-static.c create mode 100644 src/dashbls/depends/mimalloc/test/main-override.c create mode 100644 src/dashbls/depends/mimalloc/test/main-override.cpp create mode 100644 src/dashbls/depends/mimalloc/test/main.c create mode 100644 src/dashbls/depends/mimalloc/test/readme.md create mode 100644 src/dashbls/depends/mimalloc/test/test-api-fill.c create mode 100644 src/dashbls/depends/mimalloc/test/test-api.c create mode 100644 src/dashbls/depends/mimalloc/test/test-stress.c create mode 100644 src/dashbls/depends/mimalloc/test/test-wrong.c create mode 100644 src/dashbls/depends/mimalloc/test/testhelper.h create mode 100644 src/dashbls/depends/relic/.editorconfig create mode 100644 src/dashbls/depends/relic/.github/workflows/16bit.yml create mode 100644 src/dashbls/depends/relic/.github/workflows/32bit.yml create mode 100644 src/dashbls/depends/relic/.github/workflows/8bit.yml create mode 100644 src/dashbls/depends/relic/.github/workflows/bls12-381.yml create mode 100644 src/dashbls/depends/relic/.github/workflows/easy.yml create mode 100644 src/dashbls/depends/relic/.github/workflows/gmp-sec.yml create mode 100644 src/dashbls/depends/relic/.github/workflows/gmp.yml create mode 100644 src/dashbls/depends/relic/.gitignore create mode 100644 src/dashbls/depends/relic/.indent.pro create mode 100644 src/dashbls/depends/relic/.travis.yml create mode 100644 src/dashbls/depends/relic/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/COPYRIGHT create mode 100644 src/dashbls/depends/relic/LICENSE create mode 100644 src/dashbls/depends/relic/LICENSE.Apache-2.0 create mode 100644 src/dashbls/depends/relic/LICENSE.LGPL-2.1 create mode 100644 src/dashbls/depends/relic/README.md create mode 100644 src/dashbls/depends/relic/art/rlc_logo.png create mode 100644 src/dashbls/depends/relic/art/rlc_logo.svg create mode 100644 src/dashbls/depends/relic/bench/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/bench/bench_bn.c create mode 100644 src/dashbls/depends/relic/bench/bench_cp.c create mode 100644 src/dashbls/depends/relic/bench/bench_dv.c create mode 100644 src/dashbls/depends/relic/bench/bench_eb.c create mode 100644 src/dashbls/depends/relic/bench/bench_ec.c create mode 100644 src/dashbls/depends/relic/bench/bench_ed.c create mode 100644 src/dashbls/depends/relic/bench/bench_ep.c create mode 100644 src/dashbls/depends/relic/bench/bench_epx.c create mode 100644 src/dashbls/depends/relic/bench/bench_err.c create mode 100644 src/dashbls/depends/relic/bench/bench_fb.c create mode 100644 src/dashbls/depends/relic/bench/bench_fbx.c create mode 100644 src/dashbls/depends/relic/bench/bench_fp.c create mode 100644 src/dashbls/depends/relic/bench/bench_fpx.c create mode 100644 src/dashbls/depends/relic/bench/bench_md.c create mode 100644 src/dashbls/depends/relic/bench/bench_mpc.c create mode 100644 src/dashbls/depends/relic/bench/bench_pc.c create mode 100644 src/dashbls/depends/relic/bench/bench_pp.c create mode 100644 src/dashbls/depends/relic/bench/bench_rand.c create mode 100644 src/dashbls/depends/relic/cmake/arch.cmake create mode 100644 src/dashbls/depends/relic/cmake/bn.cmake create mode 100644 src/dashbls/depends/relic/cmake/cp.cmake create mode 100644 src/dashbls/depends/relic/cmake/doxygen.cmake create mode 100644 src/dashbls/depends/relic/cmake/eb.cmake create mode 100644 src/dashbls/depends/relic/cmake/ec.cmake create mode 100644 src/dashbls/depends/relic/cmake/ed.cmake create mode 100644 src/dashbls/depends/relic/cmake/ep.cmake create mode 100644 src/dashbls/depends/relic/cmake/err.cmake create mode 100644 src/dashbls/depends/relic/cmake/fb.cmake create mode 100644 src/dashbls/depends/relic/cmake/fiat.cmake create mode 100644 src/dashbls/depends/relic/cmake/fp.cmake create mode 100644 src/dashbls/depends/relic/cmake/fpx.cmake create mode 100644 src/dashbls/depends/relic/cmake/gmp.cmake create mode 100644 src/dashbls/depends/relic/cmake/ios.cmake create mode 100644 src/dashbls/depends/relic/cmake/md.cmake create mode 100644 src/dashbls/depends/relic/cmake/pp.cmake create mode 100644 src/dashbls/depends/relic/cmake/rand.cmake create mode 100644 src/dashbls/depends/relic/cmake/relic-config.cmake create mode 100644 src/dashbls/depends/relic/cmake/with.cmake create mode 100644 src/dashbls/depends/relic/demo/cert-input/test-bench.c create mode 100644 src/dashbls/depends/relic/demo/ers-etrs/test-bench.c create mode 100644 src/dashbls/depends/relic/demo/general-paillier/test.c create mode 100644 src/dashbls/depends/relic/demo/link-test/test.c create mode 100644 src/dashbls/depends/relic/demo/link-test/test1.c create mode 100644 src/dashbls/depends/relic/demo/link-test/test2.c create mode 100644 src/dashbls/depends/relic/demo/public-stats/csv.c create mode 100644 src/dashbls/depends/relic/demo/public-stats/csv.h create mode 100644 src/dashbls/depends/relic/demo/public-stats/main.c create mode 100644 src/dashbls/depends/relic/demo/tweedledum/main.c create mode 100644 src/dashbls/depends/relic/doc/relic.doxygen.in create mode 100644 src/dashbls/depends/relic/include/low/relic_bn_low.h create mode 100644 src/dashbls/depends/relic/include/low/relic_dv_low.h create mode 100644 src/dashbls/depends/relic/include/low/relic_fb_low.h create mode 100644 src/dashbls/depends/relic/include/low/relic_fp_low.h create mode 100644 src/dashbls/depends/relic/include/low/relic_fpx_low.h create mode 100644 src/dashbls/depends/relic/include/relic.h create mode 100644 src/dashbls/depends/relic/include/relic_alloc.h create mode 100644 src/dashbls/depends/relic/include/relic_arch.h create mode 100644 src/dashbls/depends/relic/include/relic_bc.h create mode 100644 src/dashbls/depends/relic/include/relic_bench.h create mode 100644 src/dashbls/depends/relic/include/relic_bn.h create mode 100644 src/dashbls/depends/relic/include/relic_core.h create mode 100644 src/dashbls/depends/relic/include/relic_cp.h create mode 100644 src/dashbls/depends/relic/include/relic_dv.h create mode 100644 src/dashbls/depends/relic/include/relic_eb.h create mode 100644 src/dashbls/depends/relic/include/relic_ec.h create mode 100644 src/dashbls/depends/relic/include/relic_ed.h create mode 100644 src/dashbls/depends/relic/include/relic_ep.h create mode 100644 src/dashbls/depends/relic/include/relic_epx.h create mode 100644 src/dashbls/depends/relic/include/relic_err.h create mode 100644 src/dashbls/depends/relic/include/relic_fb.h create mode 100644 src/dashbls/depends/relic/include/relic_fbx.h create mode 100644 src/dashbls/depends/relic/include/relic_fp.h create mode 100644 src/dashbls/depends/relic/include/relic_fpx.h create mode 100644 src/dashbls/depends/relic/include/relic_label.h create mode 100644 src/dashbls/depends/relic/include/relic_md.h create mode 100644 src/dashbls/depends/relic/include/relic_mpc.h create mode 100644 src/dashbls/depends/relic/include/relic_multi.h create mode 100644 src/dashbls/depends/relic/include/relic_pc.h create mode 100644 src/dashbls/depends/relic/include/relic_pp.h create mode 100644 src/dashbls/depends/relic/include/relic_rand.h create mode 100644 src/dashbls/depends/relic/include/relic_test.h create mode 100644 src/dashbls/depends/relic/include/relic_types.h create mode 100644 src/dashbls/depends/relic/include/relic_util.h create mode 100644 src/dashbls/depends/relic/preset/ardue-pbc-bn254.sh create mode 100644 src/dashbls/depends/relic/preset/arm-pbc-bn254.sh create mode 100644 src/dashbls/depends/relic/preset/armdroid-pbc-bn254.sh create mode 100644 src/dashbls/depends/relic/preset/armduino-ecc-128k.sh create mode 100644 src/dashbls/depends/relic/preset/armega-pbc-bn254.sh create mode 100644 src/dashbls/depends/relic/preset/armios-pbc-bn254.sh create mode 100644 src/dashbls/depends/relic/preset/avr-ecc-80k-sim.sh create mode 100644 src/dashbls/depends/relic/preset/avr-ecc-80k.sh create mode 100644 src/dashbls/depends/relic/preset/avr-pbc-80.sh create mode 100644 src/dashbls/depends/relic/preset/curve2251-clmul-gcc.sh create mode 100644 src/dashbls/depends/relic/preset/curve2251-clmul-icc.sh create mode 100644 src/dashbls/depends/relic/preset/curve2251-ssse3-gcc.sh create mode 100644 src/dashbls/depends/relic/preset/curve2251-ssse3-icc.sh create mode 100644 src/dashbls/depends/relic/preset/fiat-pbc-bls381.sh create mode 100644 src/dashbls/depends/relic/preset/gmp-ecc-128.sh create mode 100644 src/dashbls/depends/relic/preset/gmp-ecc-tweedledum.sh create mode 100644 src/dashbls/depends/relic/preset/gmp-paillier-4096.sh create mode 100644 src/dashbls/depends/relic/preset/gmp-pbc-bls381.sh create mode 100644 src/dashbls/depends/relic/preset/gmp-pbc-bn254.sh create mode 100644 src/dashbls/depends/relic/preset/gmp-pbc-ss1536.sh create mode 100644 src/dashbls/depends/relic/preset/msp-ecc-128.sh create mode 100644 src/dashbls/depends/relic/preset/msp-ecc-128k.sh create mode 100644 src/dashbls/depends/relic/preset/msp-ecc-80.sh create mode 100644 src/dashbls/depends/relic/preset/msp-ecc-80k.sh create mode 100644 src/dashbls/depends/relic/preset/msp-pbc-bn158.sh create mode 100644 src/dashbls/depends/relic/preset/msp-pbc-bn254.sh create mode 100644 src/dashbls/depends/relic/preset/valgrind-debug.sh create mode 100644 src/dashbls/depends/relic/preset/x64-ecc-128.sh create mode 100644 src/dashbls/depends/relic/preset/x64-pbc-bls12-381.sh create mode 100644 src/dashbls/depends/relic/preset/x64-pbc-bls12-446.sh create mode 100644 src/dashbls/depends/relic/preset/x64-pbc-bls12-455.sh create mode 100644 src/dashbls/depends/relic/preset/x64-pbc-bls12-638.sh create mode 100644 src/dashbls/depends/relic/preset/x64-pbc-bls24-509.sh create mode 100644 src/dashbls/depends/relic/preset/x64-pbc-bls48-575.sh create mode 100644 src/dashbls/depends/relic/preset/x64-pbc-bn254.sh create mode 100644 src/dashbls/depends/relic/preset/x64-pbc-bn382.sh create mode 100644 src/dashbls/depends/relic/preset/x64-pbc-bn446.sh create mode 100644 src/dashbls/depends/relic/src/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/arch/lzcnt.inc create mode 100644 src/dashbls/depends/relic/src/arch/relic_arch_arm.c create mode 100644 src/dashbls/depends/relic/src/arch/relic_arch_avr.c create mode 100644 src/dashbls/depends/relic/src/arch/relic_arch_msp.c create mode 100644 src/dashbls/depends/relic/src/arch/relic_arch_none.c create mode 100644 src/dashbls/depends/relic/src/arch/relic_arch_x64.c create mode 100644 src/dashbls/depends/relic/src/arch/relic_arch_x86.c create mode 100644 src/dashbls/depends/relic/src/bc/relic_bc_aes.c create mode 100644 src/dashbls/depends/relic/src/bc/rijndael-alg-fst.c create mode 100644 src/dashbls/depends/relic/src/bc/rijndael-alg-fst.h create mode 100644 src/dashbls/depends/relic/src/bc/rijndael-api-fst.c create mode 100644 src/dashbls/depends/relic/src/bc/rijndael-api-fst.h create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_add.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_cmp.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_div.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_factor.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_gcd.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_inv.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_lcm.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_mem.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_mod.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_mul.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_mxp.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_prime.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_rec.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_shift.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_smb.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_sqr.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_srt.c create mode 100644 src/dashbls/depends/relic/src/bn/relic_bn_util.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_bbs.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_bdpe.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_bgn.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_bls.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_cls.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_cmlhs.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_ecdh.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_ecdsa.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_ecies.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_ecmqv.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_ecss.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_ers.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_etrs.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_ghpe.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_ibe.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_mklhs.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_mpss.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_pcdel.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_phpe.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_pok.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_pss.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_rabin.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_rsa.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_sok.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_sokaka.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_vbnn.c create mode 100644 src/dashbls/depends/relic/src/cp/relic_cp_zss.c create mode 100644 src/dashbls/depends/relic/src/dv/relic_dv_mem.c create mode 100644 src/dashbls/depends/relic/src/dv/relic_dv_util.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_add.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_cmp.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_curve.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_dbl.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_frb.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_hlv.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_map.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_mul.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_mul_fix.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_mul_sim.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_neg.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_norm.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_param.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_pck.c create mode 100644 src/dashbls/depends/relic/src/eb/relic_eb_util.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_add.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_cmp.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_curve.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_dbl.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_map.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_mul.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_mul_fix.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_mul_sim.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_neg.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_norm.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_param.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_pck.c create mode 100644 src/dashbls/depends/relic/src/ed/relic_ed_util.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_add.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_cmp.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_curve.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_dbl.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_map.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_mul.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_mul_fix.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_mul_sim.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_neg.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_norm.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_param.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_pck.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_psi.c create mode 100644 src/dashbls/depends/relic/src/ep/relic_ep_util.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_add.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_cmp.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_curve.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_dbl.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_frb.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_map.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_mul.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_mul_cof.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_mul_fix.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_mul_sim.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_neg.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_norm.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_pck.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep2_util.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_add.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_cmp.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_curve.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_dbl.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_frb.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_map.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_mul.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_mul_cof.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_mul_fix.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_mul_sim.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_neg.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_norm.c create mode 100644 src/dashbls/depends/relic/src/epx/relic_ep4_util.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_add.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_cmp.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_exp.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_inv.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_itr.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_mul.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_param.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_poly.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_rdc.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_shift.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_slv.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_sqr.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_srt.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_trc.c create mode 100644 src/dashbls/depends/relic/src/fb/relic_fb_util.c create mode 100644 src/dashbls/depends/relic/src/fbx/relic_fb2_inv.c create mode 100644 src/dashbls/depends/relic/src/fbx/relic_fb2_mul.c create mode 100644 src/dashbls/depends/relic/src/fbx/relic_fb2_slv.c create mode 100644 src/dashbls/depends/relic/src/fbx/relic_fb2_sqr.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_add.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_cmp.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_exp.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_inv.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_mul.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_param.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_prime.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_rdc.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_shift.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_sqr.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_srt.c create mode 100644 src/dashbls/depends/relic/src/fp/relic_fp_util.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp12_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp12_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp18_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp18_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp24_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp24_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp2_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp2_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp3_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp3_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp48_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp48_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp4_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp4_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp54_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp54_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp6_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp6_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp8_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp8_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp9_mul.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fp9_sqr.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_add.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_cmp.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_cyc.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_exp.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_field.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_frb.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_inv.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_pck.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_rdc.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_srt.c create mode 100644 src/dashbls/depends/relic/src/fpx/relic_fpx_util.c create mode 100644 src/dashbls/depends/relic/src/low/arm-asm-254/relic_fp_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/arm-asm-254/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/arm-asm-254/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/arm-asm-254/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/arm-asm-254/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/arm-asm-254/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_bn_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_bn_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_bn_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_fp_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_fp_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_fp_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-158/relic_fp_sqr_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_bn_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_bn_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_bn_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_fb_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_fb_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_fb_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_fb_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_fb_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_fb_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_fb_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/avr-asm-163/relic_fb_sqr_low.s create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/macros.h create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_itr_low.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_mul_low_cl.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_mul_low_ld.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_mul_low_sf.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_slv_low.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_srt_low.c create mode 100644 src/dashbls/depends/relic/src/low/curve2251-sse/relic_fb_trc_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_bn_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_bn_div_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_bn_mod_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_bn_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_bn_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_bn_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fb_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fb_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fb_itr_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fb_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fb_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fb_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fb_slv_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fb_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fb_srt_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fb_trc_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fp_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fp_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fp_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fpx_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fpx_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fpx_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/easy/relic_fpx_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/fiat/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/fiat/relic_fp_add_low.tmpl create mode 100644 src/dashbls/depends/relic/src/low/fiat/relic_fp_mul_low.tmpl create mode 100644 src/dashbls/depends/relic/src/low/fiat/relic_fp_sqr_low.tmpl create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_bn_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_bn_div_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_bn_mod_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_bn_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_bn_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_bn_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_fp_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_fp_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_fp_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp-sec/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_bn_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_bn_div_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_bn_mod_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_bn_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_bn_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_bn_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_fb_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_fb_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_fp_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_fp_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_fp_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/gmp/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fb_mul_163_ld.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fb_mul_271_ld.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fb_mul_271_ld_k2.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fb_mul_283_ld.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fb_mul_353_ld_k2.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fb_mul_353_ld_k3.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fb_srt_271_penta.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fb_srt_353_trino.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_mul32_160_comba.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_mul32_256_comba.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_mul_128_comba.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_mul_160_comba.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_rdc32_160_montgomery_sparse.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_rdc32_256_montgomery_sparse.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_rdc_160_montgomery_sparse.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_rdc_256_montgomery_sparse.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_rdc_256p1.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_sqr32_160_comba.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_sqr32_256_comba.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_sqr_128_comba.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/fp_sqr_160_comba.inc create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_bn_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_bn_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_bn_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_bn_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_mul_low_163.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_mul_low_271.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_mul_low_283.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_mul_low_353.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_mul_low_353_k3.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_rdc_low_163.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_rdc_low_271.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_rdc_low_283.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_rdc_low_353.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_sqr_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_srt_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fb_srt_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_mul_low_160.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_mul_low_256.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_rdc_low_160k1.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_rdc_low_160p1.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_rdc_low_256k1.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_rdc_low_256p1.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_sqr_low.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_sqr_low_160.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fp_sqr_low_256.s create mode 100644 src/dashbls/depends/relic/src/low/msp-asm/relic_fpx_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/macro.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/relic_fp_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/relic_fp_inv_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/relic_fp_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/relic_fp_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-446/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/macro.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/relic_fp_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/relic_fp_inv_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/relic_fp_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/relic_fp_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-455/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/macro.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fp_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fp_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fp_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fp_sqr_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fpx_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fpx_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fpx_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fpx_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fpx_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fpx_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fpx_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-4l/relic_fpx_sqr_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/macro.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fpx_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fpx_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fpx_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fpx_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-544/relic_fpx_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-638/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-638/macro.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-638/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-638/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-638/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-638/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-638/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-638/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-638/relic_fpx_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-638/relic_fpx_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/macro.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/relic_fp_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/relic_fp_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/relic_fp_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-6l/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/macro.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/relic_fp_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/relic_fp_inv_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/relic_fp_shift_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/relic_fp_shift_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-8l/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-9l/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-9l/macro.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-9l/relic_fp_add_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-9l/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-9l/relic_fp_mul_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-9l/relic_fp_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-9l/relic_fp_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-9l/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-9l/relic_fpx_rdc_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-asm-9l/relic_fpx_rdc_low.s create mode 100644 src/dashbls/depends/relic/src/low/x64-fiat-381/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/src/low/x64-fiat-381/bls12_381_q_64.c create mode 100644 src/dashbls/depends/relic/src/low/x64-fiat-381/relic_fp_add_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-fiat-381/relic_fp_inv_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-fiat-381/relic_fp_mul_low.c create mode 100644 src/dashbls/depends/relic/src/low/x64-fiat-381/relic_fp_sqr_low.c create mode 100644 src/dashbls/depends/relic/src/md/blake2-impl.h create mode 100644 src/dashbls/depends/relic/src/md/blake2.h create mode 100644 src/dashbls/depends/relic/src/md/blake2_COPYING create mode 100644 src/dashbls/depends/relic/src/md/blake2s-ref.c create mode 100644 src/dashbls/depends/relic/src/md/relic_md_blake2s.c create mode 100644 src/dashbls/depends/relic/src/md/relic_md_hmac.c create mode 100644 src/dashbls/depends/relic/src/md/relic_md_kdf.c create mode 100644 src/dashbls/depends/relic/src/md/relic_md_mgf.c create mode 100644 src/dashbls/depends/relic/src/md/relic_md_sha224.c create mode 100644 src/dashbls/depends/relic/src/md/relic_md_sha256.c create mode 100644 src/dashbls/depends/relic/src/md/relic_md_sha384.c create mode 100644 src/dashbls/depends/relic/src/md/relic_md_sha512.c create mode 100644 src/dashbls/depends/relic/src/md/relic_md_xmd.c create mode 100644 src/dashbls/depends/relic/src/md/sha.h create mode 100644 src/dashbls/depends/relic/src/md/sha224-256.c create mode 100644 src/dashbls/depends/relic/src/md/sha384-512.c create mode 100644 src/dashbls/depends/relic/src/md/sha_private.h create mode 100644 src/dashbls/depends/relic/src/mpc/relic_mt_mpc.c create mode 100644 src/dashbls/depends/relic/src/mpc/relic_pc_mpc.c create mode 100644 src/dashbls/depends/relic/src/pc/relic_pc_core.c create mode 100644 src/dashbls/depends/relic/src/pc/relic_pc_exp.c create mode 100644 src/dashbls/depends/relic/src/pc/relic_pc_util.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_add_k12.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_add_k2.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_add_k24.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_add_k48.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_add_k54.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_add_k8.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_dbl_k12.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_dbl_k2.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_dbl_k24.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_dbl_k48.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_dbl_k54.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_dbl_k8.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_exp_k12.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_exp_k2.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_exp_k24.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_exp_k48.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_exp_k54.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_exp_k8.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_map.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_map_k12.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_map_k2.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_map_k24.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_map_k48.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_map_k54.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_map_k8.c create mode 100644 src/dashbls/depends/relic/src/pp/relic_pp_norm.c create mode 100644 src/dashbls/depends/relic/src/rand/relic_rand_call.c create mode 100644 src/dashbls/depends/relic/src/rand/relic_rand_core.c create mode 100644 src/dashbls/depends/relic/src/rand/relic_rand_hashd.c create mode 100644 src/dashbls/depends/relic/src/rand/relic_rand_rdrnd.c create mode 100644 src/dashbls/depends/relic/src/rand/relic_rand_udev.c create mode 100644 src/dashbls/depends/relic/src/relic_bench.c create mode 100644 src/dashbls/depends/relic/src/relic_conf.c create mode 100644 src/dashbls/depends/relic/src/relic_core.c create mode 100644 src/dashbls/depends/relic/src/relic_err.c create mode 100644 src/dashbls/depends/relic/src/relic_test.c create mode 100644 src/dashbls/depends/relic/src/relic_util.c create mode 100644 src/dashbls/depends/relic/src/tmpl/relic_tmpl_map.h create mode 100644 src/dashbls/depends/relic/test/CMakeLists.txt create mode 100644 src/dashbls/depends/relic/test/test_bn.c create mode 100644 src/dashbls/depends/relic/test/test_core.c create mode 100644 src/dashbls/depends/relic/test/test_cp.c create mode 100644 src/dashbls/depends/relic/test/test_dv.c create mode 100644 src/dashbls/depends/relic/test/test_eb.c create mode 100644 src/dashbls/depends/relic/test/test_ec.c create mode 100644 src/dashbls/depends/relic/test/test_ed.c create mode 100644 src/dashbls/depends/relic/test/test_ep.c create mode 100644 src/dashbls/depends/relic/test/test_epx.c create mode 100644 src/dashbls/depends/relic/test/test_err.c create mode 100644 src/dashbls/depends/relic/test/test_fb.c create mode 100644 src/dashbls/depends/relic/test/test_fbx.c create mode 100644 src/dashbls/depends/relic/test/test_fp.c create mode 100644 src/dashbls/depends/relic/test/test_fpx.c create mode 100644 src/dashbls/depends/relic/test/test_md.c create mode 100644 src/dashbls/depends/relic/test/test_mpc.c create mode 100644 src/dashbls/depends/relic/test/test_pc.c create mode 100644 src/dashbls/depends/relic/test/test_pp.c create mode 100644 src/dashbls/depends/relic/test/test_rand.c create mode 100644 src/dashbls/depends/relic/tools/git-creation-date.sh create mode 100644 src/dashbls/depends/relic/tools/relic_gen_label.sh create mode 100644 src/dashbls/emsdk_build.sh create mode 100644 src/dashbls/go-bindings/.gitignore create mode 100644 src/dashbls/go-bindings/Makefile create mode 100644 src/dashbls/go-bindings/README.md create mode 100644 src/dashbls/go-bindings/blschia.cpp create mode 100644 src/dashbls/go-bindings/blschia.h create mode 100644 src/dashbls/go-bindings/elements.cpp create mode 100644 src/dashbls/go-bindings/elements.go create mode 100644 src/dashbls/go-bindings/elements.h create mode 100644 src/dashbls/go-bindings/error.go create mode 100644 src/dashbls/go-bindings/error.h create mode 100644 src/dashbls/go-bindings/go.mod create mode 100644 src/dashbls/go-bindings/go.sum create mode 100644 src/dashbls/go-bindings/privatekey.cpp create mode 100644 src/dashbls/go-bindings/privatekey.go create mode 100644 src/dashbls/go-bindings/privatekey.h create mode 100644 src/dashbls/go-bindings/schemes.cpp create mode 100644 src/dashbls/go-bindings/schemes.go create mode 100644 src/dashbls/go-bindings/schemes.h create mode 100644 src/dashbls/go-bindings/schemes_test.go create mode 100644 src/dashbls/go-bindings/threshold.cpp create mode 100644 src/dashbls/go-bindings/threshold.go create mode 100644 src/dashbls/go-bindings/threshold.h create mode 100644 src/dashbls/go-bindings/threshold_test.go create mode 100644 src/dashbls/go-bindings/util.go create mode 100644 src/dashbls/go-bindings/util_test.go create mode 100644 src/dashbls/go-bindings/utils.cpp create mode 100644 src/dashbls/go-bindings/utils.hpp create mode 100644 src/dashbls/include/dashbls/bls.hpp create mode 100644 src/dashbls/include/dashbls/chaincode.hpp create mode 100644 src/dashbls/include/dashbls/elements.hpp create mode 100644 src/dashbls/include/dashbls/extendedprivatekey.hpp create mode 100644 src/dashbls/include/dashbls/extendedpublickey.hpp create mode 100644 src/dashbls/include/dashbls/hdkeys.hpp create mode 100644 src/dashbls/include/dashbls/hkdf.hpp create mode 100644 src/dashbls/include/dashbls/legacy.hpp create mode 100644 src/dashbls/include/dashbls/privatekey.hpp create mode 100644 src/dashbls/include/dashbls/schemes.hpp create mode 100644 src/dashbls/include/dashbls/test-utils.hpp create mode 100644 src/dashbls/include/dashbls/threshold.hpp create mode 100644 src/dashbls/include/dashbls/util.hpp create mode 100644 src/dashbls/js-bindings/CMakeLists.txt create mode 100644 src/dashbls/js-bindings/README.md create mode 100644 src/dashbls/js-bindings/blsjs.d.ts create mode 100644 src/dashbls/js-bindings/bundle_wasm_for_web.js create mode 100644 src/dashbls/js-bindings/helpers.cpp create mode 100644 src/dashbls/js-bindings/helpers.h create mode 100644 src/dashbls/js-bindings/jsbindings.cpp create mode 100644 src/dashbls/js-bindings/package-lock.json create mode 100644 src/dashbls/js-bindings/package.json create mode 100644 src/dashbls/js-bindings/tests/PrivateKey.spec.js create mode 100644 src/dashbls/js-bindings/tests/PublicKey.spec.js create mode 100644 src/dashbls/js-bindings/tests/Signature.spec.js create mode 100644 src/dashbls/js-bindings/tests/karma.conf.js create mode 100644 src/dashbls/js-bindings/tests/karma.test.js create mode 100644 src/dashbls/js-bindings/tests/test.js create mode 100644 src/dashbls/js-bindings/tests/typings.spec.ts create mode 100644 src/dashbls/js-bindings/tests/webpack.config.js create mode 100644 src/dashbls/js-bindings/tests/yarn.lock create mode 100644 src/dashbls/js-bindings/wrappers/BignumWrapper.cpp create mode 100644 src/dashbls/js-bindings/wrappers/BignumWrapper.h create mode 100644 src/dashbls/js-bindings/wrappers/G1ElementWrapper.cpp create mode 100644 src/dashbls/js-bindings/wrappers/G1ElementWrapper.h create mode 100644 src/dashbls/js-bindings/wrappers/G2ElementWrapper.cpp create mode 100644 src/dashbls/js-bindings/wrappers/G2ElementWrapper.h create mode 100644 src/dashbls/js-bindings/wrappers/JSWrapper.h create mode 100644 src/dashbls/js-bindings/wrappers/PrivateKeyWrapper.cpp create mode 100644 src/dashbls/js-bindings/wrappers/PrivateKeyWrapper.h create mode 100644 src/dashbls/js-bindings/wrappers/SchemeMPLWrapper.cpp create mode 100644 src/dashbls/js-bindings/wrappers/SchemeMPLWrapper.h create mode 100644 src/dashbls/js-bindings/wrappers/UtilWrapper.cpp create mode 100644 src/dashbls/js-bindings/wrappers/UtilWrapper.h create mode 100644 src/dashbls/js_build.sh create mode 100644 src/dashbls/js_build_docker.sh create mode 100644 src/dashbls/js_test.sh create mode 100644 src/dashbls/lgtm.yml create mode 100644 src/dashbls/mypi.ini create mode 100644 src/dashbls/pyproject.toml create mode 100644 src/dashbls/python-bindings/CMakeLists.txt create mode 100644 src/dashbls/python-bindings/README.md create mode 100644 src/dashbls/python-bindings/benchmark.py create mode 100644 src/dashbls/python-bindings/pythonbindings.cpp create mode 100644 src/dashbls/python-bindings/test.py create mode 100644 src/dashbls/python-impl/README.md create mode 100644 src/dashbls/python-impl/bls12381.py create mode 100644 src/dashbls/python-impl/ec.py create mode 100644 src/dashbls/python-impl/fields.py create mode 100644 src/dashbls/python-impl/hash_to_field.py create mode 100644 src/dashbls/python-impl/hd_keys.py create mode 100644 src/dashbls/python-impl/hkdf.py create mode 100644 src/dashbls/python-impl/impl-test.py create mode 100644 src/dashbls/python-impl/op_swu_g2.py create mode 100644 src/dashbls/python-impl/pairing.py create mode 100644 src/dashbls/python-impl/private_key.py create mode 100644 src/dashbls/python-impl/schemes.py create mode 100644 src/dashbls/python-impl/util.py create mode 100644 src/dashbls/rust-bindings/.gitignore create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/.rustfmt.toml create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/Cargo.toml create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/bindings.rs create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/build.rs create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/bip32/chaincode.cpp create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/bip32/chaincode.h create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/bip32/extendedprivatekey.cpp create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/bip32/extendedprivatekey.h create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/bip32/extendedpublickey.cpp create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/bip32/extendedpublickey.h create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/blschia.cpp create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/blschia.h create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/elements.cpp create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/elements.h create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/error.h create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/privatekey.cpp create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/privatekey.h create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/schemes.cpp create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/schemes.h create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/threshold.cpp create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/threshold.h create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/utils.cpp create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/c-bindings/utils.hpp create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/include.h create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/src/lib.rs create mode 100644 src/dashbls/rust-bindings/bls-dash-sys/tests/sign_and_verify.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/.rustfmt.toml create mode 100644 src/dashbls/rust-bindings/bls-signatures/Cargo.toml create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/bip32/chain_code.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/bip32/mod.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/bip32/private_key.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/bip32/public_key.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/elements.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/legacy/bip32/mod.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/legacy/bip32/private_key.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/legacy/bip32/public_key.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/legacy/elements.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/legacy/mod.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/lib.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/private_key.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/schemes.rs create mode 100644 src/dashbls/rust-bindings/bls-signatures/src/utils.rs create mode 100644 src/dashbls/rust-bindings/example/Cargo.toml create mode 100644 src/dashbls/rust-bindings/example/src/main.rs create mode 100644 src/dashbls/setjmp_patch.diff create mode 100644 src/dashbls/setup.py create mode 100644 src/dashbls/src/CMakeLists.txt create mode 100644 src/dashbls/src/bls.cpp create mode 100644 src/dashbls/src/chaincode.cpp create mode 100644 src/dashbls/src/elements.cpp create mode 100644 src/dashbls/src/extendedprivatekey.cpp create mode 100644 src/dashbls/src/extendedpublickey.cpp create mode 100644 src/dashbls/src/legacy.cpp create mode 100644 src/dashbls/src/privatekey.cpp create mode 100644 src/dashbls/src/schemes.cpp create mode 100644 src/dashbls/src/test-bench.cpp create mode 100644 src/dashbls/src/test.cpp create mode 100644 src/dashbls/src/threshold.cpp diff --git a/src/dashbls/.clang-format b/src/dashbls/.clang-format new file mode 100644 index 000000000000..b2a45d802046 --- /dev/null +++ b/src/dashbls/.clang-format @@ -0,0 +1,17 @@ +BasedOnStyle: Google +UseTab: Never +ColumnLimit: 80 +IndentWidth: 4 +TabWidth: 4 +AllowShortIfStatementsOnASingleLine: false +IndentCaseLabels: false +AccessModifierOffset: -4 +BinPackArguments: false +BinPackParameters: false +AlignAfterOpenBracket: AlwaysBreak +IndentCaseLabels: true +AllowAllParametersOfDeclarationOnNextLine: false +BreakBeforeBraces: Custom +BraceWrapping: + AfterFunction: true +PenaltyReturnTypeOnItsOwnLine: 1000 diff --git a/src/dashbls/.flake8 b/src/dashbls/.flake8 new file mode 100644 index 000000000000..ccb153056291 --- /dev/null +++ b/src/dashbls/.flake8 @@ -0,0 +1,4 @@ +[flake8] +max-line-length = 120 +exclude = ./typings/**/* python-impl/fields.py +ignore = E203,W503,E501 diff --git a/src/dashbls/.github/workflows/build-binds.yml b/src/dashbls/.github/workflows/build-binds.yml new file mode 100644 index 000000000000..6fc729109d74 --- /dev/null +++ b/src/dashbls/.github/workflows/build-binds.yml @@ -0,0 +1,84 @@ +name: Build and test binds + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +concurrency: + # SHA is added to the end if on `main` to let all main workflows run + group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main') && github.sha || '' }} + cancel-in-progress: true + +jobs: + build: + name: ${{ matrix.os }}, Python ${{ matrix.python }}, Go ${{ matrix.golang }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, ubuntu-latest] + golang: [ '1.22' ] + python: ['3.9', '3.10', '3.11', '3.12'] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - uses: chia-network/actions/setup-python@main + with: + python-version: ${{ matrix.python }} + + - name: Test Python implementation + run: | + python python-impl/impl-test.py + + - name: Install Emscripten SDK + uses: mymindstorm/setup-emsdk@v11 + + - name: Build JavaScript bindings + run: | + emcc -v + sh emsdk_build.sh + + - name: Test JavaScript bindings + run: | + sh js_test.sh + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ^${{ matrix.golang }} + + - name: Prepare build system for Ubuntu + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install -qq --yes valgrind libgmp-dev cmake + hash -r + cmake --version + + - name: Prepare build system for macOS + if: startsWith(matrix.os, 'macos') + run: | + ls -l + export MACOSX_DEPLOYMENT_TARGET=10.14 + brew install gmp + + - name: Build library using CMake + run: | + mkdir -p build && cd build + cmake .. + cmake --build . -- -j 6 + + - name: Build Go bindings + # TODO: macos build is broken. Whoever needs this - please fix it and remove `if` below. + if: startsWith(matrix.os, 'ubuntu') + run: | + cd go-bindings + make diff --git a/src/dashbls/.github/workflows/build-test.yaml b/src/dashbls/.github/workflows/build-test.yaml new file mode 100644 index 000000000000..e023515ee2cb --- /dev/null +++ b/src/dashbls/.github/workflows/build-test.yaml @@ -0,0 +1,72 @@ +name: Build and test library + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +concurrency: + # SHA is added to the end if on `main` to let all main workflows run + group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main') && github.sha || '' }} + cancel-in-progress: true + +jobs: + build: + name: ${{ matrix.os }}, ${{ matrix.builder }}, ${{ matrix.compiler.cc }}, ${{ matrix.backend }} backend + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ macos-latest, ubuntu-20.04 ] + builder: [ cmake, autotools ] + compiler: + - cc: gcc + cxx: g++ + - cc: clang + cxx: clang++ + backend: [ easy, gmp ] + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Prepare build system for Ubuntu + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install -qq --yes valgrind libgmp-dev cmake + hash -r + cmake --version + + - name: Prepare build system for macOS + if: startsWith(matrix.os, 'macos') + run: | + ls -l + export MACOSX_DEPLOYMENT_TARGET=10.14 + brew install autoconf automake gmp libtool pkg-config + + - name: Build library using CMake + if: startsWith(matrix.builder, 'cmake') + run: | + mkdir -p build && cd build + CC=${{ matrix.compiler.cc }} CXX=${{ matrix.compiler.cxx }} cmake .. -DBUILD_BLS_PYTHON_BINDINGS=0 -DARITH=${{ matrix.backend }} + cmake --build . -- -j 6 + mv src/runtest .. + + - name: Build library using GNU Autotools + if: startsWith(matrix.builder, 'autotools') + run: | + ./autogen.sh + CC=${{ matrix.compiler.cc }} CXX=${{ matrix.compiler.cxx }} ./configure --with-backend=${{ matrix.backend }} + make -j8 + + - name: Run tests + run: ./runtest + + - name: Run valgrind on Ubuntu + if: startsWith(matrix.os, 'ubuntu') + run: valgrind --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all ./runtest diff --git a/src/dashbls/.github/workflows/build-wheels.yml b/src/dashbls/.github/workflows/build-wheels.yml new file mode 100644 index 000000000000..6953beebc5f8 --- /dev/null +++ b/src/dashbls/.github/workflows/build-wheels.yml @@ -0,0 +1,357 @@ +name: build - check - upload + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +concurrency: + # SHA is added to the end if on `main` to let all main workflows run + group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} + cancel-in-progress: true + +jobs: + build-wheels: + name: Wheel - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }} + runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} + strategy: + fail-fast: false + matrix: + os: + - name: macOS + matrix: macos + runs-on: + arm: [macOS, ARM64] + intel: [macos-latest] + cibw-archs-macos: + arm: arm64 + intel: x86_64 + - name: Ubuntu + matrix: ubuntu + runs-on: + arm: [Linux, ARM64] + intel: [ubuntu-latest] + - name: Windows + matrix: windows + runs-on: + intel: [windows-latest] + python: + - major-dot-minor: '3.7' + cibw-build: 'cp37-*' + manylinux: + arch: manylinux2014 + intel: manylinux2010 + matrix: '3.7' + - major-dot-minor: '3.8' + cibw-build: 'cp38-*' + manylinux: + arch: manylinux2014 + intel: manylinux2010 + matrix: '3.8' + - major-dot-minor: '3.9' + cibw-build: 'cp39-*' + manylinux: + arch: manylinux2014 + intel: manylinux2010 + matrix: '3.9' + - major-dot-minor: '3.10' + cibw-build: 'cp310-*' + manylinux: + arch: manylinux2014 + intel: manylinux2010 + matrix: '3.10' + - major-dot-minor: '3.11' + cibw-build: 'cp311-*' + manylinux: + arch: manylinux2014 + intel: manylinux2014 + matrix: '3.11' + arch: + - name: ARM + matrix: arm + - name: Intel + matrix: intel + exclude: + # Only partial entries are required here by GitHub Actions so generally I + # only specify the `matrix:` entry. The super linter complains so for now + # all entries are included to avoid that. Reported at + # https://github.com/github/super-linter/issues/3016 + - os: + name: Windows + matrix: windows + runs-on: + intel: [windows-latest] + arch: + name: ARM + matrix: arm + - os: + name: macOS + matrix: macos + runs-on: + arm: [macOS, ARM64] + intel: [macos-latest] + python: + major-dot-minor: '3.7' + cibw-build: 'cp37-*' + matrix: '3.7' + arch: + name: ARM + matrix: arm + - os: + name: macOS + matrix: macos + runs-on: + arm: [macOS, ARM64] + intel: [macos-latest] + python: + major-dot-minor: '3.8' + cibw-build: 'cp38-*' + matrix: '3.8' + arch: + name: ARM + matrix: arm + + steps: + - name: Clean workspace + uses: Chia-Network/actions/clean-workspace@main + + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: chia-network/actions/setup-python@main + with: + python-version: ${{ matrix.python.major-dot-minor }} + + - name: Install pipx + run: | + pip install pipx + + - name: Build and test + env: + CIBW_PRERELEASE_PYTHONS: True + CIBW_BUILD_VERBOSITY_MACOS: 0 + CIBW_BUILD_VERBOSITY_LINUX: 0 + CIBW_BUILD_VERBOSITY_WINDOWS: 0 + CIBW_BUILD: ${{ matrix.python.cibw-build }} + CIBW_SKIP: '*-manylinux_i686 *-win32 *-musllinux_*' + CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.python.manylinux['arm'] }} + CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.python.manylinux['intel'] }} + CIBW_ENVIRONMENT_LINUX: "PATH=/project/cmake-3.14.3-Linux-`uname -m`/bin:$PATH" + CIBW_BEFORE_ALL_LINUX: > + yum -y install epel-release + && echo "epel-release installed" + && yum -y install lzip + && echo "lzip installed" + && curl -L https://github.com/Kitware/CMake/releases/download/v3.14.3/cmake-3.14.3-Linux-`uname -m`.sh > cmake.sh + && yes | sh cmake.sh | cat + && rm -f /usr/bin/cmake + && curl -L https://gmplib.org/download/gmp/gmp-6.2.1.tar.lz | tar x --lzip + && cp contrib/gmp-patch-6.2.1/longlong.h gmp-6.2.1/ + && cp contrib/gmp-patch-6.2.1/compat.c gmp-6.2.1/ + && cd gmp-6.2.1 && ./configure --enable-fat + && make && make install && cd .. && rm -rf gmp-6.2.1 + && cmake --version + && uname -a + CIBW_BEFORE_BUILD_LINUX: > + python -m pip install --upgrade pip + CIBW_ARCHS_MACOS: ${{ matrix.os.cibw-archs-macos[matrix.arch.matrix] }} + CIBW_BEFORE_ALL_MACOS: > + brew install gmp boost cmake + CIBW_BEFORE_BUILD_MACOS: > + python -m pip install --upgrade pip + CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=10.14" + CIBW_REPAIR_WHEEL_COMMAND_MACOS: > + pip uninstall -y delocate && pip install git+https://github.com/Chia-Network/delocate.git + && delocate-listdeps {wheel} && delocate-wheel -v {wheel} + && cp {wheel} {dest_dir} + CIBW_BEFORE_ALL_WINDOWS: > + curl -L https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable-msvc.zip > libsodium-1.0.18-stable-msvc.zip + && 7z x libsodium-1.0.18-stable-msvc.zip + && git clone https://github.com/Chia-Network/relic_ietf_64.git + && ls -l relic_ietf_64 + && git clone https://github.com/Chia-Network/mpir_gc_x64.git + && ls -l mpir_gc_x64 + CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: > + ls -l mpir_gc_x64 && pip uninstall -y delocate + && pip install git+https://github.com/Chia-Network/delocate.git + && delocate-wheel -v -i mpir_gc_x64/mpir.dll {wheel} + && delocate-wheel -v -i mpir_gc_x64/mpir_gc.dll {wheel} + && delocate-wheel -v -i mpir_gc_x64/mpir_broadwell.dll {wheel} + && delocate-wheel -v -i mpir_gc_x64/mpir_broadwell_avx.dll {wheel} + && delocate-wheel -v -i mpir_gc_x64/mpir_bulldozer.dll {wheel} + && delocate-wheel -v -i mpir_gc_x64/mpir_haswell.dll {wheel} + && delocate-wheel -v -i mpir_gc_x64/mpir_piledriver.dll {wheel} + && delocate-wheel -v -i mpir_gc_x64/mpir_sandybridge.dll {wheel} + && delocate-wheel -v -i mpir_gc_x64/mpir_skylake_avx.dll {wheel} + && cp {wheel} {dest_dir} + CIBW_TEST_REQUIRES: pytest + CIBW_TEST_COMMAND: py.test -v {project}/python-bindings/test.py + run: + pipx run --spec='cibuildwheel==2.9.0' cibuildwheel --output-dir dist 2>&1 + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: packages + path: ./dist + + build-sdist: + name: sdist - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }} + runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} + strategy: + fail-fast: false + matrix: + os: + - name: Ubuntu + matrix: ubuntu + runs-on: + arm: [Linux, ARM64] + intel: [ubuntu-latest] + python: + - major-dot-minor: '3.9' + matrix: '3.9' + arch: + - name: Intel + matrix: intel + + steps: + - name: Clean workspace + uses: Chia-Network/actions/clean-workspace@main + + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: Chia-Network/actions/setup-python@main + with: + python-version: ${{ matrix.python.major-dot-minor }} + + - name: Build source distribution + run: | + pip install build + python -m build --sdist --outdir dist . + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: packages + path: ./dist + + check: + name: Check - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }} + runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} + strategy: + fail-fast: false + matrix: + os: + - name: Ubuntu + matrix: ubuntu + runs-on: + arm: [Linux, ARM64] + intel: [ubuntu-latest] + python: + - major-dot-minor: '3.9' + matrix: '3.9' + arch: + - name: Intel + matrix: intel + + steps: + - name: Clean workspace + uses: Chia-Network/actions/clean-workspace@main + + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: Chia-Network/actions/setup-python@main + with: + python-version: ${{ matrix.python.major-dot-minor }} + + - name: flake8 + run: | + pip install flake8 + flake8 src setup.py python-bindings python-impl + - name: mypy + run: | + pip install mypy + mypy --config-file mypi.ini python-bindings python-impl + upload: + name: Upload to PyPI - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }} + runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} + needs: + - build-wheels + - build-sdist + - check + strategy: + fail-fast: false + matrix: + os: + - name: Ubuntu + matrix: ubuntu + runs-on: + arm: [Linux, ARM64] + intel: [ubuntu-latest] + python: + - major-dot-minor: '3.9' + matrix: '3.9' + arch: + - name: Intel + matrix: intel + + steps: + - name: Clean workspace + uses: Chia-Network/actions/clean-workspace@main + + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: Chia-Network/actions/setup-python@main + with: + python-version: ${{ matrix.python.major-dot-minor }} + + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: packages + path: ./dist + + - name: Test for secrets access + id: check_secrets + shell: bash + run: | + unset HAS_SECRET + if [ -n "$SECRET" ]; then HAS_SECRET='true' ; fi + echo ::set-output name=HAS_SECRET::${HAS_SECRET} + env: + SECRET: "${{ secrets.test_pypi_password }}" + + - name: Install twine + run: pip install twine + + - name: Publish distribution to PyPI + if: startsWith(github.event.ref, 'refs/tags') && steps.check_secrets.outputs.HAS_SECRET + env: + TWINE_USERNAME: __token__ + TWINE_NON_INTERACTIVE: 1 + TWINE_PASSWORD: ${{ secrets.pypi_password }} + run: twine upload --non-interactive --skip-existing --verbose 'dist/*' + + - name: Publish distribution to Test PyPI + if: steps.check_secrets.outputs.HAS_SECRET + env: + TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/ + TWINE_USERNAME: __token__ + TWINE_NON_INTERACTIVE: 1 + TWINE_PASSWORD: ${{ secrets.test_pypi_password }} + run: twine upload --non-interactive --skip-existing --verbose 'dist/*' diff --git a/src/dashbls/.github/workflows/js-bindings.yml b/src/dashbls/.github/workflows/js-bindings.yml new file mode 100644 index 000000000000..887c8df3d628 --- /dev/null +++ b/src/dashbls/.github/workflows/js-bindings.yml @@ -0,0 +1,60 @@ +name: Build & Publish JS Bindings + +on: + push: + branches: + - main + tags: + - '**' + pull_request: + branches: + - '**' + +concurrency: + # SHA is added to the end if on `main` to let all main workflows run + group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main') && github.sha || '' }} + cancel-in-progress: true + +jobs: + js_bindings: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Install emsdk + uses: mymindstorm/setup-emsdk@v11 + + - name: Get the version + id: version_info + run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} + + - name: Update version in package.json + if: startsWith(github.ref, 'refs/tags/') + working-directory: ${{ github.workspace }}/js-bindings + env: + SOURCE_TAG: ${{ steps.version_info.outputs.SOURCE_TAG }} + run: | + jq --arg VER "$SOURCE_TAG" '.version=$VER' package.json > temp.json && mv temp.json package.json + + - name: Build JS + run: ./js_build.sh + + - name: Publish + if: startsWith(github.ref, 'refs/tags/') + working-directory: ${{ github.workspace }}/js_build/js-bindings + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc + npm publish --access public + + - name: Cleanup + if: always() + run: + rm ${{ github.workspace }}/js_build/js-bindings/.npmrc || true diff --git a/src/dashbls/.github/workflows/relic-nightly.yml b/src/dashbls/.github/workflows/relic-nightly.yml new file mode 100644 index 000000000000..2a9ef67153cc --- /dev/null +++ b/src/dashbls/.github/workflows/relic-nightly.yml @@ -0,0 +1,78 @@ +name: Build and Test with Relic Nightly + +on: + schedule: + - cron: "0 11 * * *" + workflow_dispatch: + +concurrency: + # SHA is added to the end if on `main` to let all main workflows run + group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main') && github.sha || '' }} + cancel-in-progress: true + +jobs: + build_wheels: + name: Build and Test with Relic Nightly + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, ubuntu-latest] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Ubuntu build C++ and test Relic at origin/main + if: startsWith(matrix.os, 'ubuntu') + run: | + echo "Relic origin/main commit:" + curl -H "application/vnd.github.v3.sha" \ + https://api.github.com/repos/relic-toolkit/relic/commits/main | \ + head -10 + sudo apt-get update + sudo apt-get install snap -y + sudo apt-get remove --purge cmake -y + sudo snap install cmake --classic + hash -r + cmake --version + export RELIC_MAIN=1 + mkdir -p build + cd build + cmake ../ + cmake --build . -- -j 6 + echo "Running ./src/runtest" + ./src/runtest + + - name: Mac OS build C++ and test + if: startsWith(matrix.os, 'macos') + run: | + ls -l + export MACOSX_DEPLOYMENT_TARGET=10.14 + export RELIC_MAIN=1 + mkdir -p build + ls -l build + cd build + cmake ../ + cmake --build . -- -j 6 + echo "Running ./src/runtest" + ./src/runtest + + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: '3.8' + + - name: Test pure python implementation + run: | + python python-impl/impl-test.py + + - name: Install emsdk + uses: mymindstorm/setup-emsdk@v11 + + - name: Test javascript bindings + run: | + emcc -v + export RELIC_MAIN=1 + sh emsdk_build.sh + sh js_test.sh diff --git a/src/dashbls/.github/workflows/stale-issue.yml b/src/dashbls/.github/workflows/stale-issue.yml new file mode 100644 index 000000000000..e3668dba6984 --- /dev/null +++ b/src/dashbls/.github/workflows/stale-issue.yml @@ -0,0 +1,35 @@ +--- +name: 'Close stale issues' +on: + schedule: + - cron: '0 11 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: chia-network/stale@main + with: + operations-per-run: 10000 + ascending: true + days-before-issue-stale: 14 + days-before-issue-close: 7 + days-before-pr-stale: 60 + days-before-pr-close: -1 + exempt-all-pr-milestones: true + exempt-all-issue-milestones: true + exempt-all-assignees: true + stale-issue-label: stale-issue + stale-pr-label: stale-pr + remove-stale-when-updated: true + stale-issue-message: > + 'This issue has been flagged as stale as there has been no + activity on it in 14 days. If this issue is still affecting you + and in need of review, please update it to keep it open.' + close-issue-message: > + 'This issue was automatically closed because it has been flagged + as stale and subsequently passed 7 days with no further activity.' + stale-pr-message: > + 'This PR has been flagged as stale due to no activity for over 60 + days. It will not be automatically closed, but it has been given + a stale-pr label and should be manually reviewed.' diff --git a/src/dashbls/.gitignore b/src/dashbls/.gitignore new file mode 100644 index 000000000000..bec3896a5c07 --- /dev/null +++ b/src/dashbls/.gitignore @@ -0,0 +1,117 @@ +CMakeCache.txt +CMakeFiles +cmake_install.cmake +Makefile +src/bench +src/test +src/MakefilE +src/cmake_install.cmake +src/CMakeFile +build/* +blspy.egg-info +dist +python-impl/__pycache__/ +blspy.*.so +.mypy_cache/ +.pytest_chache/ +.eggs/ +cmake-build-debug/ + +js_build +node_modules + +main +.o +obj/ +src/*.o +depends/relic/CTestTestfile.cmake +depends/relic/bench/CTestTestfile.cmake +depends/relic/bin +depends/relic/include/relic_conf.h +depends/relic/include/relic_conf.h.in +depends/relic/include/relic_conf.h.old +depends/relic/include/stamp-h1 +depends/relic/test/CTestTestfile.cmake +contrib/gmp-6.1.2/ + +.idea +.vscode +runtest +runtest.* +runbench +runbench.* + +.dirstamp +.libs +.*.swp +*.*~* +*.bak +*.rej +*.orig +*.pyc +*.o +*.o-* +*.patch +*.a +*.pb.cc +*.pb.h +*.lo +*.la + +**/.DS_Store + +*.whl +venv +env/ +yarn-error.log + +.vs/ +out/ + +target + +Makefile.in +/ar-lib +/mdate-sh +/py-compile +/test-driver +/ylwrap +.deps/ +.dirstamp +aclocal.m4 +autom4te.cache/ +build-aux/config.guess +build-aux/config.sub +build-aux/depcomp +build-aux/install-sh +build-aux/ltmain.sh +build-aux/m4/libtool.m4 +build-aux/m4/lt~obsolete.m4 +build-aux/m4/ltoptions.m4 +build-aux/m4/ltsugar.m4 +build-aux/m4/ltversion.m4 +build-aux/missing +build-aux/compile +build-aux/test-driver +configure +libtool + +autom4te.cache +/autoscan.log +/autoscan-*.log +/aclocal.m4 +/compile +/config.cache +/config.guess +/config.h.in +/config.log +/config.status +/config.sub +/configure +/configure.scan +/depcomp +/install-sh +/missing +/stamp-h1 +/ltmain.sh +/texinfo.tex diff --git a/src/dashbls/CMakeLists.txt b/src/dashbls/CMakeLists.txt new file mode 100644 index 000000000000..f413f97cc7a9 --- /dev/null +++ b/src/dashbls/CMakeLists.txt @@ -0,0 +1,150 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.14.0 FATAL_ERROR) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_C_STANDARD 99) + +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" + CACHE STRING "Possible values are empty, Debug, Release, RelWithDebInfo, MinSizeRel, ..." + FORCE + ) +endif() + +project(BLS) + +set(BUILD_BLS_JS_BINDINGS "1" CACHE STRING "") +set(BUILD_BLS_PYTHON_BINDINGS "1" CACHE STRING "") +set(BUILD_BLS_TESTS "1" CACHE STRING "") +set(BUILD_BLS_BENCHMARKS "1" CACHE STRING "") + +message(STATUS "Build python bindings: ${BUILD_BLS_PYTHON_BINDINGS}") +message(STATUS "Build tests: ${BUILD_BLS_TESTS}") +message(STATUS "Build benchmarks: ${BUILD_BLS_BENCHMARKS}") + +# Add path for custom modules +set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules +) + +# Relic related options + +set(STBIN "off" CACHE STRING "Relic - Build static binaries") + +find_package(gmp) +if (GMP_FOUND) + message(STATUS "Found libgmp") + set(ARITH "gmp" CACHE STRING "") +else() + set(ARITH "easy" CACHE STRING "") +endif() + +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(WSIZE "32" CACHE STRING "Relic - Processor word size") +else() + set(WSIZE "64" CACHE STRING "Relic - Processor word size") +endif() + +if(EMSCRIPTEN) + # emscripten needs arch set to be none since it can't compile assembly + set(ARCH "" CACHE STRING "") + # emscripten is a 32 bit compiler + set(WSIZE "32" CACHE STRING "Relic - Processor word size") +endif() + +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(TIMER "ANSI" CACHE STRING "") + set(MULTI "OPENMP" CACHE STRING "") +else() + set(TIMER "CYCLE" CACHE STRING "") + set(MULTI "PTHREAD" CACHE STRING "") +endif() + +set(CHECK "off" CACHE STRING "") +set(VERBS "off" CACHE STRING "") +set(ALLOC "AUTO" CACHE STRING "") +set(SHLIB "off" CACHE STRING "") +set(DOCUM "off" CACHE STRING "") +set(FP_PRIME "381" CACHE STRING "Relic - Prime modulus size") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(SEED "UDEV" CACHE STRING "") + set(FP_QNRES "off" CACHE STRING "") +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(SEED "WCGR" CACHE STRING "") + set(FP_QNRES "on" CACHE STRING "") +else() + set(SEED "UDEV" CACHE STRING "") + set(FP_QNRES "on" CACHE STRING "") +endif() + +set(FP_METHD "INTEG;INTEG;INTEG;MONTY;LOWER;SLIDE" CACHE STRING "") + +if(MSVC) + set(COMP_FLAGS "" CACHE STRING "") +else() + set(COMP_FLAGS "-O3 -funroll-loops -fomit-frame-pointer" CACHE STRING "") +endif() + +set(FP_PMERS "off" CACHE STRING "") +set(FPX_METHD "INTEG;INTEG;LAZYR" CACHE STRING "") +set(EP_PLAIN "off" CACHE STRING "") +set(EP_SUPER "off" CACHE STRING "") +# Disable relic tests and benchmarks +set(TESTS "0" CACHE STRING "Relic - Number of times each test is ran") +set(BENCH "0" CACHE STRING "Relic - Number of times each benchmark is ran") + +set(QUIET "on" CACHE STRING "Relic - Build with printing disabled") + +set(PP_EXT "LAZYR" CACHE STRING "") +set(PP_METHD "LAZYR;OATEP" CACHE STRING "") + +# Disable mimalloc shared libraries and tests, enable secure mode +set(MI_SECURE "on" CACHE STRING "") + +set(MI_BUILD_SHARED "off" CACHE STRING "") +set(MI_BUILD_TESTS "off" CACHE STRING "") +set(MI_OVERRIDE "off" CACHE STRING "") + +add_subdirectory(depends/relic) +add_subdirectory(depends/mimalloc) + +#message(STATUS "Patching Relic to make setjmp.h inclusion conditional") +# +#execute_process( +# COMMAND bash -c "git apply ${CMAKE_SOURCE_DIR}/setjmp_patch.diff" +# WORKING_DIRECTORY ${RELIC_SRC} +#) + +add_subdirectory(src) + + +# Write include paths for rust binding +if(EMSCRIPTEN) + file(APPEND "${CMAKE_CURRENT_LIST_DIR}/build/include_paths.txt" "${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}/c++/v1/;") +endif() + +file(APPEND "${CMAKE_CURRENT_LIST_DIR}/build/include_paths.txt" "${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES};") + +if(GMP_INCLUDES) + file(APPEND "${CMAKE_CURRENT_LIST_DIR}/build/include_paths.txt" "${GMP_INCLUDES};") +endif() + +# Write gmp library path for rust binding +if(GMP_LIBRARIES) + file(APPEND "${CMAKE_CURRENT_LIST_DIR}/build/gmp_libraries.txt" "${GMP_LIBRARIES}") +endif() + +if(EMSCRIPTEN) + if(BUILD_BLS_JS_BINDINGS) + add_subdirectory(js-bindings) + endif() +else() + # emscripten can't build python bindings, it produces only javascript + # add_subdirectory(contrib/pybind11) + if(BUILD_BLS_PYTHON_BINDINGS) + add_subdirectory(python-bindings) + endif() +endif() diff --git a/src/dashbls/LICENSE b/src/dashbls/LICENSE new file mode 100644 index 000000000000..f433b1a53f5b --- /dev/null +++ b/src/dashbls/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/src/dashbls/MANIFEST.in b/src/dashbls/MANIFEST.in new file mode 100644 index 000000000000..3063e7883b3c --- /dev/null +++ b/src/dashbls/MANIFEST.in @@ -0,0 +1,6 @@ +include README.md LICENSE +global-include CMakeLists.txt *.cmake +recursive-include cmake_modules * +recursive-include src * +recursive-include python-bindings * +recursive-include contrib * \ No newline at end of file diff --git a/src/dashbls/Makefile.am b/src/dashbls/Makefile.am new file mode 100644 index 000000000000..1c1e5d19d594 --- /dev/null +++ b/src/dashbls/Makefile.am @@ -0,0 +1,39 @@ +# Copyright (c) 2013-2016 The Bitcoin Core developers +# Copyright (c) 2022 The Dash Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING.MIT or http://www.opensource.org/licenses/mit-license.php. + +print-%: FORCE + @echo '$*'='$($*)' + +ACLOCAL_AMFLAGS = -I build-aux/m4 +.PHONY: deploy FORCE + +AM_LDFLAGS = $(HARDENED_LDFLAGS) $(CORE_LDFLAGS) $(GMP_LDFLAGS) +AM_CFLAGS = $(DEBUG_FLAGS) $(HARDENED_FLAGS) $(CORE_FLAGS) $(WARN_FLAGS) $(NOWARN_FLAGS) +AM_CPPFLAGS = $(CORE_CPPFLAGS) $(GMP_CPPFLAGS) +AM_CXXFLAGS = $(DEBUG_FLAGS) $(HARDENED_FLAGS) $(CORE_FLAGS) $(WARN_FLAGS) $(NOWARN_FLAGS) +PTHREAD_FLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) + +EXTRA_LIBRARIES = + +lib_LTLIBRARIES = +noinst_LTLIBRARIES = + +bin_PROGRAMS = +noinst_PROGRAMS = +EXTRA_DIST = + +CLEANFILES = + +include Makefile.bls.include + +CLEANFILES += $(LIBRELIC) $(LIBDASHBLS) $(LIBMIMALLOC) + +if USE_TESTS +CLEANFILES += $(DASHBLS_RUNTEST) +endif + +if USE_BENCH +CLEANFILES += $(DASHBLS_RUNBENCH) +endif diff --git a/src/dashbls/Makefile.bench.include b/src/dashbls/Makefile.bench.include new file mode 100644 index 000000000000..84b0140920fc --- /dev/null +++ b/src/dashbls/Makefile.bench.include @@ -0,0 +1,22 @@ +# Copyright (c) 2021 The PIVX developers +# Copyright (c) 2022 The Dash Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING.MIT or http://www.opensource.org/licenses/mit-license.php. + +DASHBLS_RUNBENCH = runbench + +runbench_SOURCES = \ + src/test-bench.cpp \ + src/test-utils.hpp + +runbench_SOURCES += \ + $(RELIC_H) \ + $(DASHBLS_H) + +runbench_CPPFLAGS = $(AM_CPPFLAGS) $(DASHBLS_INCLUDES) $(RELIC_INCLUDES) +runbench_CXXFLAGS = $(AM_CXXFLAGS) +runbench_LDFLAGS = -static $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) + +runbench_LDADD = $(LIBDASHBLS) + +noinst_PROGRAMS += $(DASHBLS_RUNBENCH) diff --git a/src/dashbls/Makefile.bls.include b/src/dashbls/Makefile.bls.include new file mode 100644 index 000000000000..517593b2fca5 --- /dev/null +++ b/src/dashbls/Makefile.bls.include @@ -0,0 +1,66 @@ +# Copyright (c) 2021 The PIVX developers +# Copyright (c) 2022 The Dash Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING.MIT or http://www.opensource.org/licenses/mit-license.php. + +LIBDASHBLS = libdashbls.la + +DASHBLS_CPPFLAGS = -DBLSALLOC_MIMALLOC=1 + +DASHBLS_INCLUDES = \ + -I$(builddir) \ + -I$(builddir)/obj \ + -I$(top_srcdir)/include/dashbls + +DASHBLS_H = \ + src/bls.hpp \ + src/chaincode.hpp \ + src/elements.hpp \ + src/extendedprivatekey.hpp \ + src/extendedpublickey.hpp \ + src/hdkeys.hpp \ + src/hkdf.hpp \ + src/legacy.hpp \ + src/privatekey.hpp \ + src/schemes.hpp \ + src/test-utils.hpp \ + src/threshold.hpp \ + src/util.hpp + +libdashbls_la_SOURCES = \ + src/bls.cpp \ + src/chaincode.cpp \ + src/elements.cpp \ + src/extendedprivatekey.cpp \ + src/extendedpublickey.cpp \ + src/legacy.cpp \ + src/privatekey.cpp \ + src/schemes.cpp \ + src/threshold.cpp + +libdashbls_la_SOURCES += \ + $(DASHBLS_H) \ + $(MIMALLOC_H) \ + $(RELIC_H) + +libdashbls_la_LIBADD = \ + $(LIBMIMALLOC) \ + $(LIBRELIC) \ + $(GMP_LIBS) + +libdashbls_la_CPPFLAGS = $(AM_CPPFLAGS) $(RELIC_INCLUDES) $(MIMALLOC_INCLUDES) $(DASHBLS_INCLUDES) $(DASHBLS_CPPFLAGS) +libdashbls_la_CXXFLAGS = $(AM_CXXFLAGS) +libdashbls_la_LDFLAGS = $(AM_LDFLAGS) + +include Makefile.mimalloc.include +include Makefile.relic.include + +if USE_TESTS +include Makefile.test.include +endif + +if USE_BENCH +include Makefile.bench.include +endif + +lib_LTLIBRARIES += $(LIBDASHBLS) diff --git a/src/dashbls/Makefile.mimalloc.include b/src/dashbls/Makefile.mimalloc.include new file mode 100644 index 000000000000..5f4784283016 --- /dev/null +++ b/src/dashbls/Makefile.mimalloc.include @@ -0,0 +1,44 @@ +# Copyright (c) 2022 The Dash Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING.MIT or http://www.opensource.org/licenses/mit-license.php. + +LIBMIMALLOC = libmimalloc-secure.la + +MIMALLOC_CFLAGS = \ + -DMI_SECURE=4 \ + -DNDEBUG + +MIMALLOC_INCLUDES = \ + -I$(top_srcdir)/depends/mimalloc/include \ + -I$(top_srcdir)/depends/mimalloc/src + +MIMALLOC_H = \ + depends/mimalloc/include/mimalloc.h \ + depends/mimalloc/include/mimalloc-atomic.h \ + depends/mimalloc/include/mimalloc-internal.h \ + depends/mimalloc/include/mimalloc-new-delete.h \ + depends/mimalloc/include/mimalloc-override.h \ + depends/mimalloc/include/mimalloc-track.h \ + depends/mimalloc/include/mimalloc-types.h \ + depends/mimalloc/src/bitmap.h + +libmimalloc_secure_la_SOURCES = \ + $(MIMALLOC_H) \ + depends/mimalloc/src/stats.c \ + depends/mimalloc/src/random.c \ + depends/mimalloc/src/os.c \ + depends/mimalloc/src/bitmap.c \ + depends/mimalloc/src/arena.c \ + depends/mimalloc/src/segment-cache.c \ + depends/mimalloc/src/segment.c \ + depends/mimalloc/src/page.c \ + depends/mimalloc/src/alloc.c \ + depends/mimalloc/src/alloc-aligned.c \ + depends/mimalloc/src/alloc-posix.c \ + depends/mimalloc/src/heap.c \ + depends/mimalloc/src/options.c \ + depends/mimalloc/src/init.c + +libmimalloc_secure_la_CFLAGS = $(AM_CFLAGS) $(MIMALLOC_INCLUDES) $(MIMALLOC_CFLAGS) + +noinst_LTLIBRARIES += $(LIBMIMALLOC) diff --git a/src/dashbls/Makefile.relic.include b/src/dashbls/Makefile.relic.include new file mode 100644 index 000000000000..52d796932baa --- /dev/null +++ b/src/dashbls/Makefile.relic.include @@ -0,0 +1,470 @@ +# Copyright (c) 2021 The PIVX developers +# Copyright (c) 2022 The Dash Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING.MIT or http://www.opensource.org/licenses/mit-license.php. + +LIBRELIC = librelic.la + +RELIC_INCLUDES = \ + -I$(top_srcdir)/depends/relic/include \ + -I$(top_srcdir)/depends/relic/include/low \ + -I$(top_srcdir)/depends/relic/src/tmpl + +RELIC_H = \ + depends/relic/include/relic.h \ + depends/relic/include/relic_alloc.h \ + depends/relic/include/relic_arch.h \ + depends/relic/include/relic_bc.h \ + depends/relic/include/relic_bench.h \ + depends/relic/include/relic_bn.h \ + depends/relic/include/relic_conf.h \ + depends/relic/include/relic_core.h \ + depends/relic/include/relic_cp.h \ + depends/relic/include/relic_dv.h \ + depends/relic/include/relic_eb.h \ + depends/relic/include/relic_ec.h \ + depends/relic/include/relic_ed.h \ + depends/relic/include/relic_ep.h \ + depends/relic/include/relic_epx.h \ + depends/relic/include/relic_err.h \ + depends/relic/include/relic_fb.h \ + depends/relic/include/relic_fbx.h \ + depends/relic/include/relic_fp.h \ + depends/relic/include/relic_fpx.h \ + depends/relic/include/relic_label.h \ + depends/relic/include/relic_md.h \ + depends/relic/include/relic_mpc.h \ + depends/relic/include/relic_multi.h \ + depends/relic/include/relic_pc.h \ + depends/relic/include/relic_pp.h \ + depends/relic/include/relic_rand.h \ + depends/relic/include/relic_test.h \ + depends/relic/include/relic_types.h \ + depends/relic/include/relic_util.h \ + depends/relic/include/low/relic_bn_low.h \ + depends/relic/include/low/relic_dv_low.h \ + depends/relic/include/low/relic_fb_low.h \ + depends/relic/include/low/relic_fp_low.h \ + depends/relic/include/low/relic_fpx_low.h \ + depends/relic/src/arch/lzcnt.inc \ + depends/relic/src/tmpl/relic_tmpl_map.h + +RELIC_SOURCES = \ + depends/relic/src/relic_err.c \ + depends/relic/src/relic_core.c \ + depends/relic/src/relic_conf.c \ + depends/relic/src/relic_util.c + +BN_SOURCES = \ + depends/relic/src/bn/relic_bn_add.c \ + depends/relic/src/bn/relic_bn_cmp.c \ + depends/relic/src/bn/relic_bn_div.c \ + depends/relic/src/bn/relic_bn_factor.c \ + depends/relic/src/bn/relic_bn_gcd.c \ + depends/relic/src/bn/relic_bn_inv.c \ + depends/relic/src/bn/relic_bn_lcm.c \ + depends/relic/src/bn/relic_bn_mem.c \ + depends/relic/src/bn/relic_bn_mod.c \ + depends/relic/src/bn/relic_bn_mul.c \ + depends/relic/src/bn/relic_bn_mxp.c \ + depends/relic/src/bn/relic_bn_prime.c \ + depends/relic/src/bn/relic_bn_rec.c \ + depends/relic/src/bn/relic_bn_shift.c \ + depends/relic/src/bn/relic_bn_smb.c \ + depends/relic/src/bn/relic_bn_sqr.c \ + depends/relic/src/bn/relic_bn_srt.c \ + depends/relic/src/bn/relic_bn_util.c + +FP_SOURCES = \ + depends/relic/src/fp/relic_fp_add.c \ + depends/relic/src/fp/relic_fp_cmp.c \ + depends/relic/src/fp/relic_fp_exp.c \ + depends/relic/src/fp/relic_fp_inv.c \ + depends/relic/src/fp/relic_fp_mul.c \ + depends/relic/src/fp/relic_fp_param.c \ + depends/relic/src/fp/relic_fp_prime.c \ + depends/relic/src/fp/relic_fp_rdc.c \ + depends/relic/src/fp/relic_fp_shift.c \ + depends/relic/src/fp/relic_fp_sqr.c \ + depends/relic/src/fp/relic_fp_srt.c \ + depends/relic/src/fp/relic_fp_util.c + +FPX_SOURCES = \ + depends/relic/src/fpx/relic_fp2_mul.c \ + depends/relic/src/fpx/relic_fp2_sqr.c \ + depends/relic/src/fpx/relic_fp3_mul.c \ + depends/relic/src/fpx/relic_fp3_sqr.c \ + depends/relic/src/fpx/relic_fp4_mul.c \ + depends/relic/src/fpx/relic_fp4_sqr.c \ + depends/relic/src/fpx/relic_fp6_mul.c \ + depends/relic/src/fpx/relic_fp6_sqr.c \ + depends/relic/src/fpx/relic_fp8_mul.c \ + depends/relic/src/fpx/relic_fp8_sqr.c \ + depends/relic/src/fpx/relic_fp9_mul.c \ + depends/relic/src/fpx/relic_fp9_sqr.c \ + depends/relic/src/fpx/relic_fp12_mul.c \ + depends/relic/src/fpx/relic_fp12_sqr.c \ + depends/relic/src/fpx/relic_fp18_mul.c \ + depends/relic/src/fpx/relic_fp18_sqr.c \ + depends/relic/src/fpx/relic_fp24_mul.c \ + depends/relic/src/fpx/relic_fp24_sqr.c \ + depends/relic/src/fpx/relic_fp48_mul.c \ + depends/relic/src/fpx/relic_fp48_sqr.c \ + depends/relic/src/fpx/relic_fp54_mul.c \ + depends/relic/src/fpx/relic_fp54_sqr.c \ + depends/relic/src/fpx/relic_fpx_add.c \ + depends/relic/src/fpx/relic_fpx_cmp.c \ + depends/relic/src/fpx/relic_fpx_cyc.c \ + depends/relic/src/fpx/relic_fpx_exp.c \ + depends/relic/src/fpx/relic_fpx_field.c \ + depends/relic/src/fpx/relic_fpx_frb.c \ + depends/relic/src/fpx/relic_fpx_inv.c \ + depends/relic/src/fpx/relic_fpx_pck.c \ + depends/relic/src/fpx/relic_fpx_rdc.c \ + depends/relic/src/fpx/relic_fpx_srt.c \ + depends/relic/src/fpx/relic_fpx_util.c + +FB_SOURCES = \ + depends/relic/src/fb/relic_fb_add.c \ + depends/relic/src/fb/relic_fb_cmp.c \ + depends/relic/src/fb/relic_fb_exp.c \ + depends/relic/src/fb/relic_fb_inv.c \ + depends/relic/src/fb/relic_fb_itr.c \ + depends/relic/src/fb/relic_fb_mul.c \ + depends/relic/src/fb/relic_fb_param.c \ + depends/relic/src/fb/relic_fb_poly.c \ + depends/relic/src/fb/relic_fb_rdc.c \ + depends/relic/src/fb/relic_fb_shift.c \ + depends/relic/src/fb/relic_fb_slv.c \ + depends/relic/src/fb/relic_fb_sqr.c \ + depends/relic/src/fb/relic_fb_srt.c \ + depends/relic/src/fb/relic_fb_trc.c \ + depends/relic/src/fb/relic_fb_util.c + +EP_SOURCES = \ + depends/relic/src/ep/relic_ep_add.c \ + depends/relic/src/ep/relic_ep_cmp.c \ + depends/relic/src/ep/relic_ep_curve.c \ + depends/relic/src/ep/relic_ep_dbl.c \ + depends/relic/src/ep/relic_ep_map.c \ + depends/relic/src/ep/relic_ep_mul.c \ + depends/relic/src/ep/relic_ep_mul_fix.c \ + depends/relic/src/ep/relic_ep_mul_sim.c \ + depends/relic/src/ep/relic_ep_neg.c \ + depends/relic/src/ep/relic_ep_norm.c \ + depends/relic/src/ep/relic_ep_param.c \ + depends/relic/src/ep/relic_ep_pck.c \ + depends/relic/src/ep/relic_ep_psi.c \ + depends/relic/src/ep/relic_ep_util.c + +EPX_SOURCES = \ + depends/relic/src/epx/relic_ep2_add.c \ + depends/relic/src/epx/relic_ep2_cmp.c \ + depends/relic/src/epx/relic_ep2_curve.c \ + depends/relic/src/epx/relic_ep2_dbl.c \ + depends/relic/src/epx/relic_ep2_frb.c \ + depends/relic/src/epx/relic_ep2_map.c \ + depends/relic/src/epx/relic_ep2_mul.c \ + depends/relic/src/epx/relic_ep2_mul_cof.c \ + depends/relic/src/epx/relic_ep2_mul_fix.c \ + depends/relic/src/epx/relic_ep2_mul_sim.c \ + depends/relic/src/epx/relic_ep2_neg.c \ + depends/relic/src/epx/relic_ep2_norm.c \ + depends/relic/src/epx/relic_ep2_pck.c \ + depends/relic/src/epx/relic_ep2_util.c \ + depends/relic/src/epx/relic_ep4_add.c \ + depends/relic/src/epx/relic_ep4_cmp.c \ + depends/relic/src/epx/relic_ep4_curve.c \ + depends/relic/src/epx/relic_ep4_dbl.c \ + depends/relic/src/epx/relic_ep4_frb.c \ + depends/relic/src/epx/relic_ep4_map.c \ + depends/relic/src/epx/relic_ep4_mul.c \ + depends/relic/src/epx/relic_ep4_mul_cof.c \ + depends/relic/src/epx/relic_ep4_mul_fix.c \ + depends/relic/src/epx/relic_ep4_mul_sim.c \ + depends/relic/src/epx/relic_ep4_neg.c \ + depends/relic/src/epx/relic_ep4_norm.c \ + depends/relic/src/epx/relic_ep4_util.c + +EB_SOURCES = \ + depends/relic/src/eb/relic_eb_add.c \ + depends/relic/src/eb/relic_eb_cmp.c \ + depends/relic/src/eb/relic_eb_curve.c \ + depends/relic/src/eb/relic_eb_dbl.c \ + depends/relic/src/eb/relic_eb_frb.c \ + depends/relic/src/eb/relic_eb_hlv.c \ + depends/relic/src/eb/relic_eb_map.c \ + depends/relic/src/eb/relic_eb_mul.c \ + depends/relic/src/eb/relic_eb_mul_fix.c \ + depends/relic/src/eb/relic_eb_mul_sim.c \ + depends/relic/src/eb/relic_eb_neg.c \ + depends/relic/src/eb/relic_eb_norm.c \ + depends/relic/src/eb/relic_eb_param.c \ + depends/relic/src/eb/relic_eb_pck.c \ + depends/relic/src/eb/relic_eb_util.c + +ED_SOURCES = \ + depends/relic/src/ed/relic_ed_add.c \ + depends/relic/src/ed/relic_ed_cmp.c \ + depends/relic/src/ed/relic_ed_curve.c \ + depends/relic/src/ed/relic_ed_dbl.c \ + depends/relic/src/ed/relic_ed_map.c \ + depends/relic/src/ed/relic_ed_mul.c \ + depends/relic/src/ed/relic_ed_mul_fix.c \ + depends/relic/src/ed/relic_ed_mul_sim.c \ + depends/relic/src/ed/relic_ed_neg.c \ + depends/relic/src/ed/relic_ed_norm.c \ + depends/relic/src/ed/relic_ed_param.c \ + depends/relic/src/ed/relic_ed_pck.c \ + depends/relic/src/ed/relic_ed_util.c + +PP_SOURCES = \ + depends/relic/src/pp/relic_pp_add_k2.c \ + depends/relic/src/pp/relic_pp_add_k8.c \ + depends/relic/src/pp/relic_pp_add_k12.c \ + depends/relic/src/pp/relic_pp_add_k24.c \ + depends/relic/src/pp/relic_pp_add_k48.c \ + depends/relic/src/pp/relic_pp_add_k54.c \ + depends/relic/src/pp/relic_pp_dbl_k2.c \ + depends/relic/src/pp/relic_pp_dbl_k8.c \ + depends/relic/src/pp/relic_pp_dbl_k12.c \ + depends/relic/src/pp/relic_pp_dbl_k24.c \ + depends/relic/src/pp/relic_pp_dbl_k48.c \ + depends/relic/src/pp/relic_pp_dbl_k54.c \ + depends/relic/src/pp/relic_pp_exp_k2.c \ + depends/relic/src/pp/relic_pp_exp_k8.c \ + depends/relic/src/pp/relic_pp_exp_k12.c \ + depends/relic/src/pp/relic_pp_exp_k24.c \ + depends/relic/src/pp/relic_pp_exp_k48.c \ + depends/relic/src/pp/relic_pp_exp_k54.c \ + depends/relic/src/pp/relic_pp_map.c \ + depends/relic/src/pp/relic_pp_map_k2.c \ + depends/relic/src/pp/relic_pp_map_k8.c \ + depends/relic/src/pp/relic_pp_map_k12.c \ + depends/relic/src/pp/relic_pp_map_k24.c \ + depends/relic/src/pp/relic_pp_map_k48.c \ + depends/relic/src/pp/relic_pp_map_k54.c \ + depends/relic/src/pp/relic_pp_norm.c + +PC_SOURCES = \ + depends/relic/src/pc/relic_pc_core.c \ + depends/relic/src/pc/relic_pc_exp.c \ + depends/relic/src/pc/relic_pc_util.c + +MD_SOURCES = \ + depends/relic/src/md/blake2.h \ + depends/relic/src/md/blake2-impl.h \ + depends/relic/src/md/blake2s-ref.c \ + depends/relic/src/md/relic_md_blake2s.c \ + depends/relic/src/md/relic_md_hmac.c \ + depends/relic/src/md/relic_md_kdf.c \ + depends/relic/src/md/relic_md_mgf.c \ + depends/relic/src/md/relic_md_sha224.c \ + depends/relic/src/md/relic_md_sha256.c \ + depends/relic/src/md/relic_md_sha384.c \ + depends/relic/src/md/relic_md_sha512.c \ + depends/relic/src/md/relic_md_xmd.c \ + depends/relic/src/md/sha.h \ + depends/relic/src/md/sha224-256.c \ + depends/relic/src/md/sha384-512.c \ + depends/relic/src/md/sha_private.h + +EXTRA_DIST += \ + depends/relic/src/arch/relic_arch_arm.c \ + depends/relic/src/arch/relic_arch_none.c \ + depends/relic/src/arch/relic_arch_x64.c \ + depends/relic/src/arch/relic_arch_x86.c + +RELIC_SOURCES += \ + depends/relic/src/arch/relic_arch_@CPU_ARCH@.c \ + depends/relic/src/rand/relic_rand_call.c \ + depends/relic/src/rand/relic_rand_core.c \ + depends/relic/src/rand/relic_rand_hashd.c \ + depends/relic/src/rand/relic_rand_udev.c + +if WITH_DV +RELIC_SOURCES += \ + depends/relic/src/dv/relic_dv_mem.c \ + depends/relic/src/dv/relic_dv_util.c +endif + +if ARITH_EASY +if WITH_BN +RELIC_SOURCES += $(BN_SOURCES) \ + depends/relic/src/low/easy/relic_bn_add_low.c \ + depends/relic/src/low/easy/relic_bn_div_low.c \ + depends/relic/src/low/easy/relic_bn_mod_low.c \ + depends/relic/src/low/easy/relic_bn_mul_low.c \ + depends/relic/src/low/easy/relic_bn_shift_low.c \ + depends/relic/src/low/easy/relic_bn_sqr_low.c +endif + +if WITH_FP +RELIC_SOURCES += $(FP_SOURCES) \ + depends/relic/src/low/easy/relic_fp_add_low.c \ + depends/relic/src/low/easy/relic_fp_inv_low.c \ + depends/relic/src/low/easy/relic_fp_mul_low.c \ + depends/relic/src/low/easy/relic_fp_rdc_low.c \ + depends/relic/src/low/easy/relic_fp_shift_low.c \ + depends/relic/src/low/easy/relic_fp_sqr_low.c +endif + +if WITH_FPX +RELIC_SOURCES += $(FPX_SOURCES) \ + depends/relic/src/low/easy/relic_fpx_add_low.c \ + depends/relic/src/low/easy/relic_fpx_mul_low.c \ + depends/relic/src/low/easy/relic_fpx_rdc_low.c \ + depends/relic/src/low/easy/relic_fpx_sqr_low.c +endif + +if WITH_FB +RELIC_SOURCES += $(FB_SOURCES) \ + depends/relic/src/low/easy/relic_fb_add_low.c \ + depends/relic/src/low/easy/relic_fb_inv_low.c \ + depends/relic/src/low/easy/relic_fb_itr_low.c \ + depends/relic/src/low/easy/relic_fb_mul_low.c \ + depends/relic/src/low/easy/relic_fb_rdc_low.c \ + depends/relic/src/low/easy/relic_fb_shift_low.c \ + depends/relic/src/low/easy/relic_fb_slv_low.c \ + depends/relic/src/low/easy/relic_fb_sqr_low.c \ + depends/relic/src/low/easy/relic_fb_srt_low.c \ + depends/relic/src/low/easy/relic_fb_trc_low.c +endif +endif + +if ARITH_GMP +if WITH_BN +RELIC_SOURCES += $(BN_SOURCES) \ + depends/relic/src/low/gmp/relic_bn_add_low.c \ + depends/relic/src/low/gmp/relic_bn_div_low.c \ + depends/relic/src/low/gmp/relic_bn_mod_low.c \ + depends/relic/src/low/gmp/relic_bn_mul_low.c \ + depends/relic/src/low/gmp/relic_bn_shift_low.c \ + depends/relic/src/low/gmp/relic_bn_sqr_low.c +endif + +if WITH_FP +RELIC_SOURCES += $(FP_SOURCES) \ + depends/relic/src/low/gmp/relic_fp_add_low.c \ + depends/relic/src/low/gmp/relic_fp_inv_low.c \ + depends/relic/src/low/gmp/relic_fp_mul_low.c \ + depends/relic/src/low/gmp/relic_fp_rdc_low.c \ + depends/relic/src/low/gmp/relic_fp_shift_low.c \ + depends/relic/src/low/gmp/relic_fp_sqr_low.c +endif + +if WITH_FPX +RELIC_SOURCES += $(FPX_SOURCES) \ + depends/relic/src/low/easy/relic_fpx_add_low.c \ + depends/relic/src/low/easy/relic_fpx_mul_low.c \ + depends/relic/src/low/easy/relic_fpx_rdc_low.c \ + depends/relic/src/low/easy/relic_fpx_sqr_low.c +endif + +if WITH_FB +RELIC_SOURCES += $(FB_SOURCES) \ + depends/relic/src/low/gmp/relic_fb_add_low.c \ + depends/relic/src/low/easy/relic_fb_inv_low.c \ + depends/relic/src/low/easy/relic_fb_itr_low.c \ + depends/relic/src/low/easy/relic_fb_mul_low.c \ + depends/relic/src/low/easy/relic_fb_rdc_low.c \ + depends/relic/src/low/gmp/relic_fb_shift_low.c \ + depends/relic/src/low/easy/relic_fb_slv_low.c \ + depends/relic/src/low/easy/relic_fb_sqr_low.c \ + depends/relic/src/low/easy/relic_fb_srt_low.c \ + depends/relic/src/low/easy/relic_fb_trc_low.c +endif +endif + +if WITH_FBX +RELIC_SOURCES += \ + depends/relic/src/fbx/relic_fb2_inv.c \ + depends/relic/src/fbx/relic_fb2_mul.c \ + depends/relic/src/fbx/relic_fb2_slv.c \ + depends/relic/src/fbx/relic_fb2_sqr.c +endif + +if WITH_EP +RELIC_SOURCES += $(EP_SOURCES) +endif + +if WITH_EPX +RELIC_SOURCES += $(EPX_SOURCES) +endif + +if WITH_EB +RELIC_SOURCES += $(EB_SOURCES) +endif + +if WITH_ED +RELIC_SOURCES += $(ED_SOURCES) +endif + +if WITH_PP +RELIC_SOURCES += $(PP_SOURCES) +endif + +if WITH_PC +RELIC_SOURCES += $(PC_SOURCES) +endif + +if WITH_CP +RELIC_SOURCES += \ + depends/relic/src/cp/relic_cp_bbs.c \ + depends/relic/src/cp/relic_cp_bdpe.c \ + depends/relic/src/cp/relic_cp_bgn.c \ + depends/relic/src/cp/relic_cp_bls.c \ + depends/relic/src/cp/relic_cp_cls.c \ + depends/relic/src/cp/relic_cp_cmlhs.c \ + depends/relic/src/cp/relic_cp_ecdh.c \ + depends/relic/src/cp/relic_cp_ecdsa.c \ + depends/relic/src/cp/relic_cp_ecies.c \ + depends/relic/src/cp/relic_cp_ecmqv.c \ + depends/relic/src/cp/relic_cp_ecss.c \ + depends/relic/src/cp/relic_cp_ers.c \ + depends/relic/src/cp/relic_cp_etrs.c \ + depends/relic/src/cp/relic_cp_ghpe.c \ + depends/relic/src/cp/relic_cp_ibe.c \ + depends/relic/src/cp/relic_cp_mklhs.c \ + depends/relic/src/cp/relic_cp_mpss.c \ + depends/relic/src/cp/relic_cp_pcdel.c \ + depends/relic/src/cp/relic_cp_phpe.c \ + depends/relic/src/cp/relic_cp_pok.c \ + depends/relic/src/cp/relic_cp_pss.c \ + depends/relic/src/cp/relic_cp_rabin.c \ + depends/relic/src/cp/relic_cp_rsa.c \ + depends/relic/src/cp/relic_cp_sok.c \ + depends/relic/src/cp/relic_cp_sokaka.c \ + depends/relic/src/cp/relic_cp_vbnn.c \ + depends/relic/src/cp/relic_cp_zss.c +endif + +if WITH_BC +RELIC_SOURCES += \ + depends/relic/src/bc/relic_bc_aes.c \ + depends/relic/src/bc/rijndael-alg-fst.c \ + depends/relic/src/bc/rijndael-alg-fst.h \ + depends/relic/src/bc/rijndael-api-fst.c \ + depends/relic/src/bc/rijndael-api-fst.h +endif + +if WITH_MD +RELIC_SOURCES += $(MD_SOURCES) +endif + +if WITH_MPC +RELIC_SOURCES += \ + depends/relic/src/mpc/relic_mt_mpc.c \ + depends/relic/src/mpc/relic_pc_mpc.c +endif + +librelic_la_SOURCES = \ + $(RELIC_SOURCES) \ + $(RELIC_H) + +librelic_la_CPPFLAGS = $(AM_CPPFLAGS) $(RELIC_CPPFLAGS) $(RELIC_INCLUDES) +librelic_la_CXXFLAGS = $(AM_CXXFLAGS) +librelic_la_CFLAGS = $(AM_CFLAGS) +librelic_la_LDFLAGS = $(AM_LDFLAGS) + +noinst_LTLIBRARIES += $(LIBRELIC) diff --git a/src/dashbls/Makefile.test.include b/src/dashbls/Makefile.test.include new file mode 100644 index 000000000000..39488b34651d --- /dev/null +++ b/src/dashbls/Makefile.test.include @@ -0,0 +1,27 @@ +# Copyright (c) 2021 The PIVX developers +# Copyright (c) 2022 The Dash Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING.MIT or http://www.opensource.org/licenses/mit-license.php. + +DASHBLS_RUNTEST = runtest + +RUNTEST_INCLUDES = \ + -I$(top_srcdir)/depends/catch2/include + +RUNTEST_H = \ + depends/catch2/include/catch2/catch.hpp + +runtest_SOURCES = \ + $(DASHBLS_H) \ + $(RELIC_H) \ + $(RUNTEST_H) \ + src/test.cpp \ + src/test-utils.hpp + +runtest_CPPFLAGS = $(AM_CPPFLAGS) $(DASHBLS_INCLUDES) $(RELIC_INCLUDES) $(RUNTEST_INCLUDES) +runtest_CXXFLAGS = $(AM_CXXFLAGS) +runtest_LDFLAGS = -static $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) + +runtest_LDADD = $(LIBDASHBLS) + +noinst_PROGRAMS += $(DASHBLS_RUNTEST) diff --git a/src/dashbls/README.md b/src/dashbls/README.md new file mode 100644 index 000000000000..8460ac818ea7 --- /dev/null +++ b/src/dashbls/README.md @@ -0,0 +1,299 @@ +# BLS Signatures implementation + +[![Build and Test C++, Javascript, and Python](https://github.com/Chia-Network/bls-signatures/actions/workflows/build-test.yaml/badge.svg)](https://github.com/Chia-Network/bls-signatures/actions/workflows/build-test.yaml) +![PyPI](https://img.shields.io/pypi/v/blspy?logo=pypi) +![PyPI - Format](https://img.shields.io/pypi/format/blspy?logo=pypi) +![GitHub](https://img.shields.io/github/license/Chia-Network/bls-signatures?logo=Github) + +[![Total alerts](https://img.shields.io/lgtm/alerts/g/Chia-Network/bls-signatures.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Chia-Network/bls-signatures/alerts/) +[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/Chia-Network/bls-signatures.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Chia-Network/bls-signatures/context:javascript) +[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Chia-Network/bls-signatures.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Chia-Network/bls-signatures/context:python) +[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/Chia-Network/bls-signatures.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Chia-Network/bls-signatures/context:cpp) + +NOTE: THIS LIBRARY IS NOT YET FORMALLY REVIEWED FOR SECURITY + +NOTE: THIS LIBRARY WAS SHIFTED TO THE IETF BLS SPECIFICATION ON 7/16/20 + +Implements BLS signatures with aggregation using [relic toolkit](https://github.com/relic-toolkit/relic) +for cryptographic primitives (pairings, EC, hashing) according to the +[IETF BLS RFC](https://datatracker.ietf.org/doc/draft-irtf-cfrg-bls-signature/) +with [these curve parameters](https://datatracker.ietf.org/doc/draft-irtf-cfrg-pairing-friendly-curves/) +for BLS12-381. + +Features: + +* Non-interactive signature aggregation following IETF specification +* Works on Windows, Mac, Linux, BSD +* Efficient verification using Proof of Posssesion (only one pairing per distinct message) +* Aggregate public keys and private keys +* [EIP-2333](https://eips.ethereum.org/EIPS/eip-2333) key derivation (including unhardened BIP-32-like keys) +* Key and signature serialization +* Batch verification +* [Python bindings](https://github.com/Chia-Network/bls-signatures/tree/main/python-bindings) +* [Pure python bls12-381 and signatures](https://github.com/Chia-Network/bls-signatures/tree/main/python-impl) +* [JavaScript bindings](https://github.com/Chia-Network/bls-signatures/tree/main/js-bindings) + +## Before you start + +This library uses minimum public key sizes (MPL). A G2Element is a signature (96 bytes), and a G1Element is a public key (48 bytes). A private key is a 32 byte integer. There are three schemes: Basic, Augmented, and ProofOfPossession. Augmented should be enough for most use cases, and ProofOfPossession can be used where verification must be fast. + +## Import the library + +```c++ +#include "bls.hpp" +using namespace bls; +``` + +## Creating keys and signatures + +```c++ +// Example seed, used to generate private key. Always use +// a secure RNG with sufficient entropy to generate a seed (at least 32 bytes). +vector seed = {0, 50, 6, 244, 24, 199, 1, 25, 52, 88, 192, + 19, 18, 12, 89, 6, 220, 18, 102, 58, 209, 82, + 12, 62, 89, 110, 182, 9, 44, 20, 254, 22}; + +PrivateKey sk = AugSchemeMPL().KeyGen(seed); +G1Element pk = sk.GetG1Element(); + +vector message = {1, 2, 3, 4, 5}; // Message is passed in as a byte vector +G2Element signature = AugSchemeMPL().Sign(sk, message); + +// Verify the signature +bool ok = AugSchemeMPL().Verify(pk, message, signature); +``` + +## Serializing keys and signatures to bytes + +```c++ +vector skBytes = sk.Serialize(); +vector pkBytes = pk.Serialize(); +vector signatureBytes = signature.Serialize(); + +cout << Util::HexStr(skBytes) << endl; // 32 bytes printed in hex +cout << Util::HexStr(pkBytes) << endl; // 48 bytes printed in hex +cout << Util::HexStr(signatureBytes) << endl; // 96 bytes printed in hex +``` + +## Loading keys and signatures from bytes + +```c++ +// Takes vector of 32 bytes +PrivateKey skc = PrivateKey::FromByteVector(skBytes); + +// Takes vector of 48 bytes +pk = G1Element::FromByteVector(pkBytes); + +// Takes vector of 96 bytes +signature = G2Element::FromByteVector(signatureBytes); +``` + +## Create aggregate signatures + +```c++ +// Generate some more private keys +seed[0] = 1; +PrivateKey sk1 = AugSchemeMPL().KeyGen(seed); +seed[0] = 2; +PrivateKey sk2 = AugSchemeMPL().KeyGen(seed); +vector message2 = {1, 2, 3, 4, 5, 6, 7}; + +// Generate first sig +G1Element pk1 = sk1.GetG1Element(); +G2Element sig1 = AugSchemeMPL().Sign(sk1, message); + +// Generate second sig +G1Element pk2 = sk2.GetG1Element(); +G2Element sig2 = AugSchemeMPL().Sign(sk2, message2); + +// Signatures can be non-interactively combined by anyone +G2Element aggSig = AugSchemeMPL().Aggregate({sig1, sig2}); + +ok = AugSchemeMPL().AggregateVerify({pk1, pk2}, {message, message2}, aggSig); +``` + +## Arbitrary trees of aggregates + +```c++ +seed[0] = 3; +PrivateKey sk3 = AugSchemeMPL().KeyGen(seed); +G1Element pk3 = sk3.GetG1Element(); +vector message3 = {100, 2, 254, 88, 90, 45, 23}; +G2Element sig3 = AugSchemeMPL().Sign(sk3, message3); + + +G2Element aggSigFinal = AugSchemeMPL().Aggregate({aggSig, sig3}); +ok = AugSchemeMPL().AggregateVerify({pk1, pk2, pk3}, {message, message2, message3}, aggSigFinal); + +``` + +## Very fast verification with Proof of Possession scheme + +```c++ +// If the same message is signed, you can use Proof of Posession (PopScheme) for efficiency +// A proof of possession MUST be passed around with the PK to ensure security. + +G2Element popSig1 = PopSchemeMPL().Sign(sk1, message); +G2Element popSig2 = PopSchemeMPL().Sign(sk2, message); +G2Element popSig3 = PopSchemeMPL().Sign(sk3, message); +G2Element pop1 = PopSchemeMPL().PopProve(sk1); +G2Element pop2 = PopSchemeMPL().PopProve(sk2); +G2Element pop3 = PopSchemeMPL().PopProve(sk3); + +ok = PopSchemeMPL().PopVerify(pk1, pop1); +ok = PopSchemeMPL().PopVerify(pk2, pop2); +ok = PopSchemeMPL().PopVerify(pk3, pop3); +G2Element popSigAgg = PopSchemeMPL().Aggregate({popSig1, popSig2, popSig3}); + +ok = PopSchemeMPL().FastAggregateVerify({pk1, pk2, pk3}, message, popSigAgg); + +// Aggregate public key, indistinguishable from a single public key +G1Element popAggPk = pk1 + pk2 + pk3; +ok = PopSchemeMPL().Verify(popAggPk, message, popSigAgg); + +// Aggregate private keys +PrivateKey aggSk = PrivateKey::Aggregate({sk1, sk2, sk3}); +ok = (PopSchemeMPL().Sign(aggSk, message) == popSigAgg); +``` + +## HD keys using [EIP-2333](https://github.com/ethereum/EIPs/pull/2333) + +```c++ +// You can derive 'child' keys from any key, to create arbitrary trees. 4 byte indeces are used. +// Hardened (more secure, but no parent pk -> child pk) +PrivateKey masterSk = AugSchemeMPL().KeyGen(seed); +PrivateKey child = AugSchemeMPL().DeriveChildSk(masterSk, 152); +PrivateKey grandChild = AugSchemeMPL().DeriveChildSk(child, 952) + +// Unhardened (less secure, but can go from parent pk -> child pk), BIP32 style +G1Element masterPk = masterSk.GetG1Element(); +PrivateKey childU = AugSchemeMPL().DeriveChildSkUnhardened(masterSk, 22); +PrivateKey grandchildU = AugSchemeMPL().DeriveChildSkUnhardened(childU, 0); + +G1Element childUPk = AugSchemeMPL().DeriveChildPkUnhardened(masterPk, 22); +G1Element grandchildUPk = AugSchemeMPL().DeriveChildPkUnhardened(childUPk, 0); + +ok = (grandchildUPk == grandchildU.GetG1Element(); +``` + +## Build + +Cmake 3.14+, a c++ compiler, and python3 (for bindings) are required for building. + +```bash +mkdir build +cd build +cmake ../ +cmake --build . -- -j 6 +``` + +### Run tests + +```bash +./build/src/runtest +``` + +### Run benchmarks + +```bash +./build/src/runbench +``` + +On a 3.5 GHz i7 Mac, verification takes about 1.1ms per signature, and signing takes 1.3ms. + +### Link the library to use it + +```bash +g++ -Wl,-no_pie -std=c++11 -Ibls-signatures/depends/relic/include -Ibls-signatures/build/depends/relic/include -Ibls-signatures/src -L./bls-signatures/build/ -l bls yourapp.cpp +``` + +## Notes on dependencies + +We use Libsodium and have GMP as an optional dependency: libsodium gives secure memory +allocation, and GMP speeds up the library by ~ 3x. MPIR is used on Windows via +GitHub Actions instead. To install them, either download them from github and +follow the instructions for each repo, or use a package manager like APT or +brew. You can follow the recipe used to build python wheels for multiple +platforms in `.github/workflows/`. + +## Discussion + +Discussion about this library and other Chia related development is in the #dev +channel of Chia's [public Keybase channels](https://keybase.io/team/chia_network.public). + +## Code style + +* Always use vector for bytes +* Use size_t for size variables +* Uppercase method names +* Prefer static constructors +* Avoid using templates +* Objects allocate and free their own memory +* Use cpplint with default rules +* Use SecAlloc and SecFree when handling secrets + +## ci Building + +The primary build process for this repository is to use GitHub Actions to +build binary wheels for MacOS, Linux (x64 and aarch64), and Windows and publish +them with a source wheel on PyPi. MacOS ARM64 is supported but not automated +due to a lack of M1 CI runners. See `.github/workflows/build.yml`. CMake uses +[FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) +to download [pybind11](https://github.com/pybind/pybind11) for the Python +bindings and relic from a chia relic forked repository for Windows. Building +is then managed by [cibuildwheel](https://github.com/joerick/cibuildwheel). +Further installation is then available via `pip install blspy` e.g. The ci +builds include GMP and a statically linked libsodium. + +## Contributing and workflow + +Contributions are welcome and more details are available in chia-blockchain's +[CONTRIBUTING.md](https://github.com/Chia-Network/chia-blockchain/blob/main/CONTRIBUTING.md). + +The main branch is usually the currently released latest version on PyPI. +Note that at times bls-signatures/blspy will be ahead of the release version +that chia-blockchain requires in it's main/release version in preparation +for a new chia-blockchain release. Please branch or fork main and then create +a pull request to the main branch. Linear merging is enforced on main and +merging requires a completed review. PRs will kick off a GitHub actions ci +build and analysis of bls-signatures at +[lgtm.com](https://lgtm.com/projects/g/Chia-Network/bls-signatures/?mode=list). +Please make sure your build is passing and that it does not increase alerts +at lgtm. + +## Specification and test vectors + +The [IETF bls draft](https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/) +is followed. Test vectors can also be seen in the python and cpp test files. + +## Libsodium license + +The libsodium static library is licensed under the ISC license which requires +the following copyright notice. + +>ISC License +> +>Copyright (c) 2013-2020 +>Frank Denis \ +> +>Permission to use, copy, modify, and/or distribute this software for any +>purpose with or without fee is hereby granted, provided that the above +>copyright notice and this permission notice appear in all copies. +> +>THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +>WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +>MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +>ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +>WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +>ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +>OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +## GMP license + +GMP is distributed under the +[GNU LGPL v3 license](https://www.gnu.org/licenses/lgpl-3.0.html) + +## Relic license + +Relic is used with the +[Apache 2.0 license](https://github.com/relic-toolkit/relic/blob/master/LICENSE.Apache-2.0) diff --git a/src/dashbls/apple.rust.deps.sh b/src/dashbls/apple.rust.deps.sh new file mode 100644 index 000000000000..b2ebc41a4ff2 --- /dev/null +++ b/src/dashbls/apple.rust.deps.sh @@ -0,0 +1,374 @@ +#!/bin/sh +set -x +set -e +# "x86_64-apple-ios" +# "aarch64-apple-ios" +# "aarch64-apple-ios-sim" +# "x86_64-apple-darwin" +# "aarch64-apple-darwin" +# TODO: it's probably needs to be optimized in order to increase better build velocity +# TODO: so we need to combine multiple targets +TARGET=$1 +git submodule update --init +MIN_IOS="13.0" +MIN_WATCHOS="5.0" +MIN_TVOS=$MIN_IOS +MIN_MACOS="10.15" + +IPHONEOS=iphoneos +IPHONESIMULATOR=iphonesimulator +WATCHOS=watchos +WATCHSIMULATOR=watchsimulator +TVOS=appletvos +TVSIMULATOR=appletvsimulator +MACOS=macosx + +LOGICALCPU_MAX=$(sysctl -n hw.logicalcpu_max) +BUILD=build + +version_min_flag() { + PLATFORM=$1 + FLAG="" + # shellcheck disable=SC2039 + # shellcheck disable=SC2053 + if [[ $PLATFORM = $IPHONEOS ]]; then + FLAG="-miphoneos-version-min=${MIN_IOS}" + elif [[ $PLATFORM = $IPHONESIMULATOR ]]; then + FLAG="-mios-simulator-version-min=${MIN_IOS}" + elif [[ $PLATFORM = $WATCHOS ]]; then + FLAG="-mwatchos-version-min=${MIN_WATCHOS}" + elif [[ $PLATFORM = $WATCHSIMULATOR ]]; then + FLAG="-mwatchos-simulator-version-min=${MIN_WATCHOS}" + elif [[ $PLATFORM = $TVOS ]]; then + FLAG="-mtvos-version-min=${MIN_TVOS}" + elif [[ $PLATFORM = $TVSIMULATOR ]]; then + FLAG="-mtvos-simulator-version-min=${MIN_TVOS}" + elif [[ $PLATFORM = $MACOS ]]; then + FLAG="-mmacosx-version-min=${MIN_MACOS}" + fi + echo $FLAG +} + + +prepare() { + download_gmp() { + GMP_VERSION="6.3.0" + CURRENT_DIR=$(pwd) + echo "$CURRENT_DIR" + # shellcheck disable=SC2039,SC2164 + pushd ${BUILD} + mkdir -p "contrib" + if [ ! -s "contrib/gmp-${GMP_VERSION}.tar.bz2" ]; then + curl -L -o "contrib/gmp-${GMP_VERSION}.tar.bz2" https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VERSION}.tar.bz2 + fi + rm -rf "contrib/gmp" + # shellcheck disable=SC2039,SC2164 + pushd contrib + tar xfj "gmp-${GMP_VERSION}.tar.bz2" + mv gmp-${GMP_VERSION} gmp + # shellcheck disable=SC2039,SC2164 + popd #contrib + # shellcheck disable=SC2039,SC2164 + popd #build + } + + download_cmake_toolchain() { + if [ ! -s "${BUILD}/ios.toolchain.cmake" ]; then + SHA256_HASH="d02857ff6bd64f1d7109ca59c3e4f3b2f89d0663c412146e6977c679801b3243" + curl -o "${BUILD}/ios.toolchain.cmake" https://raw.githubusercontent.com/leetal/ios-cmake/c55677a4445b138c9ef2650d3c21f22cc78c2357/ios.toolchain.cmake + DOWNLOADED_HASH=$(shasum -a 256 ${BUILD}/ios.toolchain.cmake | cut -f 1 -d " ") + if [ $SHA256_HASH != "$DOWNLOADED_HASH" ]; then + echo "Error: sha256 checksum of ios.toolchain.cmake mismatch" >&2 + exit 1 + fi + fi + } + + download_relic() { + CURRENT_DIR=$(pwd) + echo "$CURRENT_DIR" + mkdir -p "${CURRENT_DIR}/${BUILD}/depends" + if [ ! -s "${CURRENT_DIR}/${BUILD}/depends/relic" ]; then + # shellcheck disable=SC2039,SC2164 + pushd "${CURRENT_DIR}/${BUILD}/depends" + git clone --depth 1 --branch "feat/ios-support" https://github.com/pankcuf/relic + # shellcheck disable=SC2039,SC2164 + pushd relic + git fetch --depth 1 origin 19fb6d79a77ade4ae8cd70d2b0ef7aab8720d1ae + git checkout 19fb6d79a77ade4ae8cd70d2b0ef7aab8720d1ae + # shellcheck disable=SC2039,SC2164 + popd #relic + # shellcheck disable=SC2039,SC2164 + popd #depends + fi + } + rm -rf ${BUILD} + mkdir -p ${BUILD} + download_relic + download_gmp + download_cmake_toolchain +} + +build_gmp_arch() { + PLATFORM=$1 + ARCH=$2 + PFX=${PLATFORM}-${ARCH} + # why this works with this host only? + HOST=aarch64-apple-darwin + # shellcheck disable=SC2039,SC2164 + pushd ${BUILD} + SDK=$(xcrun --sdk "$PLATFORM" --show-sdk-path) + PLATFORM_PATH=$(xcrun --sdk "$PLATFORM" --show-sdk-platform-path) + CLANG=$(xcrun --sdk "$PLATFORM" --find clang) + DEVELOPER=$(xcode-select --print-path) + CURRENT_DIR=$(pwd) + export PATH="${PLATFORM_PATH}/Developer/usr/bin:${DEVELOPER}/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin" + mkdir gmplib-"${PLATFORM}"-"${ARCH}" + CFLAGS="-Wno-unused-value -fembed-bitcode -arch ${ARCH} --sysroot=${SDK} $(version_min_flag "$PLATFORM")" + CONFIGURESCRIPT="gmp_configure_script.sh" + # shellcheck disable=SC2039,SC2164 + pushd contrib + # shellcheck disable=SC2039,SC2164 + pushd gmp + make clean || true + make distclean || true + echo "HOST: $HOST" + echo "PREFIX: ${CURRENT_DIR}/gmplib-${PFX}" + + cat >"$CONFIGURESCRIPT" << EOF +#!/bin/sh +./configure \ +CC="$CLANG" CFLAGS="$CFLAGS" CPPFLAGS="$CFLAGS" LDFLAGS="$CFLAGS" \ +--host=${HOST} --prefix="${CURRENT_DIR}/gmplib-${PFX}" \ +--disable-shared --enable-static --disable-assembly -v +EOF + + chmod a+x "$CONFIGURESCRIPT" + sh "$CONFIGURESCRIPT" + rm "$CONFIGURESCRIPT" + + # shellcheck disable=SC2039 + mkdir -p "${CURRENT_DIR}/log" + # shellcheck disable=SC2039 + make -j "$LOGICALCPU_MAX" &> "${CURRENT_DIR}"/log/gmplib-"${PFX}"-build.log + # shellcheck disable=SC2039 + make install &> "${CURRENT_DIR}"/log/gmplib-"${PFX}"-install.log + #make check + #exit 1 + # shellcheck disable=SC2039,SC2164 + popd # gmp + # shellcheck disable=SC2039,SC2164 + popd # contrib + # shellcheck disable=SC2039,SC2164 + popd # build +} + +build_relic_arch() { + PLATFORM=$1 + ARCH=$2 + PFX=${PLATFORM}-${ARCH} + + # shellcheck disable=SC2039,SC2164 + pushd ${BUILD} + + SDK=$(xcrun --sdk "$PLATFORM" --show-sdk-path) + + BUILDDIR=relic-"${PFX}" + TOOLCHAIN=$(pwd)/ios.toolchain.cmake + GMP_PFX=$(pwd)/gmplib-${PFX} + rm -rf "$BUILDDIR" + mkdir "$BUILDDIR" + # shellcheck disable=SC2039,SC2164 + pushd "$BUILDDIR" + + unset CC + # shellcheck disable=SC2155 + export CC=$(xcrun --sdk "${PLATFORM}" --find clang) + + WSIZE=0 + IOS_PLATFORM="" + OPTIMIZATIONFLAGS="" + DEPLOYMENT_TARGET="" + + # shellcheck disable=SC2039 + # shellcheck disable=SC2053 + if [[ $PLATFORM = $IPHONEOS ]]; then + if [[ $ARCH = "arm64" ]] || [[ $ARCH = "arm64e" ]]; then + IOS_PLATFORM=OS64 + DEPLOYMENT_TARGET=$MIN_IOS + WSIZE=64 + OPTIMIZATIONFLAGS=-fomit-frame-pointer + else + IOS_PLATFORM=OS + WSIZE=32 + fi + elif [[ $PLATFORM = $IPHONESIMULATOR ]]; then + if [[ $ARCH = "x86_64" ]]; then + IOS_PLATFORM=SIMULATOR64 + DEPLOYMENT_TARGET=$MIN_IOS + WSIZE=64 + OPTIMIZATIONFLAGS=-fomit-frame-pointer + elif [[ $ARCH = "arm64" ]]; then + IOS_PLATFORM=SIMULATORARM64 + DEPLOYMENT_TARGET=$MIN_IOS + WSIZE=64 + else + IOS_PLATFORM=SIMULATOR + WSIZE=32 + fi + elif [[ $PLATFORM = $WATCHOS ]]; then + IOS_PLATFORM=WATCHOS + DEPLOYMENT_TARGET=$MIN_WATCHOS + WSIZE=32 + elif [[ $PLATFORM = $WATCHSIMULATOR ]]; then + IOS_PLATFORM=SIMULATOR_WATCHOS + DEPLOYMENT_TARGET=$MIN_WATCHOS + WSIZE=32 + elif [[ $PLATFORM = $TVOS ]]; then + IOS_PLATFORM=TVOS + DEPLOYMENT_TARGET=$MIN_TVOS + WSIZE=64 + OPTIMIZATIONFLAGS=-fomit-frame-pointer + elif [[ $PLATFORM = $TVSIMULATOR ]]; then + IOS_PLATFORM=SIMULATOR_TVOS + #TODO + if [[ $ARCH = "arm64" ]] + then + IOS_PLATFORM=OS64 + fi + DEPLOYMENT_TARGET=$MIN_TVOS + WSIZE=64 + OPTIMIZATIONFLAGS=-fomit-frame-pointer + elif [[ $PLATFORM = $MACOS ]]; then + WSIZE=64 + IOS_PLATFORM=MAC + if [[ $ARCH = "arm64" ]] + then + IOS_PLATFORM=MAC_ARM64 + fi + DEPLOYMENT_TARGET=$MIN_MACOS + OPTIMIZATIONFLAGS=-fomit-frame-pointer + fi + + COMPILER_ARGS="$(version_min_flag "$PLATFORM") -Wno-unused-functions" + + EXTRA_ARGS="-DOPSYS=NONE -DPLATFORM=$IOS_PLATFORM -DDEPLOYMENT_TARGET=$DEPLOYMENT_TARGET -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN" + + # shellcheck disable=SC2039 + if [[ $ARCH = "i386" ]]; then + EXTRA_ARGS+=" -DARCH=X86" + elif [[ $ARCH = "x86_64" ]]; then + EXTRA_ARGS+=" -DARCH=X64" + elif [[ $ARCH = "arm64" ]]; then + # Relic doesn't support aarch64 yet, "ARCH=ARM" is for ARM 32-bit architecture only + EXTRA_ARGS+=" -DIOS_ARCH=arm64 -DARCH=" + elif [[ $ARCH = "armv7s" ]]; then + EXTRA_ARGS+=" -DIOS_ARCH=armv7s -DARCH=ARM" + elif [[ $ARCH = "armv7k" ]]; then + EXTRA_ARGS+=" -DIOS_ARCH=armv7k -DARCH=ARM" + elif [[ $ARCH = "arm64_32" ]]; then + EXTRA_ARGS+=" -DIOS_ARCH=arm64_32 -DARCH=ARM" + fi + + CURRENT_DIR=$(pwd) + cmake -DCMAKE_PREFIX_PATH:PATH="${GMP_PFX}" -DTESTS=0 -DBENCH=0 -DBUILD_BLS_JS_BINDINGS=0 -DBUILD_BLS_PYTHON_BINDINGS=0 \ + -DBUILD_BLS_BENCHMARKS=0 -DBUILD_BLS_TESTS=0 -DCHECK=off -DARITH=gmp -DTIMER=HPROC -DFP_PRIME=381 -DMULTI=PTHREAD \ + -DFP_QNRES=on -DFP_METHD="INTEG;INTEG;INTEG;MONTY;EXGCD;SLIDE" -DFPX_METHD="INTEG;INTEG;LAZYR" -DPP_METHD="LAZYR;OATEP" \ + -DCOMP_FLAGS="-pipe -std=c99 -O3 -funroll-loops $OPTIMIZATIONFLAGS -isysroot $SDK -arch $ARCH -fembed-bitcode ${COMPILER_ARGS}" \ + -DWSIZE=$WSIZE -DVERBS=off -DSHLIB=off -DALLOC="AUTO" -DEP_PLAIN=off -DEP_SUPER=off -DPP_EXT="LAZYR" \ + -DWITH="DV;BN;MD;FP;EP;FPX;EPX;PP;PC;CP" -DBN_METHD="COMBA;COMBA;MONTY;SLIDE;STEIN;BASIC" ${EXTRA_ARGS} ../../ + + make -j "$LOGICALCPU_MAX" + # shellcheck disable=SC2039,SC2164 + popd # "$BUILDDIR" + # shellcheck disable=SC2039,SC2164 + popd # depends/relic +} + +build_bls_arch() { + # shellcheck disable=SC2039 + BLS_FILES=( "bls" "chaincode" "elements" "extendedprivatekey" "extendedpublickey" "legacy" "privatekey" "schemes" "threshold" ) + # shellcheck disable=SC2039 + ALL_BLS_OBJ_FILES=$(printf "%s.o " "${BLS_FILES[@]}") + + PLATFORM=$1 + ARCH=$2 + PFX=${PLATFORM}-${ARCH} + SDK=$(xcrun --sdk "$PLATFORM" --show-sdk-path) + + BUILDDIR=${BUILD}/bls-"${PFX}" + rm -rf "$BUILDDIR" + mkdir "$BUILDDIR" + # shellcheck disable=SC2039,SC2164 + pushd "$BUILDDIR" + + EXTRA_ARGS="$(version_min_flag "$PLATFORM")" + + CURRENT_DIR=$(pwd) + + # shellcheck disable=SC2039 + for F in "${BLS_FILES[@]}" + do + clang -I"../contrib/relic/include" \ + -I"../../depends/relic/include" \ + -I"../../include/dashbls" \ + -I"../relic-${PFX}/depends/relic/include" \ + -I"../../src/" \ + -I"../gmplib-${PFX}/include" \ + -x c++ -std=c++14 -stdlib=libc++ -fembed-bitcode -arch "${ARCH}" -isysroot "${SDK}" "${EXTRA_ARGS}" \ + -c "../../src/${F}.cpp" -o "${F}.o" + done + + # shellcheck disable=SC2086 + xcrun -sdk "$PLATFORM" ar -cvq libbls.a $ALL_BLS_OBJ_FILES + + # shellcheck disable=SC2039,SC2164 + popd # "$BUILDDIR" +} + +build_all_arch() { + PLATFORM=$1 + ARCH=$2 + build_gmp_arch "$PLATFORM" "$ARCH" + build_relic_arch "$PLATFORM" "$ARCH" + build_bls_arch "$PLATFORM" "$ARCH" +} + +build_target() { + BUILD_IN=$1 + echo "Build target: $BUILD_IN" + ARCH="" + PLATFORM="" + # shellcheck disable=SC2039 + if [[ $BUILD_IN = "x86_64-apple-ios" ]]; then + ARCH=x86_64 + PLATFORM=$IPHONESIMULATOR + elif [[ $BUILD_IN = "aarch64-apple-ios" ]]; then + ARCH=arm64 + PLATFORM=$IPHONEOS + elif [[ $BUILD_IN = "aarch64-apple-ios-sim" ]]; then + ARCH=arm64 + PLATFORM=$IPHONESIMULATOR + elif [[ $BUILD_IN = "x86_64-apple-darwin" ]]; then + ARCH=x86_64 + PLATFORM=$MACOS + elif [[ $BUILD_IN = "aarch64-apple-darwin" ]]; then + ARCH=arm64 + PLATFORM=$MACOS + fi + build_all_arch "$PLATFORM" "$ARCH" + PFX="${PLATFORM}"-"${ARCH}" + rm -rf "build/artefacts/${BUILD_IN}" + mkdir -p "build/artefacts/${BUILD_IN}" + cp "build/gmplib-${PFX}/lib/libgmp.a" "build/artefacts/${BUILD_IN}" + cp "build/relic-${PFX}/depends/relic/lib/librelic_s.a" "build/artefacts/${BUILD_IN}" +# cp "build/relic-${PFX}/depends/sodium/libsodium.a" "build/artefacts/${BUILD_IN}" + cp "build/bls-${PFX}/libbls.a" "build/artefacts/${BUILD_IN}" +# cp -rf build/bls-"${PFX}"/*.o build/artefacts/"${BUILD_IN}"/include +# cp -rf src/*.hpp build/artefacts/"${BUILD_IN}"/include +# cp -rf build/gmplib-"${PFX}"/include/gmp.h build/artefacts/"${BUILD_IN}"/include +# cp -rf build/relic-"${PFX}"/_deps/relic-build/include/*.h build/artefacts/"${BUILD_IN}"/include +} + +prepare +build_target "$TARGET" diff --git a/src/dashbls/autogen.sh b/src/dashbls/autogen.sh new file mode 100644 index 000000000000..de4600499e09 --- /dev/null +++ b/src/dashbls/autogen.sh @@ -0,0 +1,12 @@ +#!/bin/sh +export LC_ALL=C +set -e +srcdir="$(dirname "$0")" +cd "$srcdir" +if [ -z "${LIBTOOLIZE}" ] && GLIBTOOLIZE="$(command -v glibtoolize)"; then + LIBTOOLIZE="${GLIBTOOLIZE}" + export LIBTOOLIZE +fi +command -v autoreconf >/dev/null || \ + (echo "configuration failed, please install autoconf first" && exit 1) +autoreconf --install --force --warnings=all diff --git a/src/dashbls/build-aux/m4/ax_check_compile_flag.m4 b/src/dashbls/build-aux/m4/ax_check_compile_flag.m4 new file mode 100644 index 000000000000..bd753b34d7dc --- /dev/null +++ b/src/dashbls/build-aux/m4/ax_check_compile_flag.m4 @@ -0,0 +1,53 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AC_DEFUN([AX_CHECK_COMPILE_FLAG], +[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) +AS_VAR_IF(CACHEVAR,yes, + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS diff --git a/src/dashbls/build-aux/m4/ax_check_link_flag.m4 b/src/dashbls/build-aux/m4/ax_check_link_flag.m4 new file mode 100644 index 000000000000..03a30ce4c739 --- /dev/null +++ b/src/dashbls/build-aux/m4/ax_check_link_flag.m4 @@ -0,0 +1,53 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the linker or gives an error. +# (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the linker's default flags +# when the check is done. The check is thus made with the flags: "LDFLAGS +# EXTRA-FLAGS FLAG". This can for example be used to force the linker to +# issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_LINK_IFELSE. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AC_DEFUN([AX_CHECK_LINK_FLAG], +[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl +AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $4 $1" + AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + LDFLAGS=$ax_check_save_flags]) +AS_VAR_IF(CACHEVAR,yes, + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_LINK_FLAGS diff --git a/src/dashbls/build-aux/m4/ax_cxx_compile_stdcxx.m4 b/src/dashbls/build-aux/m4/ax_cxx_compile_stdcxx.m4 new file mode 100644 index 000000000000..51a35054d08c --- /dev/null +++ b/src/dashbls/build-aux/m4/ax_cxx_compile_stdcxx.m4 @@ -0,0 +1,1005 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the specified +# version of the C++ standard. If necessary, add switches to CXX and +# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for +# the respective C++ standard version. +# +# The second argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for no added switch, and then for an extended mode. +# +# The third argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline support for the specified C++ standard is +# required and that the macro should error out if no mode with that +# support is found. If specified 'optional', then configuration proceeds +# regardless, after defining HAVE_CXX${VERSION} if and only if a +# supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov +# Copyright (c) 2015 Paul Norman +# Copyright (c) 2015 Moritz Klammler +# Copyright (c) 2016, 2018 Krzesimir Nowak +# Copyright (c) 2019 Enji Cooper +# Copyright (c) 2020 Jason Merrill +# Copyright (c) 2021 Jörn Heusipp +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 14 + +dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro +dnl (serial version number 13). + +AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl + m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], + [$1], [14], [ax_cxx_compile_alternatives="14 1y"], + [$1], [17], [ax_cxx_compile_alternatives="17 1z"], + [$1], [20], [ax_cxx_compile_alternatives="20"], + [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$2], [], [], + [$2], [ext], [], + [$2], [noext], [], + [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], + [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], + [$3], [optional], [ax_cxx_compile_cxx$1_required=false], + [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) + AC_LANG_PUSH([C++])dnl + ac_success=no + + m4_if([$2], [], [dnl + AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, + ax_cv_cxx_compile_cxx$1, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [ax_cv_cxx_compile_cxx$1=yes], + [ax_cv_cxx_compile_cxx$1=no])]) + if test x$ax_cv_cxx_compile_cxx$1 = xyes; then + ac_success=yes + fi]) + + m4_if([$2], [noext], [], [dnl + if test x$ac_success = xno; then + for alternative in ${ax_cxx_compile_alternatives}; do + switch="-std=gnu++${alternative}" + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + fi]) + + m4_if([$2], [ext], [], [dnl + if test x$ac_success = xno; then + dnl HP's aCC needs +std=c++11 according to: + dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf + dnl Cray's crayCC needs "-h std=c++11" + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + if test x$ac_success = xyes; then + break + fi + done + fi]) + AC_LANG_POP([C++]) + if test x$ax_cxx_compile_cxx$1_required = xtrue; then + if test x$ac_success = xno; then + AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) + fi + fi + if test x$ac_success = xno; then + HAVE_CXX$1=0 + AC_MSG_NOTICE([No compiler with C++$1 support was found]) + else + HAVE_CXX$1=1 + AC_DEFINE(HAVE_CXX$1,1, + [define if the compiler supports basic C++$1 syntax]) + fi + AC_SUBST(HAVE_CXX$1) +]) + + +dnl Test body for checking C++11 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 +) + +dnl Test body for checking C++14 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 +) + +dnl Test body for checking C++17 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 +) + +dnl Test body for checking C++20 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_20 +) + + +dnl Tests for new features in C++11 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + } + + namespace test_final_override + { + + struct Base + { + virtual ~Base() {} + virtual void f() {} + }; + + struct Derived : public Base + { + virtual ~Derived() override {} + virtual void f() override {} + }; + + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; + + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } + + namespace test_decltype + { + + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + + } + + namespace test_type_deduction + { + + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + +]]) + + +dnl Tests for new features in C++14 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ + +// If the compiler admits that it is not ready for C++14, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201402L + +#error "This is not a C++14 compiler" + +#else + +namespace cxx14 +{ + + namespace test_polymorphic_lambdas + { + + int + test() + { + const auto lambda = [](auto&&... args){ + const auto istiny = [](auto x){ + return (sizeof(x) == 1UL) ? 1 : 0; + }; + const int aretiny[] = { istiny(args)... }; + return aretiny[0]; + }; + return lambda(1, 1L, 1.0f, '1'); + } + + } + + namespace test_binary_literals + { + + constexpr auto ivii = 0b0000000000101010; + static_assert(ivii == 42, "wrong value"); + + } + + namespace test_generalized_constexpr + { + + template < typename CharT > + constexpr unsigned long + strlen_c(const CharT *const s) noexcept + { + auto length = 0UL; + for (auto p = s; *p; ++p) + ++length; + return length; + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("x") == 1UL, ""); + static_assert(strlen_c("test") == 4UL, ""); + static_assert(strlen_c("another\0test") == 7UL, ""); + + } + + namespace test_lambda_init_capture + { + + int + test() + { + auto x = 0; + const auto lambda1 = [a = x](int b){ return a + b; }; + const auto lambda2 = [a = lambda1(x)](){ return a; }; + return lambda2(); + } + + } + + namespace test_digit_separators + { + + constexpr auto ten_million = 100'000'000; + static_assert(ten_million == 100000000, ""); + + } + + namespace test_return_type_deduction + { + + auto f(int& x) { return x; } + decltype(auto) g(int& x) { return x; } + + template < typename T1, typename T2 > + struct is_same + { + static constexpr auto value = false; + }; + + template < typename T > + struct is_same + { + static constexpr auto value = true; + }; + + int + test() + { + auto x = 0; + static_assert(is_same::value, ""); + static_assert(is_same::value, ""); + return x; + } + + } + +} // namespace cxx14 + +#endif // __cplusplus >= 201402L + +]]) + + +dnl Tests for new features in C++17 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ + +// If the compiler admits that it is not ready for C++17, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201703L + +#error "This is not a C++17 compiler" + +#else + +#include +#include +#include + +namespace cxx17 +{ + + namespace test_constexpr_lambdas + { + + constexpr int foo = [](){return 42;}(); + + } + + namespace test::nested_namespace::definitions + { + + } + + namespace test_fold_expression + { + + template + int multiply(Args... args) + { + return (args * ... * 1); + } + + template + bool all(Args... args) + { + return (args && ...); + } + + } + + namespace test_extended_static_assert + { + + static_assert (true); + + } + + namespace test_auto_brace_init_list + { + + auto foo = {5}; + auto bar {5}; + + static_assert(std::is_same, decltype(foo)>::value); + static_assert(std::is_same::value); + } + + namespace test_typename_in_template_template_parameter + { + + template typename X> struct D; + + } + + namespace test_fallthrough_nodiscard_maybe_unused_attributes + { + + int f1() + { + return 42; + } + + [[nodiscard]] int f2() + { + [[maybe_unused]] auto unused = f1(); + + switch (f1()) + { + case 17: + f1(); + [[fallthrough]]; + case 42: + f1(); + } + return f1(); + } + + } + + namespace test_extended_aggregate_initialization + { + + struct base1 + { + int b1, b2 = 42; + }; + + struct base2 + { + base2() { + b3 = 42; + } + int b3; + }; + + struct derived : base1, base2 + { + int d; + }; + + derived d1 {{1, 2}, {}, 4}; // full initialization + derived d2 {{}, {}, 4}; // value-initialized bases + + } + + namespace test_general_range_based_for_loop + { + + struct iter + { + int i; + + int& operator* () + { + return i; + } + + const int& operator* () const + { + return i; + } + + iter& operator++() + { + ++i; + return *this; + } + }; + + struct sentinel + { + int i; + }; + + bool operator== (const iter& i, const sentinel& s) + { + return i.i == s.i; + } + + bool operator!= (const iter& i, const sentinel& s) + { + return !(i == s); + } + + struct range + { + iter begin() const + { + return {0}; + } + + sentinel end() const + { + return {5}; + } + }; + + void f() + { + range r {}; + + for (auto i : r) + { + [[maybe_unused]] auto v = i; + } + } + + } + + namespace test_lambda_capture_asterisk_this_by_value + { + + struct t + { + int i; + int foo() + { + return [*this]() + { + return i; + }(); + } + }; + + } + + namespace test_enum_class_construction + { + + enum class byte : unsigned char + {}; + + byte foo {42}; + + } + + namespace test_constexpr_if + { + + template + int f () + { + if constexpr(cond) + { + return 13; + } + else + { + return 42; + } + } + + } + + namespace test_selection_statement_with_initializer + { + + int f() + { + return 13; + } + + int f2() + { + if (auto i = f(); i > 0) + { + return 3; + } + + switch (auto i = f(); i + 4) + { + case 17: + return 2; + + default: + return 1; + } + } + + } + + namespace test_template_argument_deduction_for_class_templates + { + + template + struct pair + { + pair (T1 p1, T2 p2) + : m1 {p1}, + m2 {p2} + {} + + T1 m1; + T2 m2; + }; + + void f() + { + [[maybe_unused]] auto p = pair{13, 42u}; + } + + } + + namespace test_non_type_auto_template_parameters + { + + template + struct B + {}; + + B<5> b1; + B<'a'> b2; + + } + + namespace test_structured_bindings + { + + int arr[2] = { 1, 2 }; + std::pair pr = { 1, 2 }; + + auto f1() -> int(&)[2] + { + return arr; + } + + auto f2() -> std::pair& + { + return pr; + } + + struct S + { + int x1 : 2; + volatile double y1; + }; + + S f3() + { + return {}; + } + + auto [ x1, y1 ] = f1(); + auto& [ xr1, yr1 ] = f1(); + auto [ x2, y2 ] = f2(); + auto& [ xr2, yr2 ] = f2(); + const auto [ x3, y3 ] = f3(); + + } + + namespace test_exception_spec_type_system + { + + struct Good {}; + struct Bad {}; + + void g1() noexcept; + void g2(); + + template + Bad + f(T*, T*); + + template + Good + f(T1*, T2*); + + static_assert (std::is_same_v); + + } + + namespace test_inline_variables + { + + template void f(T) + {} + + template inline T g(T) + { + return T{}; + } + + template<> inline void f<>(int) + {} + + template<> int g<>(int) + { + return 5; + } + + } + +} // namespace cxx17 + +#endif // __cplusplus < 201703L + +]]) + + +dnl Tests for new features in C++20 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[ + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 202002L + +#error "This is not a C++20 compiler" + +#else + +#include + +namespace cxx20 +{ + +// As C++20 supports feature test macros in the standard, there is no +// immediate need to actually test for feature availability on the +// Autoconf side. + +} // namespace cxx20 + +#endif // __cplusplus < 202002L + +]]) diff --git a/src/dashbls/build-aux/m4/ax_pthread.m4 b/src/dashbls/build-aux/m4/ax_pthread.m4 new file mode 100644 index 000000000000..9f35d139149f --- /dev/null +++ b/src/dashbls/build-aux/m4/ax_pthread.m4 @@ -0,0 +1,522 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is +# needed for multi-threaded programs (defaults to the value of CC +# respectively CXX otherwise). (This is necessary on e.g. AIX to use the +# special cc_r/CC_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also to link with them as well. For example, you might link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threaded programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# CXX="$PTHREAD_CXX" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to +# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the +# PTHREAD_PRIO_INHERIT symbol is defined when compiling with +# PTHREAD_CFLAGS. +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# Updated for Autoconf 2.68 by Daniel Richard G. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson +# Copyright (c) 2011 Daniel Richard G. +# Copyright (c) 2019 Marc Stevens +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 31 + +AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) +AC_DEFUN([AX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_SED]) +AC_LANG_PUSH([C]) +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on Tru64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) + AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) + AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) + AC_MSG_RESULT([$ax_pthread_ok]) + if test "x$ax_pthread_ok" = "xno"; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], + [ +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + ], + [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) + ;; + + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" + ;; +esac + +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + +AS_IF([test "x$GCC" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +AS_IF([test "x$ax_pthread_clang" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread"]) + + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + + *) + ax_pthread_check_macro="--" + ;; +esac +AS_IF([test "x$ax_pthread_check_macro" = "x--"], + [ax_pthread_check_cond=0], + [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) + + +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + AC_MSG_RESULT([$ax_pthread_ok]) + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [ac_link="$ax_pthread_2step_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [break]) + ]) + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + ]) + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + + + +# Various other checks: +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_CACHE_CHECK([for joinable pthread attribute], + [ax_cv_PTHREAD_JOINABLE_ATTR], + [ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $ax_pthread_attr; return attr /* ; */])], + [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], + []) + done + ]) + AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"], + [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], + [$ax_cv_PTHREAD_JOINABLE_ATTR], + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + ax_pthread_joinable_attr_defined=yes + ]) + + AC_CACHE_CHECK([whether more special flags are required for pthreads], + [ax_cv_PTHREAD_SPECIAL_FLAGS], + [ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + ]) + AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"], + [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes]) + + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], + [ax_cv_PTHREAD_PRIO_INHERIT], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) + ]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"], + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) + ax_pthread_prio_inherit_defined=yes + ]) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then + case $host_os in + aix*) + AS_CASE(["x/$CC"], + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [ + AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) + AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) + ], + [ + AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) + AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) + ] + ) + ]) + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" + +AC_SUBST([PTHREAD_LIBS]) +AC_SUBST([PTHREAD_CFLAGS]) +AC_SUBST([PTHREAD_CC]) +AC_SUBST([PTHREAD_CXX]) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test "x$ax_pthread_ok" = "xyes"; then + ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) + : +else + ax_pthread_ok=no + $2 +fi +AC_LANG_POP +])dnl AX_PTHREAD diff --git a/src/dashbls/cmake_modules/BrewHelper.cmake b/src/dashbls/cmake_modules/BrewHelper.cmake new file mode 100644 index 000000000000..6a1738fa1c17 --- /dev/null +++ b/src/dashbls/cmake_modules/BrewHelper.cmake @@ -0,0 +1,21 @@ +# Copyright (c) 2018 The Bitcoin developers + +find_program(BREW brew) + +function(find_brew_prefix VAR NAME) + if(NOT BREW) + return() + endif() + + if(DEFINED ${VAR}) + return() + endif() + + execute_process( + COMMAND ${BREW} --prefix ${NAME} + OUTPUT_VARIABLE PREFIX + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + set(${VAR} ${PREFIX} PARENT_SCOPE) +endfunction() diff --git a/src/dashbls/cmake_modules/Findgmp.cmake b/src/dashbls/cmake_modules/Findgmp.cmake new file mode 100644 index 000000000000..3e59ede0a4f3 --- /dev/null +++ b/src/dashbls/cmake_modules/Findgmp.cmake @@ -0,0 +1,103 @@ +# Try to find the GMP library +# https://gmplib.org/ +# +# This module supports requiring a minimum version, e.g. you can do +# find_package(GMP 6.0.0) +# to require version 6.0.0 to newer of GMP. +# +# Once done this will define +# +# GMP_FOUND - system has GMP lib with correct version +# GMP_INCLUDES - the GMP include directory +# GMP_LIBRARIES - the GMP library +# GMP_VERSION - GMP version +# +# Copyright (c) 2016 Jack Poulson, +# Redistribution and use is allowed according to the terms of the BSD license. + +include(BrewHelper) +find_brew_prefix(_GMP_BREW_HINT gmp) + +find_path(GMP_INCLUDES + NAMES + gmp.h + PATHS + $ENV{GMPDIR} ${INCLUDE_INSTALL_DIR} + PATH_SUFFIXES + include + HINTS + ${_GMP_BREW_HINT} +) + +# Set GMP_FIND_VERSION to 5.1.0 if no minimum version is specified +if(NOT GMP_FIND_VERSION) + if(NOT GMP_FIND_VERSION_MAJOR) + set(GMP_FIND_VERSION_MAJOR 5) + endif() + if(NOT GMP_FIND_VERSION_MINOR) + set(GMP_FIND_VERSION_MINOR 1) + endif() + if(NOT GMP_FIND_VERSION_PATCH) + set(GMP_FIND_VERSION_PATCH 0) + endif() + set(GMP_FIND_VERSION + "${GMP_FIND_VERSION_MAJOR}.${GMP_FIND_VERSION_MINOR}.${GMP_FIND_VERSION_PATCH}") +endif() + +message("GMP_INCLUDES=${GMP_INCLUDES}") +if(GMP_INCLUDES) + # Since the GMP version macros may be in a file included by gmp.h of the form + # gmp-.*[_]?.*.h (e.g., gmp-x86_64.h), we search each of them. + file(GLOB GMP_HEADERS "${GMP_INCLUDES}/gmp.h" "${GMP_INCLUDES}/gmp-*.h") + foreach(gmp_header_filename ${GMP_HEADERS}) + file(READ "${gmp_header_filename}" _gmp_version_header) + string(REGEX MATCH + "define[ \t]+__GNU_MP_VERSION[ \t]+([0-9]+)" _gmp_major_version_match + "${_gmp_version_header}") + if(_gmp_major_version_match) + set(GMP_MAJOR_VERSION "${CMAKE_MATCH_1}") + string(REGEX MATCH "define[ \t]+__GNU_MP_VERSION_MINOR[ \t]+([0-9]+)" + _gmp_minor_version_match "${_gmp_version_header}") + set(GMP_MINOR_VERSION "${CMAKE_MATCH_1}") + string(REGEX MATCH "define[ \t]+__GNU_MP_VERSION_PATCHLEVEL[ \t]+([0-9]+)" + _gmp_patchlevel_version_match "${_gmp_version_header}") + set(GMP_PATCHLEVEL_VERSION "${CMAKE_MATCH_1}") + set(GMP_VERSION + ${GMP_MAJOR_VERSION}.${GMP_MINOR_VERSION}.${GMP_PATCHLEVEL_VERSION}) + endif() + endforeach() + + # Check whether found version exists and exceeds the minimum requirement + if(NOT GMP_VERSION) + set(GMP_VERSION_OK FALSE) + message(STATUS "GMP version was not detected") + elseif(${GMP_VERSION} VERSION_LESS ${GMP_FIND_VERSION}) + set(GMP_VERSION_OK FALSE) + message(STATUS "GMP version ${GMP_VERSION} found in ${GMP_INCLUDES}, " + "but at least version ${GMP_FIND_VERSION} is required") + else() + set(GMP_VERSION_OK TRUE) + endif() +endif() + +if(STBIN) + set(_gmp_lib_name libgmp.a) +else() + set(_gmp_lib_name libgmp.so) +endif() + +find_library(GMP_LIBRARIES + NAMES + ${_gmp_lib_name} gmp.lib libgmp-10 libgmp gmp + HINTS + ${_GMP_BREW_HINT} + INCLUDE_DIRS + ${GMP_INCLUDES} + PATHS + $ENV{GMPDIR} ${LIB_INSTALL_DIR} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(gmp DEFAULT_MSG + GMP_INCLUDES GMP_LIBRARIES GMP_VERSION_OK) +mark_as_advanced(GMP_INCLUDES GMP_LIBRARIES) diff --git a/src/dashbls/cmake_modules/Findsodium.cmake b/src/dashbls/cmake_modules/Findsodium.cmake new file mode 100644 index 000000000000..0350b67fce9b --- /dev/null +++ b/src/dashbls/cmake_modules/Findsodium.cmake @@ -0,0 +1,294 @@ +# Written in 2016 by Henrik Steffen Gaßmann +# +# To the extent possible under law, the author(s) have dedicated all +# copyright and related and neighboring rights to this software to the +# public domain worldwide. This software is distributed without any warranty. +# +# You should have received a copy of the CC0 Public Domain Dedication +# along with this software. If not, see +# +# http://creativecommons.org/publicdomain/zero/1.0/ +# +######################################################################## +# Tries to find the local libsodium installation. +# +# On Windows the sodium_DIR environment variable is used as a default +# hint which can be overridden by setting the corresponding cmake variable. +# +# Once done the following variables will be defined: +# +# sodium_FOUND +# sodium_INCLUDE_DIR +# sodium_LIBRARY_DEBUG +# sodium_LIBRARY_RELEASE +# +# +# Furthermore an imported "sodium" target is created. +# + +if (CMAKE_C_COMPILER_ID STREQUAL "GNU" + OR CMAKE_C_COMPILER_ID STREQUAL "Clang") + set(_GCC_COMPATIBLE 1) +endif() + +# static library option +if (NOT DEFINED sodium_USE_STATIC_LIBS) + option(sodium_USE_STATIC_LIBS "enable to statically link against sodium" OFF) +endif() +if(NOT (sodium_USE_STATIC_LIBS EQUAL sodium_USE_STATIC_LIBS_LAST)) + unset(sodium_LIBRARY CACHE) + unset(sodium_LIBRARY_DEBUG CACHE) + unset(sodium_LIBRARY_RELEASE CACHE) + unset(sodium_DLL_DEBUG CACHE) + unset(sodium_DLL_RELEASE CACHE) + set(sodium_USE_STATIC_LIBS_LAST ${sodium_USE_STATIC_LIBS} CACHE INTERNAL "internal change tracking variable") +endif() + + +######################################################################## +# UNIX +if (UNIX) + # import pkg-config + find_package(PkgConfig QUIET) + if (PKG_CONFIG_FOUND) + pkg_check_modules(sodium_PKG QUIET libsodium) + endif() + + if(sodium_USE_STATIC_LIBS) + foreach(_libname ${sodium_PKG_STATIC_LIBRARIES}) + if (NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending with .a + list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a") + endif() + endforeach() + list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES) + + # if pkgconfig for libsodium doesn't provide + # static lib info, then override PKG_STATIC here.. + if (NOT sodium_PKG_STATIC_FOUND) + set(sodium_PKG_STATIC_LIBRARIES libsodium.a) + endif() + + set(XPREFIX sodium_PKG_STATIC) + else() + if (NOT sodium_PKG_FOUND) + set(sodium_PKG_LIBRARIES sodium) + endif() + + set(XPREFIX sodium_PKG) + endif() + + find_path(sodium_INCLUDE_DIR sodium.h + HINTS ${${XPREFIX}_INCLUDE_DIRS} + ) + find_library(sodium_LIBRARY_DEBUG NAMES ${${XPREFIX}_LIBRARIES} + HINTS ${${XPREFIX}_LIBRARY_DIRS} + ) + find_library(sodium_LIBRARY_RELEASE NAMES ${${XPREFIX}_LIBRARIES} + HINTS ${${XPREFIX}_LIBRARY_DIRS} + ) + + +######################################################################## +# Windows +elseif (WIN32) + set(sodium_DIR "$ENV{sodium_DIR}" CACHE FILEPATH "sodium install directory") + mark_as_advanced(sodium_DIR) + + find_path(sodium_INCLUDE_DIR sodium.h + HINTS ${sodium_DIR} + PATH_SUFFIXES include + ) + + if (MSVC) + # detect target architecture + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.cpp" [=[ + #if defined _M_IX86 + #error ARCH_VALUE x86_32 + #elif defined _M_X64 + #error ARCH_VALUE x86_64 + #endif + #error ARCH_VALUE unknown + ]=]) + try_compile(_UNUSED_VAR "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/arch.cpp" + OUTPUT_VARIABLE _COMPILATION_LOG + ) + string(REGEX REPLACE ".*ARCH_VALUE ([a-zA-Z0-9_]+).*" "\\1" _TARGET_ARCH "${_COMPILATION_LOG}") + + # construct library path + if (_TARGET_ARCH STREQUAL "x86_32") + string(APPEND _PLATFORM_PATH "Win32") + elseif(_TARGET_ARCH STREQUAL "x86_64") + string(APPEND _PLATFORM_PATH "x64") + else() + message(FATAL_ERROR "the ${_TARGET_ARCH} architecture is not supported by Findsodium.cmake.") + endif() + string(APPEND _PLATFORM_PATH "/$$CONFIG$$") + + if (MSVC_VERSION LESS 1900) + math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 60") + else() + math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 50") + endif() + string(APPEND _PLATFORM_PATH "/v${_VS_VERSION}") + + if (sodium_USE_STATIC_LIBS) + string(APPEND _PLATFORM_PATH "/static") + else() + string(APPEND _PLATFORM_PATH "/dynamic") + endif() + + string(REPLACE "$$CONFIG$$" "Debug" _DEBUG_PATH_SUFFIX "${_PLATFORM_PATH}") + string(REPLACE "$$CONFIG$$" "Release" _RELEASE_PATH_SUFFIX "${_PLATFORM_PATH}") + + find_library(sodium_LIBRARY_DEBUG libsodium.lib + HINTS ${sodium_DIR} + PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX} + ) + find_library(sodium_LIBRARY_RELEASE libsodium.lib + HINTS ${sodium_DIR} + PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX} + ) + if (NOT sodium_USE_STATIC_LIBS) + set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") + find_library(sodium_DLL_DEBUG libsodium + HINTS ${sodium_DIR} + PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX} + ) + find_library(sodium_DLL_RELEASE libsodium + HINTS ${sodium_DIR} + PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX} + ) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK}) + endif() + + elseif(_GCC_COMPATIBLE) + if (sodium_USE_STATIC_LIBS) + find_library(sodium_LIBRARY_DEBUG libsodium.a + HINTS ${sodium_DIR} + PATH_SUFFIXES lib + ) + find_library(sodium_LIBRARY_RELEASE libsodium.a + HINTS ${sodium_DIR} + PATH_SUFFIXES lib + ) + else() + find_library(sodium_LIBRARY_DEBUG libsodium.dll.a + HINTS ${sodium_DIR} + PATH_SUFFIXES lib + ) + find_library(sodium_LIBRARY_RELEASE libsodium.dll.a + HINTS ${sodium_DIR} + PATH_SUFFIXES lib + ) + + file(GLOB _DLL + LIST_DIRECTORIES false + RELATIVE "${sodium_DIR}/bin" + "${sodium_DIR}/bin/libsodium*.dll" + ) + find_library(sodium_DLL_DEBUG ${_DLL} libsodium + HINTS ${sodium_DIR} + PATH_SUFFIXES bin + ) + find_library(sodium_DLL_RELEASE ${_DLL} libsodium + HINTS ${sodium_DIR} + PATH_SUFFIXES bin + ) + endif() + else() + message(FATAL_ERROR "this platform is not supported by FindSodium.cmake") + endif() + + +######################################################################## +# unsupported +else() + message(FATAL_ERROR "this platform is not supported by FindSodium.cmake") +endif() + + +######################################################################## +# common stuff + +# extract sodium version +if (sodium_INCLUDE_DIR) + set(_VERSION_HEADER "${_INCLUDE_DIR}/sodium/version.h") + if (EXISTS _VERSION_HEADER) + file(READ "${_VERSION_HEADER}" _VERSION_HEADER_CONTENT) + string(REGEX REPLACE ".*#[ \t]*define[ \t]*SODIUM_VERSION_STRING[ \t]*\"([^\n]*)\".*" "\\1" + sodium_VERSION "${_VERSION_HEADER_CONTENT}") + set(sodium_VERSION "${sodium_VERSION}" PARENT_SCOPE) + endif() +endif() + +# communicate results +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + sodium # The name must be either uppercase or match the filename case. + REQUIRED_VARS + sodium_LIBRARY_RELEASE + sodium_LIBRARY_DEBUG + sodium_INCLUDE_DIR + VERSION_VAR + sodium_VERSION +) + +if(Sodium_FOUND) + set(sodium_LIBRARIES + optimized ${sodium_LIBRARY_RELEASE} debug ${sodium_LIBRARY_DEBUG}) +endif() + +# mark file paths as advanced +mark_as_advanced(sodium_INCLUDE_DIR) +mark_as_advanced(sodium_LIBRARY_DEBUG) +mark_as_advanced(sodium_LIBRARY_RELEASE) +if (WIN32) + mark_as_advanced(sodium_DLL_DEBUG) + mark_as_advanced(sodium_DLL_RELEASE) +endif() + +# create imported target +if(sodium_USE_STATIC_LIBS) + set(_LIB_TYPE STATIC) +else() + set(_LIB_TYPE SHARED) +endif() +add_library(sodium ${_LIB_TYPE} IMPORTED) + +set_target_properties(sodium PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${sodium_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" +) + +if (sodium_USE_STATIC_LIBS) + set_target_properties(sodium PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "SODIUM_STATIC" + IMPORTED_LOCATION "${sodium_LIBRARY_RELEASE}" + IMPORTED_LOCATION_DEBUG "${sodium_LIBRARY_DEBUG}" + ) +else() + if (UNIX) + set_target_properties(sodium PROPERTIES + IMPORTED_LOCATION "${sodium_LIBRARY_RELEASE}" + IMPORTED_LOCATION_DEBUG "${sodium_LIBRARY_DEBUG}" + ) + elseif (WIN32) + set_target_properties(sodium PROPERTIES + IMPORTED_IMPLIB "${sodium_LIBRARY_RELEASE}" + IMPORTED_IMPLIB_DEBUG "${sodium_LIBRARY_DEBUG}" + ) + if (NOT (sodium_DLL_DEBUG MATCHES ".*-NOTFOUND")) + set_target_properties(sodium PROPERTIES + IMPORTED_LOCATION_DEBUG "${sodium_DLL_DEBUG}" + ) + endif() + if (NOT (sodium_DLL_RELEASE MATCHES ".*-NOTFOUND")) + set_target_properties(sodium PROPERTIES + IMPORTED_LOCATION_RELWITHDEBINFO "${sodium_DLL_RELEASE}" + IMPORTED_LOCATION_MINSIZEREL "${sodium_DLL_RELEASE}" + IMPORTED_LOCATION_RELEASE "${sodium_DLL_RELEASE}" + ) + endif() + endif() +endif() diff --git a/src/dashbls/configure.ac b/src/dashbls/configure.ac new file mode 100644 index 000000000000..815a015b03dc --- /dev/null +++ b/src/dashbls/configure.ac @@ -0,0 +1,919 @@ +AC_PREREQ([2.60]) +AC_INIT([libdashbls],[1.3.5]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([build-aux/m4]) + +dnl Unless the user specified ARFLAGS, force it to be cr +AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to if not set]) +if test "x${ARFLAGS+set}" != "xset"; then + ARFLAGS="qc" +fi + +AC_CANONICAL_HOST + +AH_TOP([#ifndef RLC_CONF_H]) +AH_TOP([#define RLC_CONF_H]) +AH_BOTTOM([#endif /*RLC_CONF_H*/]) +AM_INIT_AUTOMAKE([foreign no-define subdir-objects]) + +dnl faketime messes with timestamps and causes configure to be re-run. +dnl --disable-maintainer-mode can be used to bypass this. +AM_MAINTAINER_MODE([enable]) + +dnl make the compilation flags quiet unless V=1 is used +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +dnl Compiler checks (here before libtool). +if test "x${CFLAGS+set}" = "xset"; then + CFLAGS_overridden=yes +else + CFLAGS_overridden=no +fi +if test "x${CXXFLAGS+set}" = "xset"; then + CXXFLAGS_overridden=yes +else + CXXFLAGS_overridden=no +fi + +AC_PROG_CC + +AC_PROG_CXX + +dnl By default, libtool for mingw refuses to link static libs into a dll for +dnl fear of mixing pic/non-pic objects, and import/export complications. Since +dnl we have those under control, re-enable that functionality. +case $host in + *mingw*) + lt_cv_deplibs_check_method="pass_all" + ;; +esac +dnl Require C++14 compiler (no GNU extensions) +AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory], [nodefault]) + +dnl Libtool init checks. +LT_INIT([pic-only]) + +AC_PATH_TOOL(AR, ar) +AC_PATH_TOOL(RANLIB, ranlib) +AC_PATH_TOOL(STRIP, strip) + +AM_PROG_AS + +AC_ARG_ENABLE([tests], + [AS_HELP_STRING([--enable-tests], + [Compile with tests [default=yes]])], + [use_tests=$enableval], + [use_tests=yes]) + +AC_ARG_ENABLE([bench], + [AS_HELP_STRING([--enable-bench], + [Compile with benchmarks [default=yes]])], + [use_bench=$enableval], + [use_bench=yes]) + +AC_ARG_ENABLE([hardening], + [AS_HELP_STRING([--enable-hardening], + [Enable hardening flags and arguments [default=auto]])], + [use_hardening=$enableval], + [use_hardening=auto]) + +AC_ARG_ENABLE([optimizations], + [AS_HELP_STRING([--enable-optimizations], + [Enable compiler and library optimizations [default=yes]])], + [use_optimizations=$enableval], + [use_optimizations=yes]) + +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [Build with debugging support [default=no]])], + [use_debug=$enableval], + [use_debug=no]) + +AC_LANG_PUSH([C]) + +dnl Check for a flag to turn compiler warnings into errors. This is helpful for checks which may +dnl appear to succeed because by default they merely emit warnings when they fail. +dnl +dnl Note that this is not necessarily a check to see if -Werror is supported, but rather to see if +dnl a compile with -Werror can succeed. This is important because the compiler may already be +dnl warning about something unrelated, for example about some path issue. If that is the case, +dnl -Werror cannot be used because all of those warnings would be turned into errors. +AX_CHECK_COMPILE_FLAG([-Werror], [FLAG_WERROR="-Werror"], [FLAG_WERROR=""]) + +if test x"$use_debug" = x"yes" -o x"$use_optimizations" = x"no"; then + dnl Clear default -g -O2 flags + if test x"$CFLAGS_overridden" = x"no"; then + CFLAGS="" + fi + if test x"$CXXFLAGS_overridden" = x"no"; then + CXXFLAGS="" + fi + + dnl Disable optimizations + AX_CHECK_COMPILE_FLAG([-O0], [[DEBUG_FLAGS="$DEBUG_FLAGS -O0"]], [], [[$FLAG_WERROR]]) + + if test x"$use_debug" = x"yes"; then + dnl Prefer -g3, fall back to -g if that is unavailable. + AX_CHECK_COMPILE_FLAG( + [-g3], + [[DEBUG_FLAGS="$DEBUG_FLAGS -g3"]], + [AX_CHECK_COMPILE_FLAG([-g],[[DEBUG_FLAGS="$DEBUG_FLAGS -g"]])], [[$FLAG_WERROR]]) + + AX_CHECK_COMPILE_FLAG([-ftrapv],[DEBUG_FLAGS="$DEBUG_FLAGS -ftrapv"], [], [[$FLAG_WERROR]]) + else + dnl Reintroduce -g flag deleted during C(XX)FLAGS reset + AX_CHECK_COMPILE_FLAG([-g],[[DEBUG_FLAGS="$DEBUG_FLAGS -g"]], [], [[$FLAG_WERROR]]) + + dnl -ftrapv and -fwrapv conflict, so we only set this if use_debug=no + AX_CHECK_COMPILE_FLAG([-fwrapv],[DEBUG_FLAGS="$DEBUG_FLAGS -fwrapv"], [], [[$FLAG_WERROR]]) + fi +fi + +dnl Define enum mappings for relic config +AC_DEFINE([RLC_VERSION], ["0.5.0"], [Relic Version]) + +dnl dashbls: Library processor architecture +AC_DEFINE([AVR], [1], [Atmel AVR ATMega128 8-bit architecture.]) +AC_DEFINE([MSP], [2], [MSP430 16-bit architecture.]) +AC_DEFINE([ARM], [3], [ARM 32-bit architecture.]) +AC_DEFINE([X86], [4], [Intel x86-compatible 32-bit architecture.]) +AC_DEFINE([X64], [5], [AMD64-compatible 64-bit architecture.]) + +dnl Relic: Generic options +AC_DEFINE([RELIC_NONE], [0], [Unknown or unrecognized parameter.]) + +dnl Relic: Arithmetic backends +AC_DEFINE([EASY], [1], [Easy C-only backend.]) +AC_DEFINE([GMP], [2], [Backend based on GNU Multiple Precision library.]) +AC_DEFINE([GMP_SEC], [3], [Backend based on GNU Multiple Precision library, but using constant-time code.]) + +AC_DEFUN([GMP_CHECK],[ + AC_REQUIRE([AC_PROG_CC]) + + CPPFLAGS_TEMP="$CPPFLAGS" + CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" + LIBS_TEMP="$LIBS" + LIBS="$GMP_LDFLAGS $LIBS" + + AC_CHECK_HEADER( + gmp.h, + [AC_CHECK_LIB(gmp, __gmpz_init, [], [gmp_fail_reason="libgmp not found or unusable"; has_gmp=no;])], + [gmp_fail_reason="gmp header not found"; has_gmp=no;] + ) + + if test x"$has_gmp" != x"no"; then + # Proper support for macOS aarch64 was introduced in 6.3.0, but LTS distros + # like Ubuntu 20.04 (focal) use 6.2.0, so, the minimum supported version is + # determined by platform and architecture. + case $host in + *darwin*) + case $host_cpu in + aarch*) + gmp_major_version=6 + gmp_minor_version=3 + ;; + esac + ;; + *) + gmp_major_version=6 + gmp_minor_version=2 + ;; + esac + AC_MSG_CHECKING([gmp version >= $gmp_major_version.$gmp_minor_version]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[@%:@include ]], + [[ + @%:@if __GNU_MP_VERSION < $gmp_major_version || __GNU_MP_VERSION_MINOR < $gmp_minor_version + @%:@error Unsupported GMP version + @%:@endif]])], + [AC_MSG_RESULT([yes]); GMP_LIBS="-lgmp"; has_gmp=yes;], + [AC_MSG_RESULT([no]); gmp_fail_reason="unsupported gmp version"; has_gmp=no;] + ) + fi + + if test x"$want_backend" = x"gmp" && test x"$has_gmp" = x"no"; then + AC_MSG_ERROR([$gmp_fail_reason]) + fi + + CPPFLAGS="$CPPFLAGS_TEMP" + LIBS="$LIBS_TEMP" +]) + +AC_ARG_WITH([backend], + [AS_HELP_STRING([--with-backend=auto|easy|gmp], + [backend implementation to use [default=auto]])], + [want_backend=$withval], + [want_backend=auto] +) + +case $host in + *darwin*) + AC_PATH_PROG([BREW],brew,) + if test x$BREW != x; then + # These Homebrew packages may be keg-only, meaning that they won't be found + # in expected paths because they may conflict with system files. Ask + # Homebrew where each one is located, then adjust paths accordingly. + gmp_prefix=`$BREW --prefix gmp 2>/dev/null` + if test x$gmp_prefix != x; then + GMP_CPPFLAGS="-I$gmp_prefix/include" + GMP_LDFLAGS="-L$gmp_prefix/lib" + fi + fi + ;; + *freebsd*) + GMP_CPPFLAGS="-I/usr/local/include" + GMP_LDFLAGS="-L/usr/local/lib" + ;; +esac + +if test x"$want_backend" = x"auto"; then + if test x"$use_optimizations" = x"no"; then + want_backend=easy + else + GMP_CHECK + if test x"$has_gmp" = x"yes"; then + want_backend=gmp + else + want_backend=easy + fi + fi +else + case $want_backend in + gmp) + dnl GMP_CHECK will report the reason if and why the backend cannot be used. + GMP_CHECK + ;; + easy) + ;; + *) + AC_MSG_ERROR([invalid backend explicitly requested]) + ;; + esac +fi + +case $want_backend in +gmp) + AC_DEFINE(ARITH, GMP, [Define if GNU MP backend is requested]) + ;; +easy) + AC_DEFINE(ARITH, EASY, [Define if C-only backend is requested].) + ;; +*) + AC_MSG_ERROR([invalid backend explicitly requested]) + ;; +esac + +dnl Relic: Multithreading APIs +AC_DEFINE([OPENMP], [1], [OpenMP multithreading support.]) +AC_DEFINE([PTHREAD], [2], [POSIX multithreading support.]) + +dnl Relic: Supported operating systems +AC_DEFINE([LINUX], [1], [GNU/Linux operating system.]) +AC_DEFINE([FREEBSD], [2], [FreeBSD operating system.]) +AC_DEFINE([MACOSX], [3], [MacOS operating system.]) +AC_DEFINE([WINDOWS], [4], [Windows operating system.]) +AC_DEFINE([DROID], [5], [Android operating system.]) +AC_DEFINE([DUINO], [6], [Arduino platform.]) +dnl AC_DEFINE([OPENBSD], [7], [OpenBSD operating system.]) + +dnl Relic: Supported timers +AC_DEFINE([HREAL], [1], [Per-process high-resolution timer.]) +AC_DEFINE([HPROC], [2], [Per-process high-resolution timer.]) +AC_DEFINE([HTHRD], [3], [Per-thread high-resolution timer.]) +AC_DEFINE([ANSI], [5], [ANSI-compatible timer.]) +AC_DEFINE([POSIX], [4], [POSIX-compatible timer.]) +AC_DEFINE([CYCLE], [6], [Cycle-counting timer.]) +AC_DEFINE([PERF], [7], [Performance monitoring framework.]) + +dnl Relic: Memory-allocation policies +AC_DEFINE([AUTO], [1], [Automatic memory allocation.]) +AC_DEFINE([DYNAMIC], [2], [Dynamic memory allocation.]) + +dnl Relic (CP): Support for faster CRT-based exponentiation in factoring-based cryptosystems +AC_DEFINE([PKCS1], [2], [RSA PKCS#1 v1.5 padding.]) +AC_DEFINE([PKCS2], [3], [RSA PKCS#1 v2.1 padding.]) + +dnl Relic (MD): Available hash functions +AC_DEFINE([SH224], [2], [SHA-224 hash function.]) +AC_DEFINE([SH256], [3], [SHA-256 hash function.]) +AC_DEFINE([SH384], [4], [SHA-384 hash function.]) +AC_DEFINE([SH512], [5], [SHA-512 hash function.]) +AC_DEFINE([B2S160], [6], [BLAKE2s-160 hash function.]) +AC_DEFINE([B2S256], [7], [BLAKE2s-256 hash function.]) + +dnl Relic (RAND): Available pseudo-random number generators +AC_DEFINE([HASHD], [1], [NIST HASH-DRBG generator.]) +AC_DEFINE([RDRND], [2], [Intel RdRand instruction.]) +AC_DEFINE([UDEV], [3], [Operating system underlying generator.]) +AC_DEFINE([CALL], [4], [Override library generator with the callback.]) + +dnl Relic (RAND): Available random number generator seeders +AC_DEFINE([LIBC], [1], [Standard C library generator.]) +dnl AC_DEFINE([RDRND], [2], [Intel RdRand instruction.]) +dnl AC_DEFINE([UDEV], [3], [Operating system underlying generator.]) +AC_DEFINE([WCGR], [4], [Use Windows' CryptGenRandom.]) + +dnl Relic (BN): Options for the multiple precision +AC_DEFINE([SINGLE], [1], [A multiple precision integer can store w words.]) +AC_DEFINE([CARRY], [2], [A multiple precision integer can store the result of an addition.]) +AC_DEFINE([DOUBLE], [3], [A multiple precision integer can store the result of a multiplication.]) + +AC_DEFINE([BASIC], [1], [Basic method.]) +AC_DEFINE([PRIME], [1], [Prime curves.]) +AC_DEFINE([TATEP], [1], [Tate pairing.]) +AC_DEFINE([COMBA], [2], [Comba method.]) +AC_DEFINE([LEHME], [2], [Lehmer's fast GCD Algorithm.]) +AC_DEFINE([SAFEP], [2], [Safe prime generation.]) +AC_DEFINE([QUICK], [2], [Fast reduction modulo special form prime.]) +AC_DEFINE([BINAR], [2], [Binary inversion.]) +AC_DEFINE([LAZYR], [2], [Lazy-reduced extension field arithmetic.]) +AC_DEFINE([LODAH], [2], [Lopez-Dahab multiplication.]) +AC_DEFINE([SLIDE], [2], [Sliding window modular exponentiation.]) +AC_DEFINE([PROJC], [2], [Projective coordinates.]) +AC_DEFINE([COMBS], [2], [Single-table comb method.]) +AC_DEFINE([TRICK], [2], [Shamir's trick.]) +AC_DEFINE([CHAR2], [2], [Binary curves.]) +AC_DEFINE([WEILP], [2], [Weil pairing.]) +AC_DEFINE([MONTY], [3], [Montgomery method.]) +AC_DEFINE([STEIN], [3], [Stein's binary GCD Algorithm.]) +AC_DEFINE([STRON], [3], [Strong prime generation.]) +AC_DEFINE([INTEG], [3], [Integrated modular addtion.]) +AC_DEFINE([INTER], [3], [Interleaving of w-(T)NAFs.]) +AC_DEFINE([ALMOS], [3], [Almost inverse algorithm.]) +AC_DEFINE([JACOB], [3], [Jacobian coordinates.]) +AC_DEFINE([COMBD], [3], [Double-table comb method.]) +AC_DEFINE([HALVE], [3], [Halving.]) +AC_DEFINE([EDDIE], [3], [Edwards curves.]) +AC_DEFINE([EXTND], [3], [Extended projective twisted Edwards coordinates.]) +AC_DEFINE([OATEP], [3], [Optimal ate pairing.]) +AC_DEFINE([PMERS], [4], [Pseudo-Mersenne method.]) +AC_DEFINE([MULTP], [4], [Reuse multiplication for squaring.]) +AC_DEFINE([EXGCD], [4], [Extended Euclidean algorithm.]) +AC_DEFINE([LWNAF], [4], [Left-to-right Width-w NAF.]) +AC_DEFINE([JOINT], [4], [Joint sparse form.]) +AC_DEFINE([DIVST], [5], [Constant-time inversion by Bernstein-Yang division steps.]) +AC_DEFINE([ITOHT], [5], [Itoh-Tsuji inversion.]) +AC_DEFINE([LWREG], [5], [Left-to-right Width-w NAF.]) +AC_DEFINE([BRUCH], [6], [Hardware-friendly inversion by Brunner-Curiger-Hofstetter.]) +AC_DEFINE([CTAIA], [7], [Constant-time version of almost inverse.]) +AC_DEFINE([LOWER], [8], [Use implementation provided by the lower layer.]) + +if test x"$use_debug" = x"yes"; then + AC_DEFINE([DEBUG], [1], [Define this symbol if debugging support is enabled]) +fi + +dnl Define relic switches +AC_ARG_ENABLE([profiling], + [AS_HELP_STRING([--enable-profiling], + [Build with profiling support [default=no]])], + [use_profiling=$enableval], + [use_profiling=no]) + +if test x$use_profiling = xyes; then + AC_DEFINE([PROFL], [1], [Define this symbol if profiling support is enabled]) +fi + +AC_ARG_ENABLE([check], + [AS_HELP_STRING([--enable-check], + [Build with error-checking support [default=no]])], + [use_check=$enableval], + [use_check=no]) + +if test x$use_check = xyes; then + AC_DEFINE([CHECK], [1], [Define this symbol if error-checking support is enabled]) +fi + +AC_ARG_ENABLE([verbs], + [AS_HELP_STRING([--enable-verbs], + [Build with detailed error messages [default=no]])], + [use_verbs=$enableval], + [use_verbs=no]) + +if test x$use_verbs = xyes; then + AC_DEFINE([VERBS], [1], [Define this symbol if detailed error messages are enabled]) +fi + +AC_ARG_ENABLE([overhead], + [AS_HELP_STRING([--enable-overhead], + [Build with overhead estimation [default=no]])], + [use_overhead=$enableval], + [use_overhead=no]) + +if test x$use_overhead = xyes; then + AC_DEFINE([OVERH], [1], [Define this symbol if overhead estimation is enabled]) +fi + +AC_ARG_ENABLE([quiet], + [AS_HELP_STRING([--enable-quiet], + [Build with printing disabled [default=yes]])], + [use_quiet=$enableval], + [use_quiet=yes]) + +if test x$use_quiet = xyes; then + AC_DEFINE([QUIET], [1], [Define this symbol if printing is disabled]) +fi + +AC_ARG_ENABLE([color], + [AS_HELP_STRING([--enable-color], + [Build with colored output support [default=yes]])], + [use_color=$enableval], + [use_color=yes]) + +if test x$use_color = xyes; then + AC_DEFINE([COLOR], [1], [Define this symbol if colored output is enabled]) +fi + +AC_ARG_ENABLE([big_endian], + [AS_HELP_STRING([--enable-big-endian], + [Build with big-endian support [default=no]])], + [use_big_endian=$enableval], + [use_big_endian=no]) + +if test x$use_big_endian = xyes; then + AC_DEFINE([BIGED], [1], [Define this symbol if big-endian support is enabled]) +fi + +use_pkgconfig=yes + +if test x"$use_optimizations" = x"yes"; then + case $host_cpu in + amd64 | x86_64) + dnl Support for AMD64 (also known as x86_64 on some platforms) processors + CPU_ARCH="x64" + AC_DEFINE([ARCH], [X64], [Architecture.]) + AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) + ;; + aarch*) + dnl Support for 64-bit ARM processors + dnl Relic does not support aarch64 yet, set CPU_ARCH to none and ARCH to RELIC_NONE. + CPU_ARCH="none" + AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) + AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) + ;; + i?86) + dnl Support for Intel x86 processors + CPU_ARCH="x86" + AC_DEFINE([ARCH], [X86], [Architecture.]) + AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) + ;; + arm*) + dnl Support for 32-bit native ARM processors + CPU_ARCH="arm" + AC_DEFINE([ARCH], [ARM], [Architecture.]) + AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) + ;; + *64*) + dnl Support for an undefined 64-bit architecture + CPU_ARCH="none" + AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) + AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) + ;; + *32*) + dnl Support for an undefined 32-bit architecture + CPU_ARCH="none" + AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) + AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) + ;; + *) + AC_MSG_ERROR([Unable to determine host architecture, may not be supported!]) + ;; + esac +else + case $host_cpu in + *64*) + dnl Support for an undefined 64-bit architecture + CPU_ARCH="none" + AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) + AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) + ;; + *32* | arm* | i?86) + dnl Support for an undefined 32-bit architecture + CPU_ARCH="none" + AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) + AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) + ;; + *) + AC_MSG_ERROR([Unable to determine host architecture, may not be supported!]) + ;; + esac +fi + +case $host in + *darwin*) + AC_DEFINE([OPSYS], [MACOSX], [Detected operation system.]) + TARGET_OS=darwin + + AC_PATH_PROG([BREW],brew,) + if test x$BREW = x; then + AC_PATH_PROG([PORT],port,) + # If homebrew isn't installed and macports is, add the macports default paths + # as a last resort. + if test x$PORT != x; then + CPPFLAGS="$CPPFLAGS -isystem /opt/local/include" + LDFLAGS="$LDFLAGS -L/opt/local/lib" + fi + fi + ;; + *mingw*) + AC_DEFINE([OPSYS], [WINDOWS], [Detected operation system.]) + TARGET_OS=windows + + use_pkgconfig=no + LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static" + + dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against. + dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override + dnl its command here, with the predeps/postdeps removed, and -static inserted. Postdeps are + dnl also overridden to prevent their insertion later. + dnl This should only affect dll's. + archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib" + postdeps_CXX= + ;; + *linux*) + AC_DEFINE([OPSYS], [LINUX], [Detected operation system.]) + TARGET_OS=linux + + RELIC_CPPFLAGS="-D_GNU_SOURCE" + ;; + *android*) + AC_DEFINE([OPSYS], [DROID], [Detected operation system.]) + TARGET_OS=android + ;; + *freebsd*) + AC_DEFINE([OPSYS], [FREEBSD], [Detected operation system.]) + TARGET_OS=freebsd + ;; + *netbsd*) + AC_DEFINE([OPSYS], [NETBSD], [Detected operation system.]) + TARGET_OS=netbsd + ;; + *) + AC_DEFINE([OPSYS], [RELIC_NONE], [Detected operation system.]) + ;; +esac + +case $host in + *darwin*) + dnl Relic: Don't define FP_QNRES on Darwin + AC_DEFINE([SEED], [UDEV], [Chosen random generator seeder.]) + ;; + *mingw*) + AC_DEFINE([FP_QNRES], [], [Use -1 as quadratic non-residue.]) + AC_DEFINE([SEED], [WCGR], [Chosen random generator seeder.]) + ;; + *) + AC_DEFINE([FP_QNRES], [], [Use -1 as quadratic non-residue.]) + AC_DEFINE([SEED], [UDEV], [Chosen random generator seeder.]) + ;; +esac + +if test x$use_pkgconfig = xyes; then + m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh.)]) + m4_ifdef([PKG_PROG_PKG_CONFIG], [ + PKG_PROG_PKG_CONFIG + if test x"$PKG_CONFIG" = "x"; then + AC_MSG_ERROR(pkg-config not found.) + fi + ]) +fi + +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -pipe" +AC_MSG_CHECKING([if ${CC} supports -pipe]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + [ AC_MSG_RESULT([yes]) ], + [ AC_MSG_RESULT([no]) + CFLAGS="$saved_CFLAGS" + ]) + +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fomit-frame-pointer" +AC_MSG_CHECKING([if ${CC} supports -fomit-frame-pointer]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + [ AC_MSG_RESULT([yes]) ], + [ AC_MSG_RESULT([no]) + CFLAGS="$saved_CFLAGS" + ]) + +if test x"$CFLAGS_overridden" = x"no" -a x"$CXXFLAGS_overridden" = x"no"; then + dnl Enable warnings + AX_CHECK_COMPILE_FLAG([-Wall],[WARN_FLAGS="$WARN_FLAGS -Wall"], [], [[$FLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wcast-align],[WARN_FLAGS="$WARN_FLAGS -Wcast-align"], [], [[$FLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wextra],[WARN_FLAGS="$WARN_FLAGS -Wextra"], [], [[$FLAG_WERROR]]) + + dnl Exclude known warnings + AX_CHECK_COMPILE_FLAG([-Wlong-long],[NOWARN_FLAGS="$NOWARN_FLAGS -Wno-long-long"], [], [[$FLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wshadow],[NOWARN_FLAGS="$NOWARN_FLAGS -Wno-shadow"], [], [[$FLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wsign-compare],[NOWARN_FLAGS="$NOWARN_FLAGS -Wno-sign-compare"], [], [[$FLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wstrict-prototypes],[NOWARN_FLAGS="$NOWARN_FLAGS -Wno-strict-prototypes"], [], [[$FLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wunused-function],[NOWARN_FLAGS="$NOWARN_FLAGS -Wno-unused-function"], [], [[$FLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wunused-parameter],[NOWARN_FLAGS="$NOWARN_FLAGS -Wno-unused-parameter"], [], [[$FLAG_WERROR]]) +fi + +dnl set default settings for relic +AC_DEFINE([ALIGN], [1], [Byte boundary to align digit vectors.]) + +AC_DEFINE(WITH_BN,, Build multiple precision integer module.) +AC_DEFINE(WITH_DV,, Temporary double-precision digit vectors.) +AC_DEFINE(WITH_FP,, Build prime field module.) +AC_DEFINE(WITH_FPX,, Build prime field extension module.) +AC_DEFINE(WITH_FB,, Build binary field module.) +AC_DEFINE(WITH_FBX,, Build binary field extension module.) +AC_DEFINE(WITH_EP,, Build prime elliptic curve module.) +AC_DEFINE(WITH_EPX,, Build prime field extension elliptic curve module.) +AC_DEFINE(WITH_EB,, Build binary elliptic curve module.) +AC_DEFINE(WITH_ED,, Build elliptic Edwards curve module.) +AC_DEFINE(WITH_EC,, Build elliptic curve cryptography module.) +AC_DEFINE(WITH_PP,, Build pairings over prime curves module.) +AC_DEFINE(WITH_PC,, Build pairing-based cryptography module.) +AC_DEFINE(WITH_BC,, Build block ciphers.) +AC_DEFINE(WITH_MD,, Build hash functions.) +AC_DEFINE(WITH_CP,, Build cryptographic protocols.) +AC_DEFINE(WITH_MPC,, Build Multi-party computation primitives.) + +AC_DEFINE(BN_PRECI, 1024, Required precision in bits.) +AC_DEFINE(BN_KARAT, 0, Number of Karatsuba steps.) +AC_DEFINE(BN_MAGNI, [DOUBLE], Effective size of a multiple precision integer.) + +AC_DEFINE(BN_METHD, "COMBA;COMBA;MONTY;SLIDE;BASIC;BASIC", Multiple precision arithmetic method.) +AC_DEFINE(BN_MUL, COMBA, Chosen multiple precision multiplication method.) +AC_DEFINE(BN_SQR, COMBA, Chosen multiple precision multiplication method.) +AC_DEFINE(BN_MOD, MONTY, Chosen multiple precision modular reduction method.) +AC_DEFINE(BN_MXP, SLIDE, Chosen multiple precision modular exponentiation method.) +AC_DEFINE(BN_GCD, BASIC, Chosen multiple precision greatest common divisor method.) +AC_DEFINE(BN_GEN, BASIC, Chosen prime generation algorithm.) + +AC_DEFINE(FP_PRIME, 381, Prime field size in bits.) +AC_DEFINE(FP_METHD, "INTEG;INTEG;INTEG;MONTY;LOWER;SLIDE", Prime field arithmetic method.) +AC_DEFINE(FP_KARAT, 0, Number of Karatsuba steps.) +AC_DEFINE(FP_WIDTH, 4, Width of window processing for exponentiation methods.) +AC_DEFINE(FP_ADD, INTEG, Chosen prime field multiplication method.) +AC_DEFINE(FP_MUL, INTEG, Chosen prime field multiplication method.) +AC_DEFINE(FP_SQR, INTEG, Chosen prime field multiplication method.) +AC_DEFINE(FP_RDC, MONTY, Chosen prime field reduction method.) +AC_DEFINE(FP_INV, LOWER, Chosen prime field inversion method.) +AC_DEFINE(FP_EXP, SLIDE, Chosen multiple precision modular exponentiation method.) + +AC_DEFINE(FPX_METHD, "INTEG;INTEG;LAZYR", Prime extension field arithmetic method.) +AC_DEFINE(FPX_QDR, INTEG, Chosen extension field arithmetic method.) +AC_DEFINE(FPX_CBC, INTEG, Chosen extension field arithmetic method.) +AC_DEFINE(FPX_RDC, LAZYR, Chosen extension field arithmetic method.) + +AC_DEFINE(FB_METHD, "LODAH;QUICK;QUICK;QUICK;QUICK;QUICK;EXGCD;SLIDE;QUICK", Binary field arithmetic method) +AC_DEFINE(FB_POLYN, 283, Irreducible polynomial size in bits.) +AC_DEFINE(FB_KARAT, 0, Number of Karatsuba levels.) +AC_DEFINE(FB_TRINO,, Prefer trinomials over pentanomials.) +AC_DEFINE(FB_PRECO,, Precompute multiplication table for sqrt(z).) +AC_DEFINE(FB_WIDTH, 4, Width of window processing for exponentiation methods.) +AC_DEFINE(FB_MUL, LODAH, Chosen binary field multiplication method.) +AC_DEFINE(FB_SQR, QUICK, Chosen binary field squaring method.) +AC_DEFINE(FB_RDC, QUICK, Chosen binary field modular reduction method.) +AC_DEFINE(FB_SRT, QUICK, Chosen binary field modular reduction method.) +AC_DEFINE(FB_TRC, QUICK, Chosen trace computation method.) +AC_DEFINE(FB_SLV, QUICK, Chosen method to solve a quadratic equation.) +AC_DEFINE(FB_INV, EXGCD, Chosen binary field inversion method.) +AC_DEFINE(FB_EXP, SLIDE, Chosen multiple precision modular exponentiation method.) +AC_DEFINE(FB_ITR, QUICK, Chosen method to solve a quadratic equation.) + +AC_DEFINE(EP_METHD, "PROJC;LWNAF;COMBS;INTER", Prime elliptic curve arithmetic method.) +AC_DEFINE(EP_ENDOM,, Support for prime curves with efficient endormorphisms.) +AC_DEFINE(EP_MIXED,, Use mixed coordinates.) +AC_DEFINE(EP_PRECO,, Build precomputation table for generator.) +AC_DEFINE(EP_CTMAP,, Enable isogeny map for SSWU map-to-curve.) +AC_DEFINE(EP_DEPTH, 4, Width of precomputation table for fixed point methods.) +AC_DEFINE(EP_WIDTH, 4, Width of window processing for unknown point methods.) +AC_DEFINE(EP_ADD, PROJC, Chosen prime elliptic curve coordinate method.) +AC_DEFINE(EP_MUL, LWNAF, Chosen prime elliptic curve point multiplication method.) +AC_DEFINE(EP_FIX, COMBS, Chosen prime elliptic curve point multiplication method.) +AC_DEFINE(EP_SIM, INTER, Chosen prime elliptic curve simulteanous point multiplication method.) + +AC_DEFINE(EB_METHD, "PROJC;LWNAF;COMBS;INTER", Binary elliptic curve arithmetic method.) +AC_DEFINE(EB_PLAIN,, Support for ordinary curves without endormorphisms.) +AC_DEFINE(EB_KBLTZ,, Support for Koblitz anomalous binary curves.) +AC_DEFINE(EB_MIXED,, Use mixed coordinates.) +AC_DEFINE(EB_PRECO,, Build precomputation table for generator.) +AC_DEFINE(EB_DEPTH, 4, Width of precomputation table for fixed point methods.) +AC_DEFINE(EB_WIDTH, 4, Width of window processing for unknown point methods.) +AC_DEFINE(EB_ADD, PROJC, Chosen binary elliptic curve coordinate method.) +AC_DEFINE(EB_MUL, LWNAF, Chosen binary elliptic curve point multiplication method.) +AC_DEFINE(EB_FIX, COMBS, Chosen binary elliptic curve point multiplication method.) +AC_DEFINE(EB_SIM, INTER, Chosen binary elliptic curve simulteanous point multiplication method.) + +AC_DEFINE(ED_METHD, "PROJC;LWNAF;COMBS;INTER", Edwards elliptic curve arithmetic method.) +AC_DEFINE(ED_PRECO,, Build precomputation table for generator.) +AC_DEFINE(ED_DEPTH, 4, Width of precomputation table for fixed point methods.) +AC_DEFINE(ED_WIDTH, 4, Width of window processing for unknown point methods.) +AC_DEFINE(ED_ADD, PROJC, Chosen binary elliptic curve coordinate method.) +AC_DEFINE(ED_MUL, LWNAF, Chosen prime elliptic twisted Edwards curve point multiplication method.) +AC_DEFINE(ED_FIX, COMBS, Chosen prime elliptic twisted Edwards curve point multiplication method.) +AC_DEFINE(ED_SIM, INTER, Chosen prime elliptic curve simulteanous point multiplication method.) + +AC_DEFINE(EC_METHD, "PRIME", Chosen elliptic curve cryptography method.) +AC_DEFINE(EC_CUR, PRIME, Chosen elliptic curve type.) + +AC_DEFINE(PP_METHD, "LAZYR;OATEP", Bilinear pairing method.) +AC_DEFINE(PP_EXT, LAZYR, Chosen extension field arithmetic method.) +AC_DEFINE(PP_MAP, OATEP, Chosen pairing method over prime elliptic curves.) + +AC_DEFINE(MD_METHD, "SH256", Choice of hash function.) +AC_DEFINE(MD_MAP, SH256, Chosen hash function.) + +AC_DEFINE(CP_CRT,, Support for faster CRT-based exponentiation in factoring-based cryptosystems.) +AC_DEFINE(CP_RSAPD, PKCS2, Chosen RSA padding method.) + +AC_DEFINE(ALLOC, AUTO, Chosen memory allocation policy.) +AC_DEFINE(RAND, HASHD, Chosen random generator.) +AC_DEFINE(MULTI, PTHREAD, Chosen multithreading API.) +AC_DEFINE(TIMER, CYCLE, Chosen timer.) + +dnl Check for pthread compile/link requirements +AX_PTHREAD + +AC_SEARCH_LIBS([clock_gettime],[rt]) + +if test "$TARGET_OS" != "windows"; then + dnl All windows code is PIC, forcing it on just adds useless compile warnings + AX_CHECK_COMPILE_FLAG([-fPIC], [HARDENED_FLAGS="$HARDENED_FLAGS -fPIC"], [], [[$FLAG_WERROR]]) +fi + +dnl All versions of gcc that we commonly use for building are subject to bug +dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set +dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag) +AX_CHECK_COMPILE_FLAG([-fstack-reuse=none], [HARDENED_FLAGS="$HARDENED_FLAGS -fstack-reuse=none"], [], [[$FLAG_WERROR]]) +if test "$use_hardening" != "no"; then + use_hardening=yes + AX_CHECK_COMPILE_FLAG([-Wstack-protector], [HARDENED_FLAGS="$HARDENED_FLAGS -Wstack-protector"]) + AX_CHECK_COMPILE_FLAG([-fstack-protector-all], [HARDENED_FLAGS="$HARDENED_FLAGS -fstack-protector-all"], [], [[$FLAG_WERROR]]) + + AX_CHECK_COMPILE_FLAG([-fcf-protection=full], [HARDENED_FLAGS="$HARDENED_FLAGS -fcf-protection=full"], [], [[$FLAG_WERROR]]) + + case $host in + *mingw*) + dnl stack-clash-protection doesn't currently work, and likely should just be skipped for Windows. + dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details. + ;; + *) + AX_CHECK_COMPILE_FLAG([-fstack-clash-protection], [HARDENED_FLAGS="$HARDENED_FLAGS -fstack-clash-protection"], [], [[$FLAG_WERROR]]) + ;; + esac + + case $host in + *aarch64*) + AX_CHECK_COMPILE_FLAG([-mbranch-protection=bti], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -mbranch-protection=bti"], [], [[$CXXFLAG_WERROR]]) + ;; + esac + + AX_CHECK_LINK_FLAG([-Wl,--enable-reloc-section], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--enable-reloc-section"], [], []) + AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"], [], []) + AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"], [], []) + AX_CHECK_LINK_FLAG([-Wl,--high-entropy-va], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"], [], []) + AX_CHECK_LINK_FLAG([-Wl,-z,relro], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"], [], []) + AX_CHECK_LINK_FLAG([-Wl,-z,now], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"], [], []) + AX_CHECK_LINK_FLAG([-Wl,-z,separate-code], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"], [], []) + AX_CHECK_LINK_FLAG([-fPIE -pie], [HARDENED_FLAGS="$HARDENED_FLAGS -fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"], [], []) + + case $host in + *mingw*) + AC_CHECK_LIB([ssp], [main], [], [AC_MSG_ERROR([libssp missing])]) + ;; + esac +fi + +CORE_CPPFLAGS="$CORE_CPPFLAGS -DHAVE_BUILD_INFO" + +case $host in + *mingw*) + AC_CHECK_LIB([user32], [main], [], [AC_MSG_ERROR([libuser32 missing])]) + AC_CHECK_LIB([shell32], [SHGetSpecialFolderPathW], [], [AC_MSG_ERROR([libshell32 missing])]) + AC_CHECK_LIB([advapi32], [CryptAcquireContextW], [], [AC_MSG_ERROR([libadvapi32 missing])]) + AC_CHECK_LIB([psapi], [GetProcessMemoryInfo], [], [AC_MSG_ERROR([libpsapi missing])]) + AC_CHECK_LIB([bcrypt], [main], [], [AC_MSG_ERROR([libbcrypt missing])]) + + dnl -static is interpreted by libtool, where it has a different meaning. + dnl In libtool-speak, it's -all-static. + AX_CHECK_LINK_FLAG([-static], [LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"]) + + CORE_CPPFLAGS="$CORE_CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN" + dnl Prevent the definition of min/max macros. + dnl We always want to use the standard library. + CORE_CPPFLAGS="$CORE_CPPFLAGS -DNOMINMAX" + + dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against. + dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override + dnl its command here, with the predeps/postdeps removed, and -static inserted. Postdeps are + dnl also overridden to prevent their insertion later. + dnl This should only affect dll's. + archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib" + postdeps_CXX= + + dnl We require Windows 7 (NT 6.1) or later + AX_CHECK_LINK_FLAG([-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"], [], []) + ;; + *darwin*) + AX_CHECK_LINK_FLAG([-Wl,-headerpad_max_install_names], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"], [], []) + CORE_CPPFLAGS="$CORE_CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0" + OBJCXXFLAGS="$CXXFLAGS" + ;; +esac + +dnl These flags are specific to ld64, and may cause issues with other linkers. +dnl For example: GNU ld will interpret -dead_strip as -de and then try and use +dnl "ad_strip" as the symbol for the entry point. +if test "$TARGET_OS" = "darwin"; then + AX_CHECK_LINK_FLAG([-Wl,-dead_strip], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip"], [], []) + AX_CHECK_LINK_FLAG([-Wl,-dead_strip_dylibs], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip_dylibs"], [], []) + AX_CHECK_LINK_FLAG([-Wl,-bind_at_load], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"], [], []) +fi + +dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review. +AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers], [CORE_FLAGS="$CORE_FLAGS -fno-extended-identifiers"], [], [[$FLAG_WERROR]]) + +AC_LANG_POP([C]) + +AC_MSG_CHECKING([whether to build runtest]) +if test x$use_tests = xyes; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING([whether to build runbench]) +if test x$use_bench = xyes; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"]) +AM_CONDITIONAL([TARGET_LINUX], [test "$TARGET_OS" = "linux"]) +AM_CONDITIONAL([TARGET_WINDOWS], [test "$TARGET_OS" = "windows"]) + +AM_CONDITIONAL(WITH_BN, test 1 -eq 1) +AM_CONDITIONAL(WITH_FP, test 1 -eq 1) +AM_CONDITIONAL(WITH_FPX, test 1 -eq 1) +AM_CONDITIONAL(WITH_FB, test 1 -eq 1) +AM_CONDITIONAL(WITH_EP, test 1 -eq 1) +AM_CONDITIONAL(WITH_EPX, test 1 -eq 1) +AM_CONDITIONAL(WITH_EB, test 1 -eq 1) +AM_CONDITIONAL(WITH_ED, test 1 -eq 1) +AM_CONDITIONAL(WITH_EC, test 1 -eq 1) +AM_CONDITIONAL(WITH_PP, test 1 -eq 1) +AM_CONDITIONAL(WITH_PC, test 1 -eq 1) +AM_CONDITIONAL(WITH_BC, test 1 -eq 1) +AM_CONDITIONAL(WITH_MD, test 1 -eq 1) +AM_CONDITIONAL(WITH_CP, test 1 -eq 1) +AM_CONDITIONAL(WITH_MPC, test 1 -eq 1) +AM_CONDITIONAL(WITH_DV, test 1 -eq 1) +AM_CONDITIONAL(WITH_FBX, test 1 -eq 1) + +AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" = x"yes"]) +AM_CONDITIONAL([USE_BENCH], [test x"$use_bench" = x"yes"]) +AM_CONDITIONAL([HARDEN], [test "$use_hardening" = "yes"]) +AM_CONDITIONAL([OPTIMIZE], [test "$use_optimizations" = "yes"]) + +AM_CONDITIONAL([ARITH_EASY], [test "$want_backend" = "easy"]) +AM_CONDITIONAL([ARITH_GMP], [test "$want_backend" = "gmp"]) + +AC_SUBST(CPU_ARCH) +AC_SUBST(DEBUG_FLAGS) +AC_SUBST(RAND_PATH, hashd) +AC_SUBST(RELIC_CPPFLAGS) +AC_SUBST(WARN_FLAGS) +AC_SUBST(NOWARN_FLAGS) +AC_SUBST(LIBTOOL_APP_LDFLAGS) +AC_SUBST(HARDENED_FLAGS) +AC_SUBST(HARDENED_LDFLAGS) +AC_SUBST(CORE_LDFLAGS) +AC_SUBST(CORE_CPPFLAGS) +AC_SUBST(CORE_FLAGS) + +AC_SUBST(GMP_LDFLAGS) +AC_SUBST(GMP_CPPFLAGS) +AC_SUBST(GMP_LIBS) + +AC_CONFIG_HEADERS([depends/relic/include/relic_conf.h]) +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT + +dnl Peplace conflict-prone PACKAGE-prefixed macros with DASHBLS +sed -i.old 's/PACKAGE/DASHBLS/g' depends/relic/include/relic_conf.h +sed -i.old 's/PACKAGE/DASHBLS/g' config.status + +echo +echo "Options used to compile and link:" +echo " target os = $TARGET_OS" +echo " backend = $want_backend" +echo " build bench = $use_tests" +echo " build test = $use_bench" +echo " use debug = $use_debug" +echo " use hardening = $use_hardening" +echo " use optimizations = $use_optimizations" +echo +echo " LDFLAGS = $HARDENED_LDFLAGS $CORE_LDFLAGS $GMP_LDFLAGS" +echo " CFLAGS = $DEBUG_FLAGS $HARDENED_FLAGS $CORE_FLAGS $WARN_FLAGS $NOWARN_FLAGS" +echo " CPPFLAGS = $CORE_CPPFLAGS $GMP_CPPFLAGS" +echo " CXXFLAGS = $DEBUG_FLAGS $HARDENED_FLAGS $CORE_FLAGS $WARN_FLAGS $NOWARN_FLAGS" +echo " PTHREAD_FLAGS = $PTHREAD_CFLAGS $PTHREAD_LIBS" +echo diff --git a/src/dashbls/depends/catch2/CMakeLists.txt b/src/dashbls/depends/catch2/CMakeLists.txt new file mode 100644 index 000000000000..8c26a03af581 --- /dev/null +++ b/src/dashbls/depends/catch2/CMakeLists.txt @@ -0,0 +1,37 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.14.0 FATAL_ERROR) + +set(PROJECT_NAME "catch2") + +project( + ${PROJECT_NAME} + VERSION 2.13 + LANGUAGES CXX +) + +set( + ${PROJECT_NAME}_HEADERS + catch2/catch.hpp +) + +list( + TRANSFORM ${PROJECT_NAME}_HEADERS + PREPEND "${CMAKE_CURRENT_LIST_DIR}/include/" +) + +add_library( + ${PROJECT_NAME} + INTERFACE +) + +target_sources( + ${PROJECT_NAME} + INTERFACE + "${${PROJECT_NAME}_HEADERS}" +) + +target_include_directories( + ${PROJECT_NAME} + INTERFACE + "$" + "$" +) diff --git a/src/dashbls/depends/catch2/include/catch2/catch.hpp b/src/dashbls/depends/catch2/include/catch2/catch.hpp new file mode 100644 index 000000000000..9b309bddc6bc --- /dev/null +++ b/src/dashbls/depends/catch2/include/catch2/catch.hpp @@ -0,0 +1,17976 @@ +/* + * Catch v2.13.10 + * Generated: 2022-10-16 11:01:23.452308 + * ---------------------------------------------------------- + * This file has been merged from multiple headers. Please don't edit it directly + * Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved. + * + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + */ +#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED +#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED +// start catch.hpp + + +#define CATCH_VERSION_MAJOR 2 +#define CATCH_VERSION_MINOR 13 +#define CATCH_VERSION_PATCH 10 + +#ifdef __clang__ +# pragma clang system_header +#elif defined __GNUC__ +# pragma GCC system_header +#endif + +// start catch_suppress_warnings.h + +#ifdef __clang__ +# ifdef __ICC // icpc defines the __clang__ macro +# pragma warning(push) +# pragma warning(disable: 161 1682) +# else // __ICC +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wpadded" +# pragma clang diagnostic ignored "-Wswitch-enum" +# pragma clang diagnostic ignored "-Wcovered-switch-default" +# endif +#elif defined __GNUC__ + // Because REQUIREs trigger GCC's -Wparentheses, and because still + // supported version of g++ have only buggy support for _Pragmas, + // Wparentheses have to be suppressed globally. +# pragma GCC diagnostic ignored "-Wparentheses" // See #674 for details + +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-variable" +# pragma GCC diagnostic ignored "-Wpadded" +#endif +// end catch_suppress_warnings.h +#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) +# define CATCH_IMPL +# define CATCH_CONFIG_ALL_PARTS +#endif + +// In the impl file, we want to have access to all parts of the headers +// Can also be used to sanely support PCHs +#if defined(CATCH_CONFIG_ALL_PARTS) +# define CATCH_CONFIG_EXTERNAL_INTERFACES +# if defined(CATCH_CONFIG_DISABLE_MATCHERS) +# undef CATCH_CONFIG_DISABLE_MATCHERS +# endif +# if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) +# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER +# endif +#endif + +#if !defined(CATCH_CONFIG_IMPL_ONLY) +// start catch_platform.h + +// See e.g.: +// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html +#ifdef __APPLE__ +# include +# if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \ + (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1) +# define CATCH_PLATFORM_MAC +# elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1) +# define CATCH_PLATFORM_IPHONE +# endif + +#elif defined(linux) || defined(__linux) || defined(__linux__) +# define CATCH_PLATFORM_LINUX + +#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) +# define CATCH_PLATFORM_WINDOWS +#endif + +// end catch_platform.h + +#ifdef CATCH_IMPL +# ifndef CLARA_CONFIG_MAIN +# define CLARA_CONFIG_MAIN_NOT_DEFINED +# define CLARA_CONFIG_MAIN +# endif +#endif + +// start catch_user_interfaces.h + +namespace Catch { + unsigned int rngSeed(); +} + +// end catch_user_interfaces.h +// start catch_tag_alias_autoregistrar.h + +// start catch_common.h + +// start catch_compiler_capabilities.h + +// Detect a number of compiler features - by compiler +// The following features are defined: +// +// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? +// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? +// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? +// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled? +// **************** +// Note to maintainers: if new toggles are added please document them +// in configuration.md, too +// **************** + +// In general each macro has a _NO_ form +// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. +// Many features, at point of detection, define an _INTERNAL_ macro, so they +// can be combined, en-mass, with the _NO_ forms later. + +#ifdef __cplusplus + +# if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) +# define CATCH_CPP14_OR_GREATER +# endif + +# if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) +# define CATCH_CPP17_OR_GREATER +# endif + +#endif + +// Only GCC compiler should be used in this block, so other compilers trying to +// mask themselves as GCC should be ignored. +#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" ) + +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) + +#endif + +#if defined(__clang__) + +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" ) + +// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug +// which results in calls to destructors being emitted for each temporary, +// without a matching initialization. In practice, this can result in something +// like `std::string::~string` being called on an uninitialized value. +// +// For example, this code will likely segfault under IBM XL: +// ``` +// REQUIRE(std::string("12") + "34" == "1234") +// ``` +// +// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented. +# if !defined(__ibmxl__) && !defined(__CUDACC__) +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */ +# endif + +# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ + _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") + +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) + +# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" ) + +# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" ) + +# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wunused-template\"" ) + +#endif // __clang__ + +//////////////////////////////////////////////////////////////////////////////// +// Assume that non-Windows platforms support posix signals by default +#if !defined(CATCH_PLATFORM_WINDOWS) + #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS +#endif + +//////////////////////////////////////////////////////////////////////////////// +// We know some environments not to support full POSIX signals +#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) + #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +#endif + +#ifdef __OS400__ +# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +# define CATCH_CONFIG_COLOUR_NONE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Android somehow still does not support std::to_string +#if defined(__ANDROID__) +# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING +# define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Not all Windows environments support SEH properly +#if defined(__MINGW32__) +# define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH +#endif + +//////////////////////////////////////////////////////////////////////////////// +// PS4 +#if defined(__ORBIS__) +# define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Cygwin +#ifdef __CYGWIN__ + +// Required for some versions of Cygwin to declare gettimeofday +// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin +# define _BSD_SOURCE +// some versions of cygwin (most) do not support std::to_string. Use the libstd check. +// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813 +# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ + && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) + +# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING + +# endif +#endif // __CYGWIN__ + +//////////////////////////////////////////////////////////////////////////////// +// Visual C++ +#if defined(_MSC_VER) + +// Universal Windows platform does not support SEH +// Or console colours (or console at all...) +# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) +# define CATCH_CONFIG_COLOUR_NONE +# else +# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH +# endif + +# if !defined(__clang__) // Handle Clang masquerading for msvc + +// MSVC traditional preprocessor needs some workaround for __VA_ARGS__ +// _MSVC_TRADITIONAL == 0 means new conformant preprocessor +// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor +# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) +# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +# endif // MSVC_TRADITIONAL + +// Only do this if we're not using clang on Windows, which uses `diagnostic push` & `diagnostic pop` +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) +# endif // __clang__ + +#endif // _MSC_VER + +#if defined(_REENTRANT) || defined(_MSC_VER) +// Enable async processing, as -pthread is specified or no additional linking is required +# define CATCH_INTERNAL_CONFIG_USE_ASYNC +#endif // _MSC_VER + +//////////////////////////////////////////////////////////////////////////////// +// Check if we are compiled with -fno-exceptions or equivalent +#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) +# define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED +#endif + +//////////////////////////////////////////////////////////////////////////////// +// DJGPP +#ifdef __DJGPP__ +# define CATCH_INTERNAL_CONFIG_NO_WCHAR +#endif // __DJGPP__ + +//////////////////////////////////////////////////////////////////////////////// +// Embarcadero C++Build +#if defined(__BORLANDC__) + #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN +#endif + +//////////////////////////////////////////////////////////////////////////////// + +// Use of __COUNTER__ is suppressed during code analysis in +// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly +// handled by it. +// Otherwise all supported compilers support COUNTER macro, +// but user still might want to turn it off +#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) + #define CATCH_INTERNAL_CONFIG_COUNTER +#endif + +//////////////////////////////////////////////////////////////////////////////// + +// RTX is a special version of Windows that is real time. +// This means that it is detected as Windows, but does not provide +// the same set of capabilities as real Windows does. +#if defined(UNDER_RTSS) || defined(RTX64_BUILD) + #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH + #define CATCH_INTERNAL_CONFIG_NO_ASYNC + #define CATCH_CONFIG_COLOUR_NONE +#endif + +#if !defined(_GLIBCXX_USE_C99_MATH_TR1) +#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER +#endif + +// Various stdlib support checks that require __has_include +#if defined(__has_include) + // Check if string_view is available and usable + #if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW + #endif + + // Check if optional is available and usable + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) + + // Check if byte is available and usable + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # include + # if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0) + # define CATCH_INTERNAL_CONFIG_CPP17_BYTE + # endif + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) + + // Check if variant is available and usable + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # if defined(__clang__) && (__clang_major__ < 8) + // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852 + // fix should be in clang 8, workaround in libstdc++ 8.2 + # include + # if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) + # define CATCH_CONFIG_NO_CPP17_VARIANT + # else + # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT + # endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) + # else + # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT + # endif // defined(__clang__) && (__clang_major__ < 8) + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) +#endif // defined(__has_include) + +#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) +# define CATCH_CONFIG_COUNTER +#endif +#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH) +# define CATCH_CONFIG_WINDOWS_SEH +#endif +// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. +#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) +# define CATCH_CONFIG_POSIX_SIGNALS +#endif +// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions. +#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR) +# define CATCH_CONFIG_WCHAR +#endif + +#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) +# define CATCH_CONFIG_CPP11_TO_STRING +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL) +# define CATCH_CONFIG_CPP17_OPTIONAL +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) +# define CATCH_CONFIG_CPP17_STRING_VIEW +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT) +# define CATCH_CONFIG_CPP17_VARIANT +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE) +# define CATCH_CONFIG_CPP17_BYTE +#endif + +#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) +# define CATCH_INTERNAL_CONFIG_NEW_CAPTURE +#endif + +#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE) +# define CATCH_CONFIG_NEW_CAPTURE +#endif + +#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +# define CATCH_CONFIG_DISABLE_EXCEPTIONS +#endif + +#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN) +# define CATCH_CONFIG_POLYFILL_ISNAN +#endif + +#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC) && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC) +# define CATCH_CONFIG_USE_ASYNC +#endif + +#if defined(CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_NO_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_ANDROID_LOGWRITE) +# define CATCH_CONFIG_ANDROID_LOGWRITE +#endif + +#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) +# define CATCH_CONFIG_GLOBAL_NEXTAFTER +#endif + +// Even if we do not think the compiler has that warning, we still have +// to provide a macro that can be used by the code. +#if !defined(CATCH_INTERNAL_START_WARNINGS_SUPPRESSION) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION +#endif +#if !defined(CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS +#endif + +// The goal of this macro is to avoid evaluation of the arguments, but +// still have the compiler warn on problems inside... +#if !defined(CATCH_INTERNAL_IGNORE_BUT_WARN) +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) +#endif + +#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10) +# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#elif defined(__clang__) && (__clang_major__ < 5) +# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#endif + +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#endif + +#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +#define CATCH_TRY if ((true)) +#define CATCH_CATCH_ALL if ((false)) +#define CATCH_CATCH_ANON(type) if ((false)) +#else +#define CATCH_TRY try +#define CATCH_CATCH_ALL catch (...) +#define CATCH_CATCH_ANON(type) catch (type) +#endif + +#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) +#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#endif + +// end catch_compiler_capabilities.h +#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line +#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) +#ifdef CATCH_CONFIG_COUNTER +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) +#else +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) +#endif + +#include +#include +#include + +// We need a dummy global operator<< so we can bring it into Catch namespace later +struct Catch_global_namespace_dummy {}; +std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); + +namespace Catch { + + struct CaseSensitive { enum Choice { + Yes, + No + }; }; + + class NonCopyable { + NonCopyable( NonCopyable const& ) = delete; + NonCopyable( NonCopyable && ) = delete; + NonCopyable& operator = ( NonCopyable const& ) = delete; + NonCopyable& operator = ( NonCopyable && ) = delete; + + protected: + NonCopyable(); + virtual ~NonCopyable(); + }; + + struct SourceLineInfo { + + SourceLineInfo() = delete; + SourceLineInfo( char const* _file, std::size_t _line ) noexcept + : file( _file ), + line( _line ) + {} + + SourceLineInfo( SourceLineInfo const& other ) = default; + SourceLineInfo& operator = ( SourceLineInfo const& ) = default; + SourceLineInfo( SourceLineInfo&& ) noexcept = default; + SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default; + + bool empty() const noexcept { return file[0] == '\0'; } + bool operator == ( SourceLineInfo const& other ) const noexcept; + bool operator < ( SourceLineInfo const& other ) const noexcept; + + char const* file; + std::size_t line; + }; + + std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); + + // Bring in operator<< from global namespace into Catch namespace + // This is necessary because the overload of operator<< above makes + // lookup stop at namespace Catch + using ::operator<<; + + // Use this in variadic streaming macros to allow + // >> +StreamEndStop + // as well as + // >> stuff +StreamEndStop + struct StreamEndStop { + std::string operator+() const; + }; + template + T const& operator + ( T const& value, StreamEndStop ) { + return value; + } +} + +#define CATCH_INTERNAL_LINEINFO \ + ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) + +// end catch_common.h +namespace Catch { + + struct RegistrarForTagAliases { + RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); + }; + +} // end namespace Catch + +#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +// end catch_tag_alias_autoregistrar.h +// start catch_test_registry.h + +// start catch_interfaces_testcase.h + +#include + +namespace Catch { + + class TestSpec; + + struct ITestInvoker { + virtual void invoke () const = 0; + virtual ~ITestInvoker(); + }; + + class TestCase; + struct IConfig; + + struct ITestCaseRegistry { + virtual ~ITestCaseRegistry(); + virtual std::vector const& getAllTests() const = 0; + virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; + }; + + bool isThrowSafe( TestCase const& testCase, IConfig const& config ); + bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); + std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); + std::vector const& getAllTestCasesSorted( IConfig const& config ); + +} + +// end catch_interfaces_testcase.h +// start catch_stringref.h + +#include +#include +#include +#include + +namespace Catch { + + /// A non-owning string class (similar to the forthcoming std::string_view) + /// Note that, because a StringRef may be a substring of another string, + /// it may not be null terminated. + class StringRef { + public: + using size_type = std::size_t; + using const_iterator = const char*; + + private: + static constexpr char const* const s_empty = ""; + + char const* m_start = s_empty; + size_type m_size = 0; + + public: // construction + constexpr StringRef() noexcept = default; + + StringRef( char const* rawChars ) noexcept; + + constexpr StringRef( char const* rawChars, size_type size ) noexcept + : m_start( rawChars ), + m_size( size ) + {} + + StringRef( std::string const& stdString ) noexcept + : m_start( stdString.c_str() ), + m_size( stdString.size() ) + {} + + explicit operator std::string() const { + return std::string(m_start, m_size); + } + + public: // operators + auto operator == ( StringRef const& other ) const noexcept -> bool; + auto operator != (StringRef const& other) const noexcept -> bool { + return !(*this == other); + } + + auto operator[] ( size_type index ) const noexcept -> char { + assert(index < m_size); + return m_start[index]; + } + + public: // named queries + constexpr auto empty() const noexcept -> bool { + return m_size == 0; + } + constexpr auto size() const noexcept -> size_type { + return m_size; + } + + // Returns the current start pointer. If the StringRef is not + // null-terminated, throws std::domain_exception + auto c_str() const -> char const*; + + public: // substrings and searches + // Returns a substring of [start, start + length). + // If start + length > size(), then the substring is [start, size()). + // If start > size(), then the substring is empty. + auto substr( size_type start, size_type length ) const noexcept -> StringRef; + + // Returns the current start pointer. May not be null-terminated. + auto data() const noexcept -> char const*; + + constexpr auto isNullTerminated() const noexcept -> bool { + return m_start[m_size] == '\0'; + } + + public: // iterators + constexpr const_iterator begin() const { return m_start; } + constexpr const_iterator end() const { return m_start + m_size; } + }; + + auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&; + auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&; + + constexpr auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { + return StringRef( rawChars, size ); + } +} // namespace Catch + +constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { + return Catch::StringRef( rawChars, size ); +} + +// end catch_stringref.h +// start catch_preprocessor.hpp + + +#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ +#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__))) + +#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__ +// MSVC needs more evaluations +#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__))) +#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__)) +#else +#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL5(__VA_ARGS__) +#endif + +#define CATCH_REC_END(...) +#define CATCH_REC_OUT + +#define CATCH_EMPTY() +#define CATCH_DEFER(id) id CATCH_EMPTY() + +#define CATCH_REC_GET_END2() 0, CATCH_REC_END +#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2 +#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1 +#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT +#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0) +#define CATCH_REC_NEXT(test, next) CATCH_REC_NEXT1(CATCH_REC_GET_END test, next) + +#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST2(f, x, peek, ...) f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) + +#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...) f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) + +// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results, +// and passes userdata as the first parameter to each invocation, +// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c) +#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + +#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + +#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param) +#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__ +#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__ +#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF +#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__) +#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__ +#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) +#else +// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF +#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__) +#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__ +#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1) +#endif + +#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__ +#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name) + +#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__) + +#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper()) +#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)) +#else +#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper())) +#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))) +#endif + +#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\ + CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__) + +#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0) +#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1) +#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2) +#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) +#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) +#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) +#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6) +#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) +#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) +#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) +#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) + +#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N + +#define INTERNAL_CATCH_TYPE_GEN\ + template struct TypeList {};\ + template\ + constexpr auto get_wrapper() noexcept -> TypeList { return {}; }\ + template class...> struct TemplateTypeList{};\ + template class...Cs>\ + constexpr auto get_wrapper() noexcept -> TemplateTypeList { return {}; }\ + template\ + struct append;\ + template\ + struct rewrap;\ + template class, typename...>\ + struct create;\ + template class, typename>\ + struct convert;\ + \ + template \ + struct append { using type = T; };\ + template< template class L1, typename...E1, template class L2, typename...E2, typename...Rest>\ + struct append, L2, Rest...> { using type = typename append, Rest...>::type; };\ + template< template class L1, typename...E1, typename...Rest>\ + struct append, TypeList, Rest...> { using type = L1; };\ + \ + template< template class Container, template class List, typename...elems>\ + struct rewrap, List> { using type = TypeList>; };\ + template< template class Container, template class List, class...Elems, typename...Elements>\ + struct rewrap, List, Elements...> { using type = typename append>, typename rewrap, Elements...>::type>::type; };\ + \ + template