Skip to content

Commit

Permalink
Remove problem pr1224 (#1226)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
hans-schmidt authored Mar 12, 2023
1 parent a44372a commit e48d932
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 164 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/ravencoin-cross.yml

This file was deleted.

26 changes: 2 additions & 24 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ AC_ARG_WITH([tx],

AC_ARG_WITH([libs],
[AS_HELP_STRING([--with-libs],
[build libraries (default=no)])],
[build libraries (default=yes)])],
[build_raven_libs=$withval],
[build_raven_libs=no])
[build_raven_libs=yes])

AC_ARG_WITH([daemon],
[AS_HELP_STRING([--with-daemon],
Expand Down Expand Up @@ -673,28 +673,6 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
]
)

TEMP_LDFLAGS="$LDFLAGS"
LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS"
AC_MSG_CHECKING([for thread_local support])
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <thread>
static thread_local int foo = 0;
static void run_thread() { foo++;}
int main(){
for(int i = 0; i < 10; i++) { std::thread(run_thread).detach();}
return foo;
}
])],
[
AC_DEFINE(HAVE_THREAD_LOCAL,1,[Define if thread_local is supported.])
AC_MSG_RESULT(yes)
],
[
AC_MSG_RESULT(no)
]
)
LDFLAGS="$TEMP_LDFLAGS"

# Check for different ways of gathering OS randomness
AC_MSG_CHECKING(for Linux getrandom syscall)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
Expand Down
2 changes: 0 additions & 2 deletions depends/packages/boost.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(su
$(package)_file_name=boost_$($(package)_version).tar.bz2
$(package)_sha256_hash=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
$(package)_dependencies=native_b2
$(package)_patches=commit-74fb0a2.patch

define $(package)_set_vars
$(package)_config_opts_release=variant=release
Expand All @@ -30,7 +29,6 @@ $(package)_cxxflags_android=-fPIC
endef

define $(package)_preprocess_cmds
patch -p2 -i $($(package)_patch_dir)/commit-74fb0a2.patch && \
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
endef

Expand Down
6 changes: 3 additions & 3 deletions depends/packages/qt.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PACKAGE=qt
$(package)_version=5.12.11
$(package)_download_path=https://master.qt.io/archive/qt/5.12/$($(package)_version)/submodules
#$(package)_download_path=https://download.qt.io/official_releases/qt/5.12/$($(package)_version)/submodules
$(package)_download_path=https://download.qt.io/archive/qt/5.12/$($(package)_version)/submodules
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=1c1b4e33137ca77881074c140d54c3c9747e845a31338cfe8680f171f0bc3a39
Expand All @@ -11,7 +12,7 @@ $(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
$(package)_patches+= drop_lrelease_dependency.patch no_sdk_version_check.patch
$(package)_patches+= fix_lib_paths.patch fix_android_pch.patch
$(package)_patches+= qtbase-moc-ignore-gcc-macro.patch fix_limits_header.patch
$(package)_patches+= qtbase-moc-ignore-gcc-macro.patch

$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=577b0668a777eb2b451c61e8d026d79285371597ce9df06b6dee6c814164b7c3
Expand Down Expand Up @@ -230,7 +231,6 @@ define $(package)_preprocess_cmds
patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_lib_paths.patch && \
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.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 && \
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
Expand Down
4 changes: 2 additions & 2 deletions depends/packages/zeromq.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package=zeromq
$(package)_version=4.3.1
$(package)_version=4.3.4
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb
$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5
$(package)_patches=remove_libstd_link.patch

define $(package)_set_vars
Expand Down
19 changes: 0 additions & 19 deletions depends/patches/boost/commit-74fb0a2.patch

This file was deleted.

44 changes: 0 additions & 44 deletions depends/patches/qt/fix_limits_header.patch

This file was deleted.

14 changes: 6 additions & 8 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@

DIST_SUBDIRS = secp256k1 univalue

AM_LDFLAGS = $(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
PTHREAD_FLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS)
AM_CXXFLAGS = $(HARDENED_CXXFLAGS) $(ERROR_CXXFLAGS)
AM_CPPFLAGS = $(HARDENED_CPPFLAGS)
EXTRA_LIBRARIES =

if EMBEDDED_UNIVALUE
Expand Down Expand Up @@ -481,7 +479,7 @@ nodist_libraven_util_a_SOURCES = $(srcdir)/obj/build.h
ravend_SOURCES = ravend.cpp
ravend_CPPFLAGS = $(AM_CPPFLAGS) $(RAVEN_INCLUDES)
ravend_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
ravend_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
ravend_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)

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

if TARGET_WINDOWS
raven_cli_SOURCES += raven-cli-res.rc
Expand All @@ -526,7 +524,7 @@ raven_cli_LDADD += $(BOOST_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(EVENT_LIBS)
raven_tx_SOURCES = raven-tx.cpp
raven_tx_CPPFLAGS = $(AM_CPPFLAGS) $(RAVEN_INCLUDES)
raven_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
raven_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
raven_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)

if TARGET_WINDOWS
raven_tx_SOURCES += raven-tx-res.rc
Expand Down
11 changes: 6 additions & 5 deletions src/crypto/ethash/lib/ethash/managed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Licensed under the Apache License, Version 2.0.

#include "crypto/ethash/lib/ethash/ethash-internal.hpp"
#include "sync.h"

#include <memory>
#include <mutex>

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

namespace
{
std::mutex shared_context_mutex;

CCriticalSection shared_context_cs;
std::shared_ptr<epoch_context> shared_context;
thread_local std::shared_ptr<epoch_context> thread_local_context;

std::mutex shared_context_full_mutex;
CCriticalSection shared_context_full_cs;
std::shared_ptr<epoch_context_full> shared_context_full;
thread_local std::shared_ptr<epoch_context_full> thread_local_context_full;

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

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

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

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

if (!shared_context_full || shared_context_full->epoch_number != epoch_number)
{
Expand Down
2 changes: 2 additions & 0 deletions src/crypto/ethash/lib/keccak/keccak.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#define __BYTE_ORDER __LITTLE_ENDIAN
#elif __APPLE__
#include <machine/endian.h>
#elif __FreeBSD__
#include <sys/endian.h>
#else
#include <endian.h>
#endif
Expand Down

0 comments on commit e48d932

Please sign in to comment.