Skip to content

Commit 666fa51

Browse files

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+580
-417
lines changed

build-aux/m4/bitcoin_qt.m4

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ AC_DEFUN([BITCOIN_QT_INIT],[
6767
AS_IF([test "x$with_gui" = xqt5_debug],
6868
[AS_CASE([$host],
6969
[*darwin*], [qt_lib_suffix=_debug],
70-
[*mingw*], [qt_lib_suffix=d],
7170
[qt_lib_suffix= ]); bitcoin_qt_want_version=qt5],
7271
[qt_lib_suffix= ])
7372
73+
AS_CASE([$host], [*android*], [qt_lib_suffix=_$ANDROID_ARCH])
74+
7475
AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], [])
7576
AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], [])
7677
AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], [])
@@ -148,8 +149,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
148149
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QWindowsIntegrationPlugin], [-lqwindows])
149150
AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
150151
elif test "x$TARGET_OS" = xlinux; then
151-
dnl workaround for https://bugreports.qt.io/browse/QTBUG-74874
152-
AX_CHECK_LINK_FLAG([-lxcb-shm], [QT_LIBS="$QT_LIBS -lxcb-shm"], [AC_MSG_ERROR([could not link against -lxcb-shm])])
153152
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QXcbIntegrationPlugin], [-lqxcb])
154153
AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
155154
elif test "x$TARGET_OS" = xdarwin; then
@@ -161,7 +160,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
161160
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle])
162161
AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
163162
elif test "x$TARGET_OS" = xandroid; then
164-
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lqtforandroid -ljnigraphics -landroid -lqtfreetype $QT_LIBS"
163+
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid${qt_lib_suffix} -ljnigraphics -landroid -lqtfreetype${qt_lib_suffix} $QT_LIBS"
165164
AC_DEFINE(QT_QPA_PLATFORM_ANDROID, 1, [Define this symbol if the qt platform is android])
166165
fi
167166
fi
@@ -367,14 +366,16 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [
367366
PKG_CHECK_MODULES([QT_INPUT], [${qt_lib_prefix}InputSupport], [QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"])
368367
PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
369368
PKG_CHECK_MODULES([QT_XCBQPA], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"])
369+
PKG_CHECK_MODULES([QT_XKBCOMMON], [${qt_lib_prefix}XkbCommonSupport], [QT_LIBS="$QT_XKBCOMMON_LIBS $QT_LIBS"])
370370
elif test "x$TARGET_OS" = xdarwin; then
371371
PKG_CHECK_MODULES([QT_CLIPBOARD], [${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}], [QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"])
372372
PKG_CHECK_MODULES([QT_GRAPHICS], [${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}], [QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"])
373373
PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
374374
elif test "x$TARGET_OS" = xwindows; then
375375
PKG_CHECK_MODULES([QT_WINDOWSUIAUTOMATION], [${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"])
376376
elif test "x$TARGET_OS" = xandroid; then
377-
PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"])
377+
PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport${qt_lib_suffix}], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"])
378+
PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
378379
fi
379380
])
380381

configure.ac

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,30 @@ AC_ARG_ENABLE([werror],
322322
[enable_werror=no])
323323

324324
AC_LANG_PUSH([C++])
325+
326+
dnl Check for a flag to turn compiler warnings into errors. This is helpful for checks which may
327+
dnl appear to succeed because by default they merely emit warnings when they fail.
328+
dnl
329+
dnl Note that this is not necessarily a check to see if -Werror is supported, but rather to see if
330+
dnl a compile with -Werror can succeed. This is important because the compiler may already be
331+
dnl warning about something unrelated, for example about some path issue. If that is the case,
332+
dnl -Werror cannot be used because all of those warnings would be turned into errors.
325333
AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""])
326334

335+
dnl Check for a flag to turn linker warnings into errors. When flags are passed to linkers via the
336+
dnl compiler driver using a -Wl,-foo flag, linker warnings may be swallowed rather than bubbling up.
337+
dnl See note above, the same applies here as well.
338+
dnl
339+
dnl LDFLAG_WERROR Should only be used when testing -Wl,*
340+
case $host in
341+
*darwin*)
342+
AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings],[LDFLAG_WERROR="-Wl,-fatal_warnings"],[LDFLAG_WERROR=""])
343+
;;
344+
*)
345+
AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings],[LDFLAG_WERROR="-Wl,--fatal-warnings"],[LDFLAG_WERROR=""])
346+
;;
347+
esac
348+
327349
if test "x$enable_debug" = xyes; then
328350
dnl Clear default -g -O2 flags
329351
if test "x$CXXFLAGS_overridden" = xno; then
@@ -762,7 +784,7 @@ case $host in
762784
esac
763785
fi
764786

765-
AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"])
787+
AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"],, [[$LDFLAG_WERROR]])
766788
CPPFLAGS="$CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
767789
OBJCXXFLAGS="$CXXFLAGS"
768790
;;
@@ -917,12 +939,12 @@ if test x$use_hardening != xno; then
917939
fi
918940

919941
AX_CHECK_LINK_FLAG([[-Wl,--enable-reloc-section]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--enable-reloc-section"],, [[$LDFLAG_WERROR]])
920-
AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"])
921-
AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"])
922-
AX_CHECK_LINK_FLAG([[-Wl,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"])
923-
AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"])
924-
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"])
925-
AX_CHECK_LINK_FLAG([[-Wl,-z,separate-code]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"])
942+
AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"],, [[$LDFLAG_WERROR]])
943+
AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"],, [[$LDFLAG_WERROR]])
944+
AX_CHECK_LINK_FLAG([[-Wl,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"],, [[$LDFLAG_WERROR]])
945+
AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"],, [[$LDFLAG_WERROR]])
946+
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"],, [[$LDFLAG_WERROR]])
947+
AX_CHECK_LINK_FLAG([[-Wl,-z,separate-code]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"],, [[$LDFLAG_WERROR]])
926948
AX_CHECK_LINK_FLAG([[-fPIE -pie]], [PIE_FLAGS="-fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],, [[$CXXFLAG_WERROR]])
927949

928950
case $host in
@@ -936,14 +958,14 @@ dnl These flags are specific to ld64, and may cause issues with other linkers.
936958
dnl For example: GNU ld will interpret -dead_strip as -de and then try and use
937959
dnl "ad_strip" as the symbol for the entry point.
938960
if test x$TARGET_OS = xdarwin; then
939-
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
940-
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"])
941-
AX_CHECK_LINK_FLAG([[-Wl,-bind_at_load]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"])
961+
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"],, [[$LDFLAG_WERROR]])
962+
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"],, [[$LDFLAG_WERROR]])
963+
AX_CHECK_LINK_FLAG([[-Wl,-bind_at_load]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"],, [[$LDFLAG_WERROR]])
942964
fi
943965

944966
if test x$enable_determinism = xyes; then
945967
if test x$TARGET_OS = xwindows; then
946-
AX_CHECK_LINK_FLAG([[-Wl,--no-insert-timestamp]], [LDFLAGS="$LDFLAGS -Wl,--no-insert-timestamp"])
968+
AX_CHECK_LINK_FLAG([[-Wl,--no-insert-timestamp]], [LDFLAGS="$LDFLAGS -Wl,--no-insert-timestamp"],, [[$LDFLAG_WERROR]])
947969
fi
948970
fi
949971

@@ -1289,7 +1311,7 @@ else
12891311
BITCOIN_QT_INIT
12901312

12911313
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
1292-
BITCOIN_QT_CONFIGURE([5.5.1])
1314+
BITCOIN_QT_CONFIGURE([5.11.3])
12931315

12941316
dnl Keep a copy of the original $QT_INCLUDES and use it when invoking qt's moc
12951317
QT_INCLUDES_UNSUPPRESSED=$QT_INCLUDES
@@ -1405,7 +1427,7 @@ fi
14051427

14061428
if test x$use_reduce_exports = xyes; then
14071429
CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS"
1408-
AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"])
1430+
AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"],, [[$LDFLAG_WERROR]])
14091431
fi
14101432

14111433
if test x$use_tests = xyes; then

contrib/containers/ci/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,20 @@ RUN apt-get update && apt-get install $APT_ARGS \
2828
git \
2929
g++ \
3030
gettext \
31+
libtool \
32+
libxcb-icccm4 \
33+
libxcb-image0 \
34+
libxcb-keysyms1 \
35+
libxcb-randr0 \
36+
libxcb-render-util0 \
37+
libxcb-shape0 \
38+
libxcb-sync1 \
39+
libxcb-xfixes0 \
40+
libxcb-xinerama0 \
41+
libxcb-xkb1 \
42+
libxkbcommon-x11-0 \
3143
wget \
3244
unzip \
33-
libtool \
3445
m4 \
3546
pkg-config \
3647
zlib1g-dev

contrib/devtools/symbol-check.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,19 @@
9999
'libxkbcommon-x11.so.0', # keyboard keymapping
100100
'libfontconfig.so.1', # font support
101101
'libfreetype.so.6', # font parsing
102-
'libdl.so.2' # programming interface to dynamic linker
102+
'libdl.so.2', # programming interface to dynamic linker
103+
'libxcb-icccm.so.4',
104+
'libxcb-image.so.0',
105+
'libxcb-shm.so.0',
106+
'libxcb-keysyms.so.1',
107+
'libxcb-randr.so.0',
108+
'libxcb-render-util.so.0',
109+
'libxcb-render.so.0',
110+
'libxcb-shape.so.0',
111+
'libxcb-sync.so.1',
112+
'libxcb-xfixes.so.0',
113+
'libxcb-xinerama.so.0',
114+
'libxcb-xkb.so.1',
103115
}
104116

105117
MACHO_ALLOWED_LIBRARIES = {
@@ -110,6 +122,7 @@
110122
'AppKit', # user interface
111123
'ApplicationServices', # common application tasks.
112124
'Carbon', # deprecated c back-compat API
125+
'ColorSync',
113126
'CoreFoundation', # low level func, data types
114127
'CoreGraphics', # 2D rendering
115128
'CoreServices', # operating system services

contrib/guix/manifest.scm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
(gnu packages llvm)
2121
(gnu packages mingw)
2222
(gnu packages moreutils)
23-
(gnu packages perl)
2423
(gnu packages pkg-config)
2524
(gnu packages python)
2625
(gnu packages python-crypto)
@@ -598,7 +597,6 @@ parse, modify and abstract ELF, PE and MachO formats.")
598597
gcc-toolchain-10
599598
(list gcc-toolchain-10 "static")
600599
;; Scripting
601-
perl
602600
python-minimal ;; (3.9)
603601
;; Git
604602
git

depends/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ build_vendor=$(word 2,$(subst -, ,$(build)))
7171
full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build))
7272
build_os:=$(findstring linux,$(full_build_os))
7373
build_os+=$(findstring darwin,$(full_build_os))
74+
build_os+=$(findstring freebsd,$(full_build_os))
75+
build_os+=$(findstring openbsd,$(full_build_os))
7476
build_os:=$(strip $(build_os))
7577
ifeq ($(build_os),)
7678
build_os=$(full_build_os)
@@ -81,6 +83,8 @@ host_vendor=$(word 2,$(subst -, ,$(canonical_host)))
8183
full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host))
8284
host_os:=$(findstring linux,$(full_host_os))
8385
host_os+=$(findstring darwin,$(full_host_os))
86+
host_os+=$(findstring freebsd,$(full_host_os))
87+
host_os+=$(findstring openbsd,$(full_host_os))
8488
host_os+=$(findstring mingw32,$(full_host_os))
8589

8690
ifeq (android,$(findstring android,$(full_host_os)))
@@ -168,7 +172,7 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
168172
mkdir -p $(@D)
169173
echo copying packages: $^
170174
echo to: $(@D)
171-
cd $(@D); $(foreach package,$^, tar xf $($(package)_cached); )
175+
cd $(@D); $(foreach package,$^, $(build_TAR) xf $($(package)_cached); )
172176
touch $@
173177

174178
# $PATH is not preserved between ./configure and make by convention. Its

depends/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ For linux S390X cross compilation:
8484

8585
sudo apt-get install g++-s390x-linux-gnu binutils-s390x-linux-gnu
8686

87+
### Install the required dependencies: OpenBSD
88+
89+
pkg_add bash gtar
90+
8791
### Dependency Options
8892
The following can be set when running make: `make FOO=bar`
8993

depends/builders/default.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
default_build_CC = gcc
22
default_build_CXX = g++
33
default_build_AR = ar
4+
default_build_TAR = tar
45
default_build_RANLIB = ranlib
56
default_build_STRIP = strip
67
default_build_NM = nm
@@ -12,7 +13,7 @@ build_$(build_os)_$1 ?= $$(default_build_$1)
1213
build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1)
1314
build_$1=$$(build_$(build_arch)_$(build_os)_$1)
1415
endef
15-
$(foreach var,CC CXX AR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL,$(eval $(call add_build_tool_func,$(var))))
16+
$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL,$(eval $(call add_build_tool_func,$(var))))
1617
define add_build_flags_func
1718
build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1)
1819
build_$1=$$(build_$(build_arch)_$(build_os)_$1)

depends/builders/freebsd.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build_freebsd_CC=clang
2+
build_freebsd_CXX=clang++
3+
4+
build_freebsd_SHA256SUM = shasum -a 256
5+
build_freebsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o

depends/builders/openbsd.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
build_openbsd_CC = clang
2+
build_openbsd_CXX = clang++
3+
4+
build_openbsd_SHA256SUM = sha256
5+
build_openbsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
6+
7+
build_openbsd_TAR = gtar

0 commit comments

Comments
 (0)