arch-arm, dev-arm: Remove Python 2 compatibility code
[gem5.git] / src / sim / init.cc
index 7b2e7e4a86a43105287df9daf4c865f674be0f1b..73d4dbd703e76619abdfc3f0bef1f4cde5e5f4b2 100644 (file)
@@ -51,6 +51,7 @@
 #include <string>
 #include <vector>
 
+#include "base/compiler.hh"
 #include "base/cprintf.hh"
 #include "base/logging.hh"
 #include "base/types.hh"
@@ -245,7 +246,7 @@ registerNativeModules()
  * Make the commands array weak so that they can be overridden (used
  * by unit tests to specify a different python main function.
  */
-const char * __attribute__((weak)) m5MainCommands[] = {
+M5_WEAK const char *m5MainCommands[] = {
     "import m5",
     "m5.main()",
     0 // sentinel is required