IMPALA-9999: Switch to GCC 10.4

This upgrades GCC and libstdc++ to version 10.4. This
required patching or upgrading several dependencies
so they could compile with GCC 10. The toolchain
companion change has details on what items needed
to be upgraded and why.

The toolchain companion change switches GCC to build
with toolchain binutils rather than host binutils. This
means that the python virtualenv initialization needs
to include binutils on the path.

This disables two warnings introduced in the new GCC
versions (Wclass-memaccess and Winit-list-lifetime).
These two warnings occur in our code and also in
dependencies like LLVM and rapidjson. These are not
critical warnings, so they can be addressed
independently and reenabled later.

Binary sizes increase, particulary when including
debug symbols:
                         | GCC 7.5     | GCC 10.4
impalad RELEASE stripped |  83204768   |  88702824
impalad RELEASE          | 707278904   | 971711456
impalad DEBUG stripped   | 106677672   |  97391944
impalad DEBUG            | 725864760   | 867647512

Testing:
 - Multiple test jobs (core, release exhaustive, ASAN)
 - Performance testing for TPC-H and TPC-DS shows
   a modest improvement (2-4%).
 - Code compiles without warnings on debug and release

Change-Id: Ibe6857b822925226d39fd4d6413457ef6bbaabec
Reviewed-on: http://gerrit.cloudera.org:8080/18134
Reviewed-by: Michael Smith <michael.smith@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Csaba Ringhofer <csringhofer@cloudera.com>
This commit is contained in:
Joe McDonnell
2022-01-07 18:01:48 -08:00
parent 19114c7205
commit cff286e751
8 changed files with 51 additions and 20 deletions

View File

@@ -152,6 +152,11 @@ def exec_pip_install(args, cc="no-cc-available", env=None):
current process's command line arguments are inherited.'''
if not env: env = dict(os.environ)
env["CC"] = cc
# Since gcc is now built with toolchain binutils which may be newer than the
# system binutils, we need to include the toolchain binutils on the PATH.
toolchain_binutils_dir = toolchain_pkg_dir("binutils")
binutils_bin_dir = os.path.join(toolchain_binutils_dir, "bin")
env["PATH"] = "{0}:{1}".format(binutils_bin_dir, env["PATH"])
# Parallelize the slow numpy build.
# Use getconf instead of nproc because it is supported more widely, e.g. on older