Gitian builds: Remove manual CFLAGS and CXXFLAGS from descriptor.

Before Zcash launched, we were heavily relying on `zcutil/build.sh` to
apply our Zcash-specific hardening flags. The Gitian deterministic build
system obviously didn't use our script, so the corresponding flags were
manually added to `gitian-linux.yml`.

Since then, we have migrated all of our flags into `configure.ac`.
Manually setting them in the Gitian descriptor is no longer necessary,
and should have been removed at the same time. This didn't cause any
noticeable issues, however, leaving it undetected until we migrated to
Clang in zcash/zcash#4613, and performed a Gitian build for 4.1.0-rc1.

The Gitian failure was caused by linker flags specific to C++ being used
in configuration tests for secp256k1 (a C library). This causes ldd to
emit warnings, which are then converted to errors by the -Werror flags
that were added to CFLAGS and CXXFLAGS by `gitian-linux.yml`. CI did not
encounter this because it uses the standard `--enable-werror` config flag,
which adds `-Werror` to CXXFLAGS but not CFLAGS.

Co-authored-by: Jack Grigg <jack@z.cash>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2020-10-28 22:16:25 +00:00
parent 75f1a46023
commit 6cbaa65b55
1 changed files with 3 additions and 3 deletions

View File

@ -32,12 +32,12 @@ files: []
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-linux-gnu"
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --enable-hardening"
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --enable-hardening --enable-werror"
MAKEOPTS="V=1"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="date ar ranlib nm strip objcopy"
HOST_CFLAGS="-fwrapv -fno-strict-aliasing -Werror -g"
HOST_CXXFLAGS="-fwrapv -fno-strict-aliasing -Werror -g"
HOST_CFLAGS=""
HOST_CXXFLAGS=""
HOST_LDFLAGS=-static-libstdc++
export QT_RCC_TEST=0