Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
packaging
deb-icinga2
Commits
9281bead
Commit
9281bead
authored
Aug 22, 2019
by
Markus Frosch
Browse files
Avoid GCC 7 to compile with
This is mainly for Ubuntu bionic, but a general dependency approach.
parent
d86271a0
Pipeline
#4986
passed with stages
in 52 minutes and 57 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
debian/control
View file @
9281bead
...
...
@@ -11,7 +11,7 @@ Build-Depends:
dh-systemd (>= 1.5),
libsystemd-dev,
flex,
g++ (>=
1.96
),
g++ (>=
4:8.0) | g++-8 | g++ (<< 4:7
),
libboost-dev (>= 1.66) | libboost1.67-dev | libboost1.67-icinga-dev,
libboost-context-dev (>= 1.66) | libboost-context1.67-dev | libboost-context1.67-icinga-dev,
libboost-coroutine-dev (>= 1.66) | libboost-coroutine1.67-dev | libboost-coroutine1.67-icinga-dev,
...
...
debian/rules
View file @
9281bead
...
...
@@ -2,6 +2,11 @@
#export DH_VERBOSE=1
CXX_INSTALLED_VERSION := $(shell dpkg-query --showformat='$${Version}' --show g++)
CXX_PREFERED_VERSION = 4:8.0
CXX_PREFERED_COMPILER = g++-8
C_PREFERED_COMPILER = gcc-8
CMAKE_FLAGS = -DICINGA2_LTO_BUILD=On
DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
...
...
@@ -26,6 +31,17 @@ CMAKE_FLAGS += -DICINGA2_UNITY_BUILD=Off
CMAKE_FLAGS += -DICINGA2_LTO_BUILD=Off
endif
# check if the installed default g++ is already newer as preferred
ifneq ($(shell dpkg --compare-versions "$(CXX_INSTALLED_VERSION)" ge "$(CXX_PREFERED_VERSION)" && echo 1 || echo 0),1)
# if not choose the prefered compiler directly
ifneq (,$(shell command -v $(CXX_PREFERED_COMPILER) 2>/dev/null))
# if it is installed
$(warning Installed GCC $(CXX_INSTALLED_VERSION) is older than $(CXX_PREFERED_VERSION) - using alternative binary $(CXX_PREFERED_COMPILER))
CMAKE_FLAGS += -DCMAKE_CXX_COMPILER=$(CXX_PREFERED_COMPILER)
CMAKE_FLAGS += -DCMAKE_C_COMPILER=$(C_PREFERED_COMPILER)
endif
endif
%:
dh $@ --with systemd --with bash_completion
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment