Skip to content

Commit d3b5687

Browse files
mxaddictalex v
authored andcommitted
Changes required for GLIBC backward compatibility with gitian builds (#501)
* Removed unused JAR * Disabled libidn2 for back compat reasons * Updated MAX versions for GLIBC in check symbols * Upstream changes for compat code * Added more back compat code to glibc_compat.cpp * Added new wrapper for glob64 on i386/i686 builds * riscv support for depends (Upstream changes) * Enabled riscv64 for gitian builds * arm 32bit was also using glob64 IDKW * Added --with-pic for curl builds * Updated Secp256k1 from upstream * Removed a zip file in src * Added -fPIC in gitian descriptor for riscv build
1 parent 79624cf commit d3b5687

Some content is hidden

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

80 files changed

+2603
-25987
lines changed

configure.ac

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,13 @@ if test x$use_glibc_compat != xno; then
515515
AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
516516
AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"])
517517
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"])
518+
AX_CHECK_LINK_FLAG([[-Wl,--wrap=glob]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=glob"])
519+
case $host in
520+
# Need to add glob64 for 32bit builds
521+
i?86-* | arm*)
522+
AX_CHECK_LINK_FLAG([[-Wl,--wrap=glob64]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=glob64"])
523+
;;
524+
esac
518525
else
519526
AC_SEARCH_LIBS([clock_gettime],[rt])
520527
fi
@@ -835,8 +842,7 @@ else
835842

836843
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
837844
AC_CHECK_LIB([ssl], [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
838-
AC_CHECK_LIB([unbound], [main],[UNBOUND_LIBS=-lunbound
839-
have_unbound=yes], [AC_MSG_ERROR(libunbound missing)])
845+
AC_CHECK_LIB([unbound], [main],[UNBOUND_LIBS=-lunbound have_unbound=yes], [AC_MSG_ERROR(libunbound missing)])
840846
AC_CHECK_LIB([curl], [main],CURL_LIBS=-lcurl, AC_MSG_ERROR(libcurl missing))
841847

842848
if test x$build_navcoin_utils$build_navcoind$navcoin_enable_qt$use_tests != xnononono; then

contrib/devtools/symbol-check.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
'GCC': (4,4,0),
4040
'CXXABI': (1,3,3),
4141
'GLIBCXX': (3,4,13),
42-
'GLIBC': (2,27),
42+
'GLIBC': (2,11),
4343
}
4444
# See here for a description of _IO_stdin_used:
4545
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#109
@@ -73,8 +73,8 @@
7373
'libdl.so.2' # programming interface to dynamic linker
7474
}
7575
ARCH_MIN_GLIBC_VER = {
76-
'80386': (2,27),
77-
'X86-64': (2,27),
76+
'80386': (2,1),
77+
'X86-64': (2,2,5),
7878
'ARM': (2,4),
7979
'AArch64':(2,17),
8080
'RISC-V': (2,27)

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ packages:
1616
- "g++-8-arm-linux-gnueabihf"
1717
- "gcc-8-arm-linux-gnueabihf"
1818
- "binutils-arm-linux-gnueabihf"
19-
# - "g++-riscv64-linux-gnu"
20-
# - "g++-8-riscv64-linux-gnu"
21-
# - "gcc-8-riscv64-linux-gnu"
22-
# - "binutils-riscv64-linux-gnu"
19+
- "g++-riscv64-linux-gnu"
20+
- "g++-8-riscv64-linux-gnu"
21+
- "gcc-8-riscv64-linux-gnu"
22+
- "binutils-riscv64-linux-gnu"
2323
- "g++-8-multilib"
2424
- "gcc-8-multilib"
2525
- "binutils-gold"
@@ -40,12 +40,11 @@ script: |
4040
set -e -o pipefail
4141
4242
WRAP_DIR=$HOME/wrapped
43-
# HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu"
44-
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu"
43+
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu"
4544
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"
4645
FAKETIME_HOST_PROGS="gcc g++"
4746
FAKETIME_PROGS="date ar ranlib nm"
48-
HOST_CFLAGS="-O2 -g"
47+
HOST_CFLAGS="-O2 -g -fPIC"
4948
HOST_CXXFLAGS="-O2 -g"
5049
HOST_LDFLAGS=-static-libstdc++
5150

depends/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ i686*
88
mips*
99
arm*
1010
aarch64*
11+
riscv32*
12+
riscv64*

depends/hosts/default.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
ifneq ($(host),$(build))
2+
host_toolchain:=$(host)-
3+
endif
4+
15
default_host_CC = $(host_toolchain)gcc
26
default_host_CXX = $(host_toolchain)g++
37
default_host_AR = $(host_toolchain)ar

depends/packages/curl.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ endef
1212

1313
define $(package)_set_vars
1414
$(package)_config_env=CURL_CFLAG_EXTRAS="-DBUILDING_LIBCURL"
15-
$(package)_config_opts=--with-ssl=$(host_prefix) --enable-static --disable-shared
15+
$(package)_config_opts=--with-ssl=$(host_prefix) --enable-static --disable-shared --without-libidn2 --with-pic
1616
$(package)_config_opts_mingw32=--with-random=/dev/urandom
1717
$(package)_config_opts_x86_64_mingw32=--target=x86_64-w64-mingw32
1818
$(package)_config_opts_i686_mingw32=--target=i686-w64-mingw32

depends/packages/native_comparisontool.mk

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

depends/packages/packages.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
packages:=boost openssl libevent zeromq curl unbound expat
2-
native_packages := native_comparisontool
32

43
qt_native_packages = native_protobuf
54
qt_packages = qrencode protobuf zlib

depends/packages/protobuf.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ define $(package)_set_vars
1111
$(package)_config_opts_linux=--with-pic
1212
endef
1313

14+
define $(package)_preprocess_cmds
15+
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . &&\
16+
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub gtest/build-aux
17+
endef
18+
1419
define $(package)_config_cmds
1520
$($(package)_autoconf)
1621
endef

depends/packages/qrencode.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
package=qrencode
22
$(package)_version=3.4.4
33
$(package)_download_path=https://fukuchi.org/works/qrencode/
4-
$(package)_file_name=qrencode-$(qrencode_version).tar.bz2
4+
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
55
$(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5
66

77
define $(package)_set_vars
88
$(package)_config_opts=--disable-shared -without-tools --disable-sdltest
99
$(package)_config_opts_linux=--with-pic
1010
endef
1111

12+
define $(package)_preprocess_cmds
13+
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub use
14+
endef
15+
1216
define $(package)_config_cmds
1317
$($(package)_autoconf)
1418
endef

0 commit comments

Comments
 (0)