From b18535019126764052395b036f2ec24271d726e5 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Fri, 7 Dec 2018 11:21:24 +0000 Subject: [PATCH] base, systemc: Fix clang compilation This patch is fixing the following issues: - base: typename should be used only for types - systemc: 'GCC_VERSION' is not defined for clang Change-Id: I27c94445d65691a08a0a14a0ffe6b6942f6c455f Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/14976 Reviewed-by: Jason Lowe-Power Maintainer: Gabe Black --- src/base/circular_queue.hh | 2 +- src/systemc/SConscript | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/base/circular_queue.hh b/src/base/circular_queue.hh index ff7f73dc1..5023661b9 100644 --- a/src/base/circular_queue.hh +++ b/src/base/circular_queue.hh @@ -394,7 +394,7 @@ class CircularQueue : private std::vector }; public: - using typename Base::operator[]; + using Base::operator[]; explicit CircularQueue(uint32_t size = 0) : _capacity(size), _head(1), _tail(0), _empty(true), _round(0) diff --git a/src/systemc/SConscript b/src/systemc/SConscript index 694ee56b3..7317b3a82 100644 --- a/src/systemc/SConscript +++ b/src/systemc/SConscript @@ -31,7 +31,9 @@ from m5.util import compareVersions from m5.util.terminal import termcap if env['USE_SYSTEMC']: - if compareVersions(env['GCC_VERSION'], '5.0') < 0: + if 'GCC_VERSION' in env and \ + compareVersions(env['GCC_VERSION'], '5.0') < 0: + print(termcap.Yellow + termcap.Bold + 'Warning: Disabling systemc on gcc versions less than 5.0.' + termcap.Normal) -- 2.30.2