arch-arm: clang compilation fixes
authorMatteo Andreozzi <Matteo.Andreozzi@arm.com>
Mon, 26 Feb 2018 16:40:12 +0000 (10:40 -0600)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 28 Nov 2018 11:45:52 +0000 (11:45 +0000)
Fix 1: std::pair constructor is not a constexpr in clang implementation
Fix 2: static const templates need to be defined in their
       translation unit

Change-Id: I3d9b9b47e1d148e44555f40e2e2aeff06707ff8f
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/14617
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>

src/arch/arm/semihosting.hh

index 5816460211b642a428b776af6be950e081007822..a9c11933fea79c77b9d0907ae6fe35af2c674786 100644 (file)
@@ -264,11 +264,11 @@ class ArmSemihosting : public SimObject
 
   private:
     typedef std::pair<uint64_t, SemiErrno> RetErrno;
-    static constexpr RetErrno retError(SemiErrno e) {
+    static  RetErrno retError(SemiErrno e) {
         return RetErrno((uint64_t)-1, e);
     }
 
-    static constexpr RetErrno retOK(uint64_t r) {
+    static  RetErrno retOK(uint64_t r) {
         return RetErrno(r, 0);
     }