From c02a8849a799d0f2dedf70ff30e2069888152e48 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 3 Aug 2023 11:42:02 -0400 Subject: [PATCH] [docker] Use gcc 10 in chip build (#28478) * Switch to gcc10 instead of gcc9 for chip build base * Bump up version file * Add -Dtests=false --------- Co-authored-by: Andrei Litvin --- .../docker/images/base/chip-build/Dockerfile | 14 ++++++++++++-- integrations/docker/images/base/chip-build/version | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/integrations/docker/images/base/chip-build/Dockerfile b/integrations/docker/images/base/chip-build/Dockerfile index 60f8cd9a1e015a..a3c4e23fb11210 100644 --- a/integrations/docker/images/base/chip-build/Dockerfile +++ b/integrations/docker/images/base/chip-build/Dockerfile @@ -41,7 +41,7 @@ RUN set -x \ clang-tidy \ curl \ flex \ - g++ \ + g++-10 \ git \ git-lfs \ gperf \ @@ -98,6 +98,16 @@ RUN set -x \ && git lfs install \ && : # last line +# Set gcc 10 as a default compiler to work with TSAN +RUN set -x \ + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 \ + && update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 \ + && update-alternatives --set cc /usr/bin/gcc \ + && update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 \ + && update-alternatives --set c++ /usr/bin/g++ \ + && : # last line + # Cmake v3.23.1 ENV CMAKE_PLATFORM_VERSION= RUN case ${TARGETPLATFORM} in \ @@ -206,7 +216,7 @@ RUN case ${TARGETPLATFORM} in \ && export CCACHE_DISABLE=1 PYTHONDONTWRITEBYTECODE=1 \ && GLIB_VERSION=$(pkg-config --modversion glib-2.0) \ && git clone --depth=1 --branch=$GLIB_VERSION https://github.com/GNOME/glib.git \ - && CFLAGS="-O2 -g -fsanitize=thread" meson glib/build glib \ + && CFLAGS="-O2 -g -fsanitize=thread" meson glib/build glib -Dtests=false \ && DESTDIR=../build-image ninja -C glib/build install \ && mv glib/build-image/usr/local/lib/x86_64-linux-gnu/lib* $LD_LIBRARY_PATH_TSAN \ && rm -rf glib \ diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 6b5e738e874668..1776994de4304f 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -2 : Update esp-idf to v5.1 and remove few pinned package version +3 : Update to gcc-10