From 0e2033bbc72de7cfc919ab91ce5c9ef2d1c9148b Mon Sep 17 00:00:00 2001 From: S-P Chan Date: Mon, 16 Dec 2024 10:48:39 +0800 Subject: [PATCH] MT#55283 Workaround for RPM packaging EL8/GCC 8.5 - LTS mr11.5.1 doesn't build with system GCC 8.5 on EL8 - add a workaround for using GCC 13 Closes #1887 Closes #1886 Change-Id: Ib93942fae8f754c7673509ccb45e0d08569f23f0 Addresses: #1886 --- el/rtpengine.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/el/rtpengine.spec b/el/rtpengine.spec index d8f40ea65..d08276b0c 100644 --- a/el/rtpengine.spec +++ b/el/rtpengine.spec @@ -38,6 +38,10 @@ BuildRequires: libatomic BuildRequires: pkgconfig(libwebsockets) BuildRequires: pkgconfig(spandsp) BuildRequires: pkgconfig(opus) +%if 0%{?rhel} == 8 +# LTS mr11.5.1 cannot build with gcc 8.5 +BuildRequires: gcc-toolset-13 +%endif Requires(pre): shadow-utils %if 0%{?rhel} >= 8 BuildRequires: pkgconfig(libmnl) pkgconfig(libnftnl) pandoc ncurses-devel @@ -129,6 +133,10 @@ echo ==== CFLAGS = $CFLAGS ==== echo ==== CXXFLAGS = $CXXFLAGS ==== echo ==== LDFLAGS = $LDFLAGS ==== +%if 0%{?rhel} == 8 +# LTS mr11.5.1 cannot build with gcc 8.5 +. /opt/rh/gcc-toolset-13/enable +%endif %if 0%{?with_transcoding} > 0 RTPENGINE_VERSION="\"%{version}-%{release}\"" make all %else