From 55181fe8b2646762a7d4ced58a08a3d74049db21 Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Fri, 28 Apr 2017 15:17:21 +0200 Subject: [PATCH] icinga2.spec: Add selecting g++ compiler on older SUSE releases g++ is too old, and the newer binary is suffixed. Signed-off-by: Michael Friedrich fixes #5218 --- icinga2.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/icinga2.spec b/icinga2.spec index 7c0ed6ab0..5b37ecfc8 100644 --- a/icinga2.spec +++ b/icinga2.spec @@ -339,6 +339,12 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_prefix}/lib/nagios/plugins" CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON" %endif +%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210 +# from package gcc48-c++ +export CC=gcc-4.8 +export CXX=g++-4.8 +%endif + %{?scl_enable} cmake $CMAKE_OPTS -DCMAKE_C_FLAGS:STRING="%{optflags} %{?march_flag}" -DCMAKE_CXX_FLAGS:STRING="%{optflags} %{?march_flag}" . make %{?_smp_mflags}