Open shenki opened 2 years ago
A proposed fix. Note that __isMultiprocSupported doesn't follow the pattern of the first two.
diff --git a/src/lib/utilmisc.C b/src/lib/utilmisc.C
index b3ca1ac04c53..85665c824487 100644
--- a/src/lib/utilmisc.C
+++ b/src/lib/utilmisc.C
@@ -28,8 +28,7 @@
namespace Util
{
-bool isSimics() __attribute__((alias("__isSimicsRunning")));
-extern "C" bool __isSimicsRunning() NEVER_INLINE;
+bool __isSimicsRunning() NEVER_INLINE;
bool __isSimicsRunning()
{
@@ -40,12 +39,11 @@ bool __isSimicsRunning()
bool isSimicsRunning()
{
- static bool simics = isSimics();
+ static bool simics = __isSimicsRunning();
return simics;
}
-bool isQmeModelEnabled() __attribute__((alias("__isQmeEnabled")));
extern "C" bool __isQmeEnabled() NEVER_INLINE;
bool __isQmeEnabled()
@@ -58,7 +56,7 @@ bool __isQmeEnabled()
bool requiresSecondaryCoreWorkaround()
{
static const auto required =
- isSimicsRunning() && !isQmeModelEnabled();
+ isSimicsRunning() && !__isQmeEnabled();
return required;
}
@@ -86,10 +84,14 @@ void setIsConsoleStarted()
g_isConsoleStarted = true;
}
-bool isMultiprocSupported() __attribute__((alias("__isMultiprocSupported")));
extern "C" bool __isMultiprocSupported() NEVER_INLINE;
-bool __isMultiprocSupported()
+bool __isMulitprocSupported()
+{
+ return MAGIC_INST_CHECK_FEATURE(MAGIC_FEATURE__MULTIPROC);
+}
+
+bool isMultiprocSupported()
{
bool multiprocSupport = true;
@@ -98,7 +100,7 @@ bool __isMultiprocSupported()
#else
if (isSimicsRunning())
{
- multiprocSupport = MAGIC_INST_CHECK_FEATURE(MAGIC_FEATURE__MULTIPROC);
+ multiprocSupport = __isMulitprocSupported();
}
#endif
Similar to the gcc9 issue, we plan on digging into an upgraded compiler later this year most likely. Any improvements will be done as time allows. I'd probably pull in a patch if someone threw one up.
Also, which branch are you attempting this on, master or master-p10?
This is some funky code that doesn't build: