aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-03-25 00:33:56 +0100
committerDamjan Marion <dmarion@me.com>2020-03-26 13:29:47 +0000
commit33c9931cb4108a8394420fcae5d4c8f9ea0f367f (patch)
tree2787e0feb14aa0b30fef7a5ee7c5feacd2a620ba /Makefile
parent39cf40a700686d9b59a42d45fdfbcc844dbfd905 (diff)
build: use gcc-8 as default on ubuntu 18.04
Type: improvement Change-Id: I34c9e95ad9160436cb62dec7a1a2d0ce94602ab7 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3a5c80b52a9..67fdcd487e2 100644
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,11 @@ else ifeq ($(filter rhel centos fedora opensuse opensuse-leap opensuse-tumblewee
PKG=rpm
endif
+# on ubuntu 18.04 prefer gcc-8 if it is installed and CC is not set
+ifeq ($(OS_VERSION_ID)-$(CC)-$(shell which gcc-8 > /dev/null; echo $$?),18.04-cc-0)
+ CC = gcc-8
+endif
+
# +libganglia1-dev if building the gmond plugin
DEB_DEPENDS = curl build-essential autoconf automake ccache
@@ -81,6 +86,7 @@ ifeq ($(OS_VERSION_ID),16.04)
else ifeq ($(OS_VERSION_ID),18.04)
DEB_DEPENDS += python-dev
DEB_DEPENDS += libssl-dev
+ DEB_DEPENDS += gcc-8
else ifeq ($(OS_VERSION_ID),20.04)
LIBFFI=libffi7
else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)