Skip to content

Commit e48d932

Browse files
authored
Remove problem pr1224 (#1226)
* Revert "port veil changes using std::mutex instead of c-style pthread" This reverts commit 4c605b6. * Revert "force posix" This reverts commit eb7a25a. * Revert "add trial workflow for x86_64-w64-mingw32" This reverts commit 9433d3d. * Revert "patch qt with bitcoin pr#22186" This reverts commit 9aa1b3e. * Revert "revert libzmq 4.3.4 -> 4.3.1 (introduced on c8197cd)" This reverts commit d2e39c0. * Revert "update path with working url for qt" This reverts commit dbb4b9f. * Revert "patch boost for ifdef pthread" This reverts commit f760f3a. * Update URL for qt-5.12.11
1 parent a44372a commit e48d932

10 files changed

Lines changed: 21 additions & 164 deletions

File tree

.github/workflows/ravencoin-cross.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

configure.ac

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,9 @@ AC_ARG_WITH([tx],
313313

314314
AC_ARG_WITH([libs],
315315
[AS_HELP_STRING([--with-libs],
316-
[build libraries (default=no)])],
316+
[build libraries (default=yes)])],
317317
[build_raven_libs=$withval],
318-
[build_raven_libs=no])
318+
[build_raven_libs=yes])
319319

320320
AC_ARG_WITH([daemon],
321321
[AS_HELP_STRING([--with-daemon],
@@ -673,28 +673,6 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
673673
]
674674
)
675675

676-
TEMP_LDFLAGS="$LDFLAGS"
677-
LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS"
678-
AC_MSG_CHECKING([for thread_local support])
679-
AC_LINK_IFELSE([AC_LANG_SOURCE([
680-
#include <thread>
681-
static thread_local int foo = 0;
682-
static void run_thread() { foo++;}
683-
int main(){
684-
for(int i = 0; i < 10; i++) { std::thread(run_thread).detach();}
685-
return foo;
686-
}
687-
])],
688-
[
689-
AC_DEFINE(HAVE_THREAD_LOCAL,1,[Define if thread_local is supported.])
690-
AC_MSG_RESULT(yes)
691-
],
692-
[
693-
AC_MSG_RESULT(no)
694-
]
695-
)
696-
LDFLAGS="$TEMP_LDFLAGS"
697-
698676
# Check for different ways of gathering OS randomness
699677
AC_MSG_CHECKING(for Linux getrandom syscall)
700678
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>

depends/packages/boost.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(su
44
$(package)_file_name=boost_$($(package)_version).tar.bz2
55
$(package)_sha256_hash=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
66
$(package)_dependencies=native_b2
7-
$(package)_patches=commit-74fb0a2.patch
87

98
define $(package)_set_vars
109
$(package)_config_opts_release=variant=release
@@ -30,7 +29,6 @@ $(package)_cxxflags_android=-fPIC
3029
endef
3130

3231
define $(package)_preprocess_cmds
33-
patch -p2 -i $($(package)_patch_dir)/commit-74fb0a2.patch && \
3432
echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : <cflags>\"$($(package)_cflags)\" <cxxflags>\"$($(package)_cxxflags)\" <compileflags>\"$($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$($(package)_ar)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
3533
endef
3634

depends/packages/qt.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
PACKAGE=qt
22
$(package)_version=5.12.11
3-
$(package)_download_path=https://master.qt.io/archive/qt/5.12/$($(package)_version)/submodules
3+
#$(package)_download_path=https://download.qt.io/official_releases/qt/5.12/$($(package)_version)/submodules
4+
$(package)_download_path=https://download.qt.io/archive/qt/5.12/$($(package)_version)/submodules
45
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
56
$(package)_file_name=qtbase-$($(package)_suffix)
67
$(package)_sha256_hash=1c1b4e33137ca77881074c140d54c3c9747e845a31338cfe8680f171f0bc3a39
@@ -11,7 +12,7 @@ $(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no
1112
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
1213
$(package)_patches+= drop_lrelease_dependency.patch no_sdk_version_check.patch
1314
$(package)_patches+= fix_lib_paths.patch fix_android_pch.patch
14-
$(package)_patches+= qtbase-moc-ignore-gcc-macro.patch fix_limits_header.patch
15+
$(package)_patches+= qtbase-moc-ignore-gcc-macro.patch
1516

1617
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
1718
$(package)_qttranslations_sha256_hash=577b0668a777eb2b451c61e8d026d79285371597ce9df06b6dee6c814164b7c3
@@ -230,7 +231,6 @@ define $(package)_preprocess_cmds
230231
patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.patch && \
231232
patch -p1 -i $($(package)_patch_dir)/fix_lib_paths.patch && \
232233
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
233-
patch -p1 -i $($(package)_patch_dir)/fix_limits_header.patch && \
234234
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
235235
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
236236
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\

depends/packages/zeromq.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package=zeromq
2-
$(package)_version=4.3.1
2+
$(package)_version=4.3.4
33
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
44
$(package)_file_name=$(package)-$($(package)_version).tar.gz
5-
$(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb
5+
$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5
66
$(package)_patches=remove_libstd_link.patch
77

88
define $(package)_set_vars

depends/patches/boost/commit-74fb0a2.patch

Lines changed: 0 additions & 19 deletions
This file was deleted.

depends/patches/qt/fix_limits_header.patch

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/Makefile.am

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55

66
DIST_SUBDIRS = secp256k1 univalue
77

8-
AM_LDFLAGS = $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS)
9-
AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS)
10-
AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS)
11-
AM_LIBTOOLFLAGS = --preserve-dup-deps
12-
PTHREAD_FLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
8+
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS)
9+
AM_CXXFLAGS = $(HARDENED_CXXFLAGS) $(ERROR_CXXFLAGS)
10+
AM_CPPFLAGS = $(HARDENED_CPPFLAGS)
1311
EXTRA_LIBRARIES =
1412

1513
if EMBEDDED_UNIVALUE
@@ -481,7 +479,7 @@ nodist_libraven_util_a_SOURCES = $(srcdir)/obj/build.h
481479
ravend_SOURCES = ravend.cpp
482480
ravend_CPPFLAGS = $(AM_CPPFLAGS) $(RAVEN_INCLUDES)
483481
ravend_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
484-
ravend_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
482+
ravend_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
485483

486484
if TARGET_WINDOWS
487485
ravend_SOURCES += ravend-res.rc
@@ -507,7 +505,7 @@ ravend_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC
507505
raven_cli_SOURCES = raven-cli.cpp
508506
raven_cli_CPPFLAGS = $(AM_CPPFLAGS) $(RAVEN_INCLUDES) $(EVENT_CFLAGS)
509507
raven_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
510-
raven_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
508+
raven_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
511509

512510
if TARGET_WINDOWS
513511
raven_cli_SOURCES += raven-cli-res.rc
@@ -526,7 +524,7 @@ raven_cli_LDADD += $(BOOST_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(EVENT_LIBS)
526524
raven_tx_SOURCES = raven-tx.cpp
527525
raven_tx_CPPFLAGS = $(AM_CPPFLAGS) $(RAVEN_INCLUDES)
528526
raven_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
529-
raven_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
527+
raven_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
530528

531529
if TARGET_WINDOWS
532530
raven_tx_SOURCES += raven-tx-res.rc

src/crypto/ethash/lib/ethash/managed.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// Licensed under the Apache License, Version 2.0.
44

55
#include "crypto/ethash/lib/ethash/ethash-internal.hpp"
6+
#include "sync.h"
67

78
#include <memory>
8-
#include <mutex>
99

1010
#if !defined(__has_cpp_attribute)
1111
#define __has_cpp_attribute(x) 0
@@ -23,11 +23,12 @@ using namespace ethash;
2323

2424
namespace
2525
{
26-
std::mutex shared_context_mutex;
26+
27+
CCriticalSection shared_context_cs;
2728
std::shared_ptr<epoch_context> shared_context;
2829
thread_local std::shared_ptr<epoch_context> thread_local_context;
2930

30-
std::mutex shared_context_full_mutex;
31+
CCriticalSection shared_context_full_cs;
3132
std::shared_ptr<epoch_context_full> shared_context_full;
3233
thread_local std::shared_ptr<epoch_context_full> thread_local_context_full;
3334

@@ -44,7 +45,7 @@ void update_local_context(int epoch_number)
4445
thread_local_context.reset();
4546

4647
// Local context invalid, check the shared context.
47-
std::lock_guard<std::mutex> lock{shared_context_mutex};
48+
LOCK(shared_context_cs);
4849

4950
if (!shared_context || shared_context->epoch_number != epoch_number)
5051
{
@@ -65,7 +66,7 @@ void update_local_context_full(int epoch_number)
6566
thread_local_context_full.reset();
6667

6768
// Local context invalid, check the shared context.
68-
std::lock_guard<std::mutex> lock{shared_context_full_mutex};
69+
LOCK(shared_context_full_cs);
6970

7071
if (!shared_context_full || shared_context_full->epoch_number != epoch_number)
7172
{

src/crypto/ethash/lib/keccak/keccak.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#define __BYTE_ORDER __LITTLE_ENDIAN
2020
#elif __APPLE__
2121
#include <machine/endian.h>
22+
#elif __FreeBSD__
23+
#include <sys/endian.h>
2224
#else
2325
#include <endian.h>
2426
#endif

0 commit comments

Comments
 (0)