base, systemc: Fix clang compilation
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 7 Dec 2018 11:21:24 +0000 (11:21 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Sat, 8 Dec 2018 17:14:07 +0000 (17:14 +0000)
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 <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/14976
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/base/circular_queue.hh
src/systemc/SConscript

index ff7f73dc19ae1e87e0853eec0f39ee464c3cefea..5023661b91a4d1ef8bfd7bb294cde87dcaded33e 100644 (file)
@@ -394,7 +394,7 @@ class CircularQueue : private std::vector<T>
     };
 
   public:
-    using typename Base::operator[];
+    using Base::operator[];
 
     explicit CircularQueue(uint32_t size = 0)
         : _capacity(size), _head(1), _tail(0), _empty(true), _round(0)
index 694ee56b34678cd1e518c3dcb8b97fa4addefa8f..7317b3a8230a309689e5fe90146c6c7f62dc841d 100644 (file)
@@ -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)