Update GCC to 14 on Linux

This commit is contained in:
Ilya Fedin 2025-05-21 21:46:22 +00:00 committed by John Preston
parent 2f003d416a
commit 2535b6e08c
3 changed files with 6 additions and 5 deletions

View file

@ -108,8 +108,8 @@ jobs:
$IMAGE_TAG \
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
-D CMAKE_CONFIGURATION_TYPES=Debug \
-D CMAKE_C_FLAGS_DEBUG="-O0 -U_FORTIFY_SOURCE" \
-D CMAKE_CXX_FLAGS_DEBUG="-O0 -U_FORTIFY_SOURCE" \
-D CMAKE_C_FLAGS_DEBUG="-O0" \
-D CMAKE_CXX_FLAGS_DEBUG="-O0" \
-D CMAKE_EXE_LINKER_FLAGS="-s" \
-D CMAKE_COMPILE_WARNING_AS_ERROR=ON \
-D TDESKTOP_API_TEST=ON \

View file

@ -5,6 +5,7 @@ the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#define _GLIBCXX_USE_CXX11_ABI 0
#include <cstdio>
#include <sys/stat.h>
#include <sys/types.h>

View file

@ -1,7 +1,7 @@
{%- set GIT = "https://github.com" -%}
{%- set GIT_FREEDESKTOP = GIT ~ "/gitlab-freedesktop-mirrors" -%}
{%- set GIT_UPDATE_M4 = "git submodule set-url m4 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 && git submodule update --init --recursive --depth=1" -%}
{%- set TOOLSET = "gcc-toolset-12" -%}
{%- set TOOLSET = "gcc-toolset-14" -%}
{%- set QT = "6.9.0" -%}
{%- set QT_TAG = "v" ~ QT -%}
{%- set LibrariesPath = "/usr/src/Libraries" -%}
@ -26,7 +26,7 @@ RUN dnf -y install epel-release \
alsa-lib-devel pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel \
mesa-libgbm-devel libdrm-devel vulkan-devel libva-devel libvdpau-devel \
glib2-devel gobject-introspection-devel at-spi2-core-devel gtk3-devel \
boost1.78-devel fmt-devel \
boost1.78-devel \
&& dnf clean all
RUN alternatives --set python3 /usr/bin/python3.11
@ -39,7 +39,7 @@ WORKDIR {{ LibrariesPath }}
ENV AR gcc-ar
ENV RANLIB gcc-ranlib
ENV NM gcc-nm
ENV CFLAGS {% if DEBUG %}-g{% endif %} -O3 {% if LTO %}-flto=auto -ffat-lto-objects{% endif %} -pipe -fPIC -fno-strict-aliasing -fexceptions -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -fcf-protection -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS
ENV CFLAGS {% if DEBUG %}-g{% endif %} -O3 {% if LTO %}-flto=auto -ffat-lto-objects{% endif %} -pipe -fPIC -fno-strict-aliasing -fexceptions -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fhardened -Wno-hardened
ENV CXXFLAGS $CFLAGS
ENV CMAKE_GENERATOR Ninja