Gitian: fix check-symbols for armhf builds

amrhf builds leak Boost symbols, so @laanwj’s linker script hack was
added back to armhf builds.

Also added ld-linux-armhf.so.3 to the list of allowed libraries in
symbol-check.py.
This commit is contained in:
Barnabas Debreczeni
2016-03-05 15:21:22 +01:00
parent 8465190cb6
commit 2e568375ea
2 changed files with 15 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ ALLOWED_LIBRARIES = {
'librt.so.1', # real-time (clock)
'ld-linux-x86-64.so.2', # 64-bit dynamic linker
'ld-linux.so.2', # 32-bit dynamic linker
'ld-linux-armhf.so.3', # 32-bit armhf dynamic linker
# bitcoin-qt only
'libX11-xcb.so.1', # part of X11
'libX11.so.6', # part of X11

View File

@@ -23,9 +23,20 @@ remotes:
"dir": "bitcoin"
files: []
script: |
# Avoid exporting *any* symbols from the executable
# This avoids conflicts between the libraries statically linked into bitcoin and any
# libraries we may link dynamically (such as Qt and OpenSSL, see issue #4094).
# It also avoids start-up overhead to not export any unnecessary symbols.
# To do this, build a linker script that marks all symbols as local.
LINKER_SCRIPT=$HOME/build/linker_version_script
echo '
{
local: *;
};' > $LINKER_SCRIPT
WRAP_DIR=$HOME/wrapped
HOSTS="arm-linux-gnueabihf"
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports"
CONFIGLDFLAGS="-static-libstdc++ -Wl,--version-script=$LINKER_SCRIPT"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="date ar ranlib nm strip"
@@ -95,9 +106,10 @@ script: |
mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST
./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} LDFLAGS="${CONFIGLDFLAGS}"
make ${MAKEOPTS}
make ${MAKEOPTS} -C src check-security
make ${MAKEOPTS} -C src check-symbols
make install-strip
cd installed
find . -name "lib*.la" -delete