Skip to content

Commit

Permalink
bareos.spec: use gcc10 on sle153 and later
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Oct 7, 2021
1 parent 97815a0 commit 44869c6
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions core/platforms/packaging/bareos.spec
Expand Up @@ -142,9 +142,14 @@ BuildRequires: devtoolset-8-gcc
BuildRequires: devtoolset-8-gcc-c++
%endif

%if 0%{?suse_version}
%if 0%{?sle_version} >= 150300
BuildRequires: gcc10
BuildRequires: gcc10-c++
%else
%if 0%{?suse_version}
BuildRequires: gcc9
BuildRequires: gcc9-c++
%endif
%endif

%if 0%{?systemd_support}
Expand Down Expand Up @@ -958,12 +963,19 @@ pushd %{CMAKE_BUILDDIR}
source /opt/rh/devtoolset-8/enable
%endif

# use gcc9 on SuSE
%if 0%{?suse_version}
# use modern compiler on suse
%if 0%{?sle_version} >= 150300
CC=gcc-10 ; export CC
CXX=g++-10 ; export CXX
%else
%if 0%{?suse_version}
CC=gcc-9 ; export CC
CXX=g++-9 ; export CXX
%endif
%endif



CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ;

Expand Down

0 comments on commit 44869c6

Please sign in to comment.